From 174ea0c10594c700a0dda51068c5dd0157a347c2 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Thu, 21 Sep 2017 20:04:29 +0300 Subject: [PATCH] *BREAKING*: Don't allow creating applications with discontinued device types Connects-To: #358 Change-Type: major --- build/models/application.js | 17 +- build/resin-browser.js | 2539 +++++++++-------- build/resin-browser.min.js | 50 +- lib/models/application.coffee | 15 +- package.json | 4 +- .../models/application.spec.coffee | 6 +- 6 files changed, 1335 insertions(+), 1296 deletions(-) diff --git a/build/models/application.js b/build/models/application.js index 1f330bc02..ca0a6829b 100644 --- a/build/models/application.js +++ b/build/models/application.js @@ -376,19 +376,22 @@ getApplicationModel = function(deps, opts) { * }); */ exports.create = function(name, deviceType, parentNameOrId, callback) { - var deviceSlugPromise, parentAppPromise; + var deviceManifestPromise, parentAppPromise; callback = findCallback(arguments); parentAppPromise = parentNameOrId ? exports.get(parentNameOrId, { select: ['id'] }) : Promise.resolve(); - deviceSlugPromise = deviceModel().getDeviceSlug(deviceType).tap(function(deviceSlug) { - if (deviceSlug == null) { + deviceManifestPromise = deviceModel().getManifestBySlug(deviceType).tap(function(deviceManifest) { + if (deviceManifest == null) { throw new errors.ResinInvalidDeviceType(deviceType); } }); - return Promise.all([deviceSlugPromise, parentAppPromise]).then(function(arg) { - var deviceSlug, extraOptions, parentApplication; - deviceSlug = arg[0], parentApplication = arg[1]; + return Promise.all([deviceManifestPromise, parentAppPromise]).then(function(arg) { + var deviceManifest, extraOptions, parentApplication; + deviceManifest = arg[0], parentApplication = arg[1]; + if (deviceManifest.state === 'DISCONTINUED') { + throw new errors.ResinDiscontinuedDeviceType(deviceType); + } extraOptions = parentApplication ? { application: parentApplication.id } : {}; @@ -396,7 +399,7 @@ getApplicationModel = function(deps, opts) { resource: 'application', body: assign({ app_name: name, - device_type: deviceSlug + device_type: deviceManifest.slug }, extraOptions) }); }).asCallback(callback); diff --git a/build/resin-browser.js b/build/resin-browser.js index 24d0f7b25..14f003339 100644 --- a/build/resin-browser.js +++ b/build/resin-browser.js @@ -1,5 +1,613 @@ // Generated by browserify (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.resinSdk = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o { + * if (typeof id !== 'number') { + * throw new errors.ResinInvalidParameterError('id', id) + * } + * } + */ +var ResinInvalidParameterError = (function (_super) { + tslib_1.__extends(ResinInvalidParameterError, _super); + function ResinInvalidParameterError(parameterName, suppliedValue) { + var _this = _super.call(this, "Invalid parameter: " + suppliedValue + " is not a valid value for parameter '" + parameterName + "'") || this; + _this.parameterName = parameterName; + _this.suppliedValue = suppliedValue; + return _this; + } + return ResinInvalidParameterError; +}(ResinError)); +exports.ResinInvalidParameterError = ResinInvalidParameterError; +ResinInvalidParameterError.prototype.code = 'ResinInvalidParameterError'; + +},{"tslib":2,"typed-error":3}],2:[function(require,module,exports){ +(function (global){ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __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; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + 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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, 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 }; + } + }; + + __exportStar = function (m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + }; + + __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; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; }; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); +}); +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],3:[function(require,module,exports){ +"use strict"; +var tslib_1 = require("tslib"); +var BaseError = (function () { + function BaseError() { + Error.apply(this, arguments); + } + return BaseError; +}()); +BaseError.prototype = Object.create(Error.prototype); +var getStackTrace; +if (Error.captureStackTrace != null) { + var captureStackTrace_1 = Error.captureStackTrace; + getStackTrace = function (e) { + captureStackTrace_1(e, e.constructor); + }; +} +else { + getStackTrace = function (e, err) { + if (!(err instanceof Error)) { + err = new Error(err); + } + if (err.stack != null) { + e.stack = err.stack; + } + }; +} +var TypedError = (function (_super) { + tslib_1.__extends(TypedError, _super); + function TypedError(err) { + if (err === void 0) { err = ''; } + var _this = _super.call(this) || this; + if (err instanceof Error) { + _this.message = err.message; + } + else { + _this.message = err; + } + _this.name = _this.constructor.name; + getStackTrace(_this, err); + return _this; + } + return TypedError; +}(BaseError)); +module.exports = TypedError; + +},{"tslib":2}],4:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -122,7 +730,7 @@ get2fa = function(deps, opts) { module.exports = get2fa; -},{}],2:[function(require,module,exports){ +},{}],5:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -492,7 +1100,7 @@ getAuth = function(deps, opts) { module.exports = getAuth; -},{"./2fa":1,"resin-errors":466}],3:[function(require,module,exports){ +},{"./2fa":4,"resin-errors":1}],6:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -779,7 +1387,7 @@ getLogs = function(deps, opts) { module.exports = getLogs; -},{"./models/config":7,"./models/device":8,"bluebird":34,"resin-device-logs":462,"resin-errors":466}],4:[function(require,module,exports){ +},{"./models/config":10,"./models/device":11,"bluebird":37,"resin-device-logs":465,"resin-errors":1}],7:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -1158,19 +1766,22 @@ getApplicationModel = function(deps, opts) { * }); */ exports.create = function(name, deviceType, parentNameOrId, callback) { - var deviceSlugPromise, parentAppPromise; + var deviceManifestPromise, parentAppPromise; callback = findCallback(arguments); parentAppPromise = parentNameOrId ? exports.get(parentNameOrId, { select: ['id'] }) : Promise.resolve(); - deviceSlugPromise = deviceModel().getDeviceSlug(deviceType).tap(function(deviceSlug) { - if (deviceSlug == null) { + deviceManifestPromise = deviceModel().getManifestBySlug(deviceType).tap(function(deviceManifest) { + if (deviceManifest == null) { throw new errors.ResinInvalidDeviceType(deviceType); } }); - return Promise.all([deviceSlugPromise, parentAppPromise]).then(function(arg) { - var deviceSlug, extraOptions, parentApplication; - deviceSlug = arg[0], parentApplication = arg[1]; + return Promise.all([deviceManifestPromise, parentAppPromise]).then(function(arg) { + var deviceManifest, extraOptions, parentApplication; + deviceManifest = arg[0], parentApplication = arg[1]; + if (deviceManifest.state === 'DISCONTINUED') { + throw new errors.ResinDiscontinuedDeviceType(deviceType); + } extraOptions = parentApplication ? { application: parentApplication.id } : {}; @@ -1178,7 +1789,7 @@ getApplicationModel = function(deps, opts) { resource: 'application', body: assign({ app_name: name, - device_type: deviceSlug + device_type: deviceManifest.slug }, extraOptions) }); }).asCallback(callback); @@ -1579,7 +2190,7 @@ getApplicationModel = function(deps, opts) { module.exports = getApplicationModel; -},{"../util":18,"../util/device-os-version":15,"./device":8,"bluebird":34,"lodash/assign":331,"lodash/filter":339,"lodash/forEach":343,"lodash/isArray":350,"lodash/isEmpty":356,"lodash/once":375,"lodash/size":380,"resin-errors":466}],5:[function(require,module,exports){ +},{"../util":21,"../util/device-os-version":18,"./device":11,"bluebird":37,"lodash/assign":334,"lodash/filter":342,"lodash/forEach":346,"lodash/isArray":353,"lodash/isEmpty":359,"lodash/once":378,"lodash/size":383,"resin-errors":1}],8:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -1794,7 +2405,7 @@ getBillingModel = function(deps, opts) { module.exports = getBillingModel; -},{}],6:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -1927,7 +2538,7 @@ getBuildModel = function(deps, opts) { module.exports = getBuildModel; -},{"../util":18,"./application":4,"lodash/once":375,"resin-errors":466}],7:[function(require,module,exports){ +},{"../util":21,"./application":7,"lodash/once":378,"resin-errors":1}],10:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -2129,7 +2740,7 @@ getConfigModel = function(deps, opts) { module.exports = getConfigModel; -},{"./device":8,"lodash/map":369,"lodash/once":375,"lodash/union":389}],8:[function(require,module,exports){ +},{"./device":11,"lodash/map":372,"lodash/once":378,"lodash/union":392}],11:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -4052,7 +4663,7 @@ getDeviceModel = function(deps, opts) { module.exports = getDeviceModel; -},{"../auth":2,"../util":18,"../util/device-os-version":15,"./application":4,"./config":7,"bluebird":34,"lodash/find":340,"lodash/includes":348,"lodash/isEmpty":356,"lodash/isFinite":357,"lodash/map":369,"lodash/once":375,"lodash/some":381,"lodash/without":391,"resin-device-status":465,"resin-errors":466,"resin-register-device":470,"semver":480,"url":495}],9:[function(require,module,exports){ +},{"../auth":5,"../util":21,"../util/device-os-version":18,"./application":7,"./config":10,"bluebird":37,"lodash/find":343,"lodash/includes":351,"lodash/isEmpty":359,"lodash/isFinite":360,"lodash/map":372,"lodash/once":378,"lodash/some":384,"lodash/without":394,"resin-device-status":468,"resin-errors":1,"resin-register-device":471,"semver":481,"url":495}],12:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -4483,7 +5094,7 @@ getEnvironmentVariablesModel = function(deps, opts) { module.exports = getEnvironmentVariablesModel; -},{"./application":4,"./device":8,"bluebird":34,"lodash/once":375,"resin-errors":466}],10:[function(require,module,exports){ +},{"./application":7,"./device":11,"bluebird":37,"lodash/once":378,"resin-errors":1}],13:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -4563,7 +5174,7 @@ module.exports = function(deps, opts) { }); }; -},{"./application":4,"./billing":5,"./build":6,"./config":7,"./device":8,"./environment-variables":9,"./key":11,"./os":12,"lodash/mapValues":370}],11:[function(require,module,exports){ +},{"./application":7,"./billing":8,"./build":9,"./config":10,"./device":11,"./environment-variables":12,"./key":14,"./os":15,"lodash/mapValues":373}],14:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -4732,7 +5343,7 @@ getKeyModel = function(deps, opts) { module.exports = getKeyModel; -},{"../auth":2,"../util":18,"bluebird":34,"lodash/isEmpty":356,"resin-errors":466}],12:[function(require,module,exports){ +},{"../auth":5,"../util":21,"bluebird":37,"lodash/isEmpty":359,"resin-errors":1}],15:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -5148,7 +5759,7 @@ getOsModel = function(deps, opts) { module.exports = getOsModel; -},{"../util":18,"./application":4,"./config":7,"bluebird":34,"lodash":368,"lodash/once":375,"lodash/partition":377,"lodash/reject":379,"resin-errors":466,"semver":480}],13:[function(require,module,exports){ +},{"../util":21,"./application":7,"./config":10,"bluebird":37,"lodash":371,"lodash/once":378,"lodash/partition":380,"lodash/reject":382,"resin-errors":1,"semver":481}],16:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -5472,7 +6083,7 @@ getSdk.fromSharedOptions = function() { module.exports = getSdk; -},{"./auth":2,"./logs":3,"./models":10,"./settings":14,"./util":18,"lodash/assign":331,"lodash/defaults":337,"lodash/mapValues":370,"resin-errors":466,"resin-pine":468,"resin-request":472,"resin-settings-client":undefined,"resin-token":477}],14:[function(require,module,exports){ +},{"./auth":5,"./logs":6,"./models":13,"./settings":17,"./util":21,"lodash/assign":334,"lodash/defaults":340,"lodash/mapValues":373,"resin-errors":1,"resin-pine":469,"resin-request":473,"resin-settings-client":undefined,"resin-token":478}],17:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -5558,7 +6169,7 @@ getSettings = function(deps, opts) { module.exports = getSettings; -},{"bluebird":34}],15:[function(require,module,exports){ +},{"bluebird":37}],18:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 var isEmpty, isProvisioned; @@ -5572,7 +6183,7 @@ exports.normalizeDeviceOsVersion = function(device) { } }; -},{".":18,"lodash/isEmpty":356}],16:[function(require,module,exports){ +},{".":21,"lodash/isEmpty":359}],19:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 var dtPredicate, find, findBySlug, includes, indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; @@ -5606,7 +6217,7 @@ exports.normalizeDeviceType = function(deviceTypes, slug) { return (ref = findBySlug(deviceTypes, slug)) != null ? ref.slug : void 0; }; -},{}],17:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 var DEFAULT_RESULTS_CACHING_INTERVAL, IMG_MAKER_API_PREFIX, IMG_MAKER_API_VERSION, assign, getImgMakerHelper, promiseMemoize; @@ -5676,7 +6287,7 @@ getImgMakerHelper = function(imageMakerUrl, request) { module.exports = getImgMakerHelper; -},{"lodash/assign":331,"promise-memoize":426}],18:[function(require,module,exports){ +},{"lodash/assign":334,"promise-memoize":429}],21:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 var cloneDeep, convertExpandToObject, dateToMoment, errors, fromPairs, getRev, includes, isArray, isEmpty, isFunction, isNumber, isString, memoizee, mergeExpandOptions, moment, notImplemented, now, safeSemver, semver, throttle, hasProp = {}.hasOwnProperty; @@ -5927,7 +6538,7 @@ convertExpandToObject = function(expandOption) { } }; -},{"./device-types":16,"./img-maker":17,"lodash/cloneDeep":334,"lodash/fromPairs":344,"lodash/includes":348,"lodash/isArray":350,"lodash/isEmpty":356,"lodash/isFunction":358,"lodash/isNumber":360,"lodash/isString":363,"lodash/throttle":384,"memoizee":399,"moment":414,"resin-errors":466,"semver":480}],19:[function(require,module,exports){ +},{"./device-types":19,"./img-maker":20,"lodash/cloneDeep":337,"lodash/fromPairs":347,"lodash/includes":351,"lodash/isArray":353,"lodash/isEmpty":359,"lodash/isFunction":361,"lodash/isNumber":363,"lodash/isString":366,"lodash/throttle":387,"memoizee":402,"moment":417,"resin-errors":1,"semver":481}],22:[function(require,module,exports){ var asn1 = exports; asn1.bignum = require('bn.js'); @@ -5938,7 +6549,7 @@ asn1.constants = require('./asn1/constants'); asn1.decoders = require('./asn1/decoders'); asn1.encoders = require('./asn1/encoders'); -},{"./asn1/api":20,"./asn1/base":22,"./asn1/constants":26,"./asn1/decoders":28,"./asn1/encoders":31,"bn.js":35}],20:[function(require,module,exports){ +},{"./asn1/api":23,"./asn1/base":25,"./asn1/constants":29,"./asn1/decoders":31,"./asn1/encoders":34,"bn.js":38}],23:[function(require,module,exports){ var asn1 = require('../asn1'); var inherits = require('inherits'); @@ -6001,7 +6612,7 @@ Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { return this._getEncoder(enc).encode(data, reporter); }; -},{"../asn1":19,"inherits":161,"vm":498}],21:[function(require,module,exports){ +},{"../asn1":22,"inherits":164,"vm":498}],24:[function(require,module,exports){ var inherits = require('inherits'); var Reporter = require('../base').Reporter; var Buffer = require('buffer').Buffer; @@ -6119,7 +6730,7 @@ EncoderBuffer.prototype.join = function join(out, offset) { return out; }; -},{"../base":22,"buffer":64,"inherits":161}],22:[function(require,module,exports){ +},{"../base":25,"buffer":67,"inherits":164}],25:[function(require,module,exports){ var base = exports; base.Reporter = require('./reporter').Reporter; @@ -6127,7 +6738,7 @@ base.DecoderBuffer = require('./buffer').DecoderBuffer; base.EncoderBuffer = require('./buffer').EncoderBuffer; base.Node = require('./node'); -},{"./buffer":21,"./node":23,"./reporter":24}],23:[function(require,module,exports){ +},{"./buffer":24,"./node":26,"./reporter":27}],26:[function(require,module,exports){ var Reporter = require('../base').Reporter; var EncoderBuffer = require('../base').EncoderBuffer; var DecoderBuffer = require('../base').DecoderBuffer; @@ -6763,7 +7374,7 @@ Node.prototype._isPrintstr = function isPrintstr(str) { return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); }; -},{"../base":22,"minimalistic-assert":412}],24:[function(require,module,exports){ +},{"../base":25,"minimalistic-assert":415}],27:[function(require,module,exports){ var inherits = require('inherits'); function Reporter(options) { @@ -6886,7 +7497,7 @@ ReporterError.prototype.rethrow = function rethrow(msg) { return this; }; -},{"inherits":161}],25:[function(require,module,exports){ +},{"inherits":164}],28:[function(require,module,exports){ var constants = require('../constants'); exports.tagClass = { @@ -6930,7 +7541,7 @@ exports.tag = { }; exports.tagByName = constants._reverse(exports.tag); -},{"../constants":26}],26:[function(require,module,exports){ +},{"../constants":29}],29:[function(require,module,exports){ var constants = exports; // Helper @@ -6951,7 +7562,7 @@ constants._reverse = function reverse(map) { constants.der = require('./der'); -},{"./der":25}],27:[function(require,module,exports){ +},{"./der":28}],30:[function(require,module,exports){ var inherits = require('inherits'); var asn1 = require('../../asn1'); @@ -7277,13 +7888,13 @@ function derDecodeLen(buf, primitive, fail) { return len; } -},{"../../asn1":19,"inherits":161}],28:[function(require,module,exports){ +},{"../../asn1":22,"inherits":164}],31:[function(require,module,exports){ var decoders = exports; decoders.der = require('./der'); decoders.pem = require('./pem'); -},{"./der":27,"./pem":29}],29:[function(require,module,exports){ +},{"./der":30,"./pem":32}],32:[function(require,module,exports){ var inherits = require('inherits'); var Buffer = require('buffer').Buffer; @@ -7334,7 +7945,7 @@ PEMDecoder.prototype.decode = function decode(data, options) { return DERDecoder.prototype.decode.call(this, input, options); }; -},{"./der":27,"buffer":64,"inherits":161}],30:[function(require,module,exports){ +},{"./der":30,"buffer":67,"inherits":164}],33:[function(require,module,exports){ var inherits = require('inherits'); var Buffer = require('buffer').Buffer; @@ -7631,13 +8242,13 @@ function encodeTag(tag, primitive, cls, reporter) { return res; } -},{"../../asn1":19,"buffer":64,"inherits":161}],31:[function(require,module,exports){ +},{"../../asn1":22,"buffer":67,"inherits":164}],34:[function(require,module,exports){ var encoders = exports; encoders.der = require('./der'); encoders.pem = require('./pem'); -},{"./der":30,"./pem":32}],32:[function(require,module,exports){ +},{"./der":33,"./pem":35}],35:[function(require,module,exports){ var inherits = require('inherits'); var DEREncoder = require('./der'); @@ -7660,7 +8271,7 @@ PEMEncoder.prototype.encode = function encode(data, options) { return out.join('\n'); }; -},{"./der":30,"inherits":161}],33:[function(require,module,exports){ +},{"./der":33,"inherits":164}],36:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -7776,7 +8387,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],34:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ (function (process,global){ /* @preserve * The MIT License (MIT) @@ -13398,7 +14009,7 @@ module.exports = ret; },{"./es5":13}]},{},[4])(4) }); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":425}],35:[function(require,module,exports){ +},{"_process":428}],38:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -16827,7 +17438,7 @@ module.exports = ret; }; })(typeof module === 'undefined' || module, this); -},{}],36:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ var r; module.exports = function rand(len) { @@ -16894,9 +17505,9 @@ if (typeof self === 'object') { } } -},{"crypto":37}],37:[function(require,module,exports){ +},{"crypto":40}],40:[function(require,module,exports){ -},{}],38:[function(require,module,exports){ +},{}],41:[function(require,module,exports){ (function (Buffer){ // based on the aes implimentation in triple sec // https://github.com/keybase/triplesec @@ -17077,7 +17688,7 @@ AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { exports.AES = AES }).call(this,require("buffer").Buffer) -},{"buffer":64}],39:[function(require,module,exports){ +},{"buffer":67}],42:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -17178,7 +17789,7 @@ function xorTest (a, b) { } }).call(this,require("buffer").Buffer) -},{"./aes":38,"./ghash":43,"buffer":64,"buffer-xor":63,"cipher-base":65,"inherits":161}],40:[function(require,module,exports){ +},{"./aes":41,"./ghash":46,"buffer":67,"buffer-xor":66,"cipher-base":68,"inherits":164}],43:[function(require,module,exports){ var ciphers = require('./encrypter') exports.createCipher = exports.Cipher = ciphers.createCipher exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv @@ -17191,7 +17802,7 @@ function getCiphers () { } exports.listCiphers = exports.getCiphers = getCiphers -},{"./decrypter":41,"./encrypter":42,"./modes":44}],41:[function(require,module,exports){ +},{"./decrypter":44,"./encrypter":45,"./modes":47}],44:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -17332,7 +17943,7 @@ exports.createDecipher = createDecipher exports.createDecipheriv = createDecipheriv }).call(this,require("buffer").Buffer) -},{"./aes":38,"./authCipher":39,"./modes":44,"./modes/cbc":45,"./modes/cfb":46,"./modes/cfb1":47,"./modes/cfb8":48,"./modes/ctr":49,"./modes/ecb":50,"./modes/ofb":51,"./streamCipher":52,"buffer":64,"cipher-base":65,"evp_bytestokey":150,"inherits":161}],42:[function(require,module,exports){ +},{"./aes":41,"./authCipher":42,"./modes":47,"./modes/cbc":48,"./modes/cfb":49,"./modes/cfb1":50,"./modes/cfb8":51,"./modes/ctr":52,"./modes/ecb":53,"./modes/ofb":54,"./streamCipher":55,"buffer":67,"cipher-base":68,"evp_bytestokey":153,"inherits":164}],45:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -17458,7 +18069,7 @@ exports.createCipheriv = createCipheriv exports.createCipher = createCipher }).call(this,require("buffer").Buffer) -},{"./aes":38,"./authCipher":39,"./modes":44,"./modes/cbc":45,"./modes/cfb":46,"./modes/cfb1":47,"./modes/cfb8":48,"./modes/ctr":49,"./modes/ecb":50,"./modes/ofb":51,"./streamCipher":52,"buffer":64,"cipher-base":65,"evp_bytestokey":150,"inherits":161}],43:[function(require,module,exports){ +},{"./aes":41,"./authCipher":42,"./modes":47,"./modes/cbc":48,"./modes/cfb":49,"./modes/cfb1":50,"./modes/cfb8":51,"./modes/ctr":52,"./modes/ecb":53,"./modes/ofb":54,"./streamCipher":55,"buffer":67,"cipher-base":68,"evp_bytestokey":153,"inherits":164}],46:[function(require,module,exports){ (function (Buffer){ var zeros = new Buffer(16) zeros.fill(0) @@ -17560,7 +18171,7 @@ function xor (a, b) { } }).call(this,require("buffer").Buffer) -},{"buffer":64}],44:[function(require,module,exports){ +},{"buffer":67}],47:[function(require,module,exports){ exports['aes-128-ecb'] = { cipher: 'AES', key: 128, @@ -17733,7 +18344,7 @@ exports['aes-256-gcm'] = { type: 'auth' } -},{}],45:[function(require,module,exports){ +},{}],48:[function(require,module,exports){ var xor = require('buffer-xor') exports.encrypt = function (self, block) { @@ -17752,7 +18363,7 @@ exports.decrypt = function (self, block) { return xor(out, pad) } -},{"buffer-xor":63}],46:[function(require,module,exports){ +},{"buffer-xor":66}],49:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -17787,7 +18398,7 @@ function encryptStart (self, data, decrypt) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"buffer-xor":63}],47:[function(require,module,exports){ +},{"buffer":67,"buffer-xor":66}],50:[function(require,module,exports){ (function (Buffer){ function encryptByte (self, byteParam, decrypt) { var pad @@ -17825,7 +18436,7 @@ function shiftIn (buffer, value) { } }).call(this,require("buffer").Buffer) -},{"buffer":64}],48:[function(require,module,exports){ +},{"buffer":67}],51:[function(require,module,exports){ (function (Buffer){ function encryptByte (self, byteParam, decrypt) { var pad = self._cipher.encryptBlock(self._prev) @@ -17844,7 +18455,7 @@ exports.encrypt = function (self, chunk, decrypt) { } }).call(this,require("buffer").Buffer) -},{"buffer":64}],49:[function(require,module,exports){ +},{"buffer":67}],52:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -17879,7 +18490,7 @@ exports.encrypt = function (self, chunk) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"buffer-xor":63}],50:[function(require,module,exports){ +},{"buffer":67,"buffer-xor":66}],53:[function(require,module,exports){ exports.encrypt = function (self, block) { return self._cipher.encryptBlock(block) } @@ -17887,7 +18498,7 @@ exports.decrypt = function (self, block) { return self._cipher.decryptBlock(block) } -},{}],51:[function(require,module,exports){ +},{}],54:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -17907,7 +18518,7 @@ exports.encrypt = function (self, chunk) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"buffer-xor":63}],52:[function(require,module,exports){ +},{"buffer":67,"buffer-xor":66}],55:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -17936,7 +18547,7 @@ StreamCipher.prototype._final = function () { } }).call(this,require("buffer").Buffer) -},{"./aes":38,"buffer":64,"cipher-base":65,"inherits":161}],53:[function(require,module,exports){ +},{"./aes":41,"buffer":67,"cipher-base":68,"inherits":164}],56:[function(require,module,exports){ var ebtk = require('evp_bytestokey') var aes = require('browserify-aes/browser') var DES = require('browserify-des') @@ -18011,7 +18622,7 @@ function getCiphers () { } exports.listCiphers = exports.getCiphers = getCiphers -},{"browserify-aes/browser":40,"browserify-aes/modes":44,"browserify-des":54,"browserify-des/modes":55,"evp_bytestokey":150}],54:[function(require,module,exports){ +},{"browserify-aes/browser":43,"browserify-aes/modes":47,"browserify-des":57,"browserify-des/modes":58,"evp_bytestokey":153}],57:[function(require,module,exports){ (function (Buffer){ var CipherBase = require('cipher-base') var des = require('des.js') @@ -18058,7 +18669,7 @@ DES.prototype._final = function () { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"cipher-base":65,"des.js":74,"inherits":161}],55:[function(require,module,exports){ +},{"buffer":67,"cipher-base":68,"des.js":77,"inherits":164}],58:[function(require,module,exports){ exports['des-ecb'] = { key: 8, iv: 0 @@ -18084,7 +18695,7 @@ exports['des-ede'] = { iv: 0 } -},{}],56:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ (function (Buffer){ var bn = require('bn.js'); var randomBytes = require('randombytes'); @@ -18128,7 +18739,7 @@ function getr(priv) { } }).call(this,require("buffer").Buffer) -},{"bn.js":35,"buffer":64,"randombytes":445}],57:[function(require,module,exports){ +},{"bn.js":38,"buffer":67,"randombytes":448}],60:[function(require,module,exports){ (function (Buffer){ 'use strict' exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = { @@ -18204,7 +18815,7 @@ exports['RSA-MD5'] = exports.md5WithRSAEncryption = { } }).call(this,require("buffer").Buffer) -},{"buffer":64}],58:[function(require,module,exports){ +},{"buffer":67}],61:[function(require,module,exports){ (function (Buffer){ var _algos = require('./algos') var createHash = require('create-hash') @@ -18311,7 +18922,7 @@ module.exports = { } }).call(this,require("buffer").Buffer) -},{"./algos":57,"./sign":60,"./verify":61,"buffer":64,"create-hash":68,"inherits":161,"stream":489}],59:[function(require,module,exports){ +},{"./algos":60,"./sign":63,"./verify":64,"buffer":67,"create-hash":71,"inherits":164,"stream":490}],62:[function(require,module,exports){ 'use strict' exports['1.3.132.0.10'] = 'secp256k1' @@ -18325,7 +18936,7 @@ exports['1.3.132.0.34'] = 'p384' exports['1.3.132.0.35'] = 'p521' -},{}],60:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ (function (Buffer){ // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js var createHmac = require('create-hmac') @@ -18514,7 +19125,7 @@ module.exports.getKey = getKey module.exports.makeKey = makeKey }).call(this,require("buffer").Buffer) -},{"./curves":59,"bn.js":35,"browserify-rsa":56,"buffer":64,"create-hmac":71,"elliptic":84,"parse-asn1":420}],61:[function(require,module,exports){ +},{"./curves":62,"bn.js":38,"browserify-rsa":59,"buffer":67,"create-hmac":74,"elliptic":87,"parse-asn1":423}],64:[function(require,module,exports){ (function (Buffer){ // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js var curves = require('./curves') @@ -18621,7 +19232,7 @@ function checkValue (b, q) { module.exports = verify }).call(this,require("buffer").Buffer) -},{"./curves":59,"bn.js":35,"buffer":64,"elliptic":84,"parse-asn1":420}],62:[function(require,module,exports){ +},{"./curves":62,"bn.js":38,"buffer":67,"elliptic":87,"parse-asn1":423}],65:[function(require,module,exports){ (function (global){ 'use strict'; @@ -18733,7 +19344,7 @@ exports.allocUnsafeSlow = function allocUnsafeSlow(size) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"buffer":64}],63:[function(require,module,exports){ +},{"buffer":67}],66:[function(require,module,exports){ (function (Buffer){ module.exports = function xor (a, b) { var length = Math.min(a.length, b.length) @@ -18747,7 +19358,7 @@ module.exports = function xor (a, b) { } }).call(this,require("buffer").Buffer) -},{"buffer":64}],64:[function(require,module,exports){ +},{"buffer":67}],67:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -20455,7 +21066,7 @@ function isnan (val) { return val !== val // eslint-disable-line no-self-compare } -},{"base64-js":33,"ieee754":159}],65:[function(require,module,exports){ +},{"base64-js":36,"ieee754":162}],68:[function(require,module,exports){ (function (Buffer){ var Transform = require('stream').Transform var inherits = require('inherits') @@ -20549,7 +21160,7 @@ CipherBase.prototype._toString = function (value, enc, fin) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"inherits":161,"stream":489,"string_decoder":490}],66:[function(require,module,exports){ +},{"buffer":67,"inherits":164,"stream":490,"string_decoder":491}],69:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -20660,7 +21271,7 @@ function objectToString(o) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":162}],67:[function(require,module,exports){ +},{"../../is-buffer/index.js":165}],70:[function(require,module,exports){ (function (Buffer){ var elliptic = require('elliptic'); var BN = require('bn.js'); @@ -20786,7 +21397,7 @@ function formatReturnValue(bn, enc, len) { } }).call(this,require("buffer").Buffer) -},{"bn.js":35,"buffer":64,"elliptic":84}],68:[function(require,module,exports){ +},{"bn.js":38,"buffer":67,"elliptic":87}],71:[function(require,module,exports){ (function (Buffer){ 'use strict'; var inherits = require('inherits') @@ -20842,7 +21453,7 @@ module.exports = function createHash (alg) { } }).call(this,require("buffer").Buffer) -},{"./md5":70,"buffer":64,"cipher-base":65,"inherits":161,"ripemd160":479,"sha.js":482}],69:[function(require,module,exports){ +},{"./md5":73,"buffer":67,"cipher-base":68,"inherits":164,"ripemd160":480,"sha.js":483}],72:[function(require,module,exports){ (function (Buffer){ 'use strict'; var intSize = 4; @@ -20879,7 +21490,7 @@ function hash(buf, fn, hashSize, bigEndian) { } exports.hash = hash; }).call(this,require("buffer").Buffer) -},{"buffer":64}],70:[function(require,module,exports){ +},{"buffer":67}],73:[function(require,module,exports){ 'use strict'; /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message @@ -21036,7 +21647,7 @@ function bit_rol(num, cnt) module.exports = function md5(buf) { return helpers.hash(buf, core_md5, 16); }; -},{"./helpers":69}],71:[function(require,module,exports){ +},{"./helpers":72}],74:[function(require,module,exports){ (function (Buffer){ 'use strict'; var createHash = require('create-hash/browser'); @@ -21108,7 +21719,7 @@ module.exports = function createHmac(alg, key) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"create-hash/browser":68,"inherits":161,"stream":489}],72:[function(require,module,exports){ +},{"buffer":67,"create-hash/browser":71,"inherits":164,"stream":490}],75:[function(require,module,exports){ 'use strict' exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') @@ -21187,7 +21798,7 @@ var publicEncrypt = require('public-encrypt') } }) -},{"browserify-cipher":53,"browserify-sign":58,"browserify-sign/algos":57,"create-ecdh":67,"create-hash":68,"create-hmac":71,"diffie-hellman":80,"pbkdf2":421,"public-encrypt":429,"randombytes":445}],73:[function(require,module,exports){ +},{"browserify-cipher":56,"browserify-sign":61,"browserify-sign/algos":60,"create-ecdh":70,"create-hash":71,"create-hmac":74,"diffie-hellman":83,"pbkdf2":424,"public-encrypt":432,"randombytes":448}],76:[function(require,module,exports){ 'use strict'; var assign = require('es5-ext/object/assign') @@ -21252,7 +21863,7 @@ d.gs = function (dscr, get, set/*, options*/) { return !options ? desc : assign(normalizeOpts(options), desc); }; -},{"es5-ext/object/assign":119,"es5-ext/object/is-callable":123,"es5-ext/object/normalize-options":131,"es5-ext/string/#/contains":138}],74:[function(require,module,exports){ +},{"es5-ext/object/assign":122,"es5-ext/object/is-callable":126,"es5-ext/object/normalize-options":134,"es5-ext/string/#/contains":141}],77:[function(require,module,exports){ 'use strict'; exports.utils = require('./des/utils'); @@ -21261,7 +21872,7 @@ exports.DES = require('./des/des'); exports.CBC = require('./des/cbc'); exports.EDE = require('./des/ede'); -},{"./des/cbc":75,"./des/cipher":76,"./des/des":77,"./des/ede":78,"./des/utils":79}],75:[function(require,module,exports){ +},{"./des/cbc":78,"./des/cipher":79,"./des/des":80,"./des/ede":81,"./des/utils":82}],78:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -21328,7 +21939,7 @@ proto._update = function _update(inp, inOff, out, outOff) { } }; -},{"inherits":161,"minimalistic-assert":412}],76:[function(require,module,exports){ +},{"inherits":164,"minimalistic-assert":415}],79:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -21471,7 +22082,7 @@ Cipher.prototype._finalDecrypt = function _finalDecrypt() { return this._unpad(out); }; -},{"minimalistic-assert":412}],77:[function(require,module,exports){ +},{"minimalistic-assert":415}],80:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -21616,7 +22227,7 @@ DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { utils.rip(l, r, out, off); }; -},{"../des":74,"inherits":161,"minimalistic-assert":412}],78:[function(require,module,exports){ +},{"../des":77,"inherits":164,"minimalistic-assert":415}],81:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -21673,7 +22284,7 @@ EDE.prototype._update = function _update(inp, inOff, out, outOff) { EDE.prototype._pad = DES.prototype._pad; EDE.prototype._unpad = DES.prototype._unpad; -},{"../des":74,"inherits":161,"minimalistic-assert":412}],79:[function(require,module,exports){ +},{"../des":77,"inherits":164,"minimalistic-assert":415}],82:[function(require,module,exports){ 'use strict'; exports.readUInt32BE = function readUInt32BE(bytes, off) { @@ -21931,7 +22542,7 @@ exports.padSplit = function padSplit(num, size, group) { return out.join(' '); }; -},{}],80:[function(require,module,exports){ +},{}],83:[function(require,module,exports){ (function (Buffer){ var generatePrime = require('./lib/generatePrime') var primes = require('./lib/primes.json') @@ -21977,7 +22588,7 @@ exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffi exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman }).call(this,require("buffer").Buffer) -},{"./lib/dh":81,"./lib/generatePrime":82,"./lib/primes.json":83,"buffer":64}],81:[function(require,module,exports){ +},{"./lib/dh":84,"./lib/generatePrime":85,"./lib/primes.json":86,"buffer":67}],84:[function(require,module,exports){ (function (Buffer){ var BN = require('bn.js'); var MillerRabin = require('miller-rabin'); @@ -22145,7 +22756,7 @@ function formatReturnValue(bn, enc) { } }).call(this,require("buffer").Buffer) -},{"./generatePrime":82,"bn.js":35,"buffer":64,"miller-rabin":411,"randombytes":445}],82:[function(require,module,exports){ +},{"./generatePrime":85,"bn.js":38,"buffer":67,"miller-rabin":414,"randombytes":448}],85:[function(require,module,exports){ var randomBytes = require('randombytes'); module.exports = findPrime; findPrime.simpleSieve = simpleSieve; @@ -22252,7 +22863,7 @@ function findPrime(bits, gen) { } -},{"bn.js":35,"miller-rabin":411,"randombytes":445}],83:[function(require,module,exports){ +},{"bn.js":38,"miller-rabin":414,"randombytes":448}],86:[function(require,module,exports){ module.exports={ "modp1": { "gen": "02", @@ -22287,7 +22898,7 @@ module.exports={ "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" } } -},{}],84:[function(require,module,exports){ +},{}],87:[function(require,module,exports){ 'use strict'; var elliptic = exports; @@ -22302,7 +22913,7 @@ elliptic.curves = require('./elliptic/curves'); elliptic.ec = require('./elliptic/ec'); elliptic.eddsa = require('./elliptic/eddsa'); -},{"../package.json":99,"./elliptic/curve":87,"./elliptic/curves":90,"./elliptic/ec":91,"./elliptic/eddsa":94,"./elliptic/utils":98,"brorand":36}],85:[function(require,module,exports){ +},{"../package.json":102,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,"brorand":39}],88:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -22679,7 +23290,7 @@ BasePoint.prototype.dblp = function dblp(k) { return r; }; -},{"../../elliptic":84,"bn.js":35}],86:[function(require,module,exports){ +},{"../../elliptic":87,"bn.js":38}],89:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -23114,7 +23725,7 @@ Point.prototype.eqXToP = function eqXToP(x) { Point.prototype.toP = Point.prototype.normalize; Point.prototype.mixedAdd = Point.prototype.add; -},{"../../elliptic":84,"../curve":87,"bn.js":35,"inherits":161}],87:[function(require,module,exports){ +},{"../../elliptic":87,"../curve":90,"bn.js":38,"inherits":164}],90:[function(require,module,exports){ 'use strict'; var curve = exports; @@ -23124,7 +23735,7 @@ curve.short = require('./short'); curve.mont = require('./mont'); curve.edwards = require('./edwards'); -},{"./base":85,"./edwards":86,"./mont":88,"./short":89}],88:[function(require,module,exports){ +},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -23306,7 +23917,7 @@ Point.prototype.getX = function getX() { return this.x.fromRed(); }; -},{"../../elliptic":84,"../curve":87,"bn.js":35,"inherits":161}],89:[function(require,module,exports){ +},{"../../elliptic":87,"../curve":90,"bn.js":38,"inherits":164}],92:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -24246,7 +24857,7 @@ JPoint.prototype.isInfinity = function isInfinity() { return this.z.cmpn(0) === 0; }; -},{"../../elliptic":84,"../curve":87,"bn.js":35,"inherits":161}],90:[function(require,module,exports){ +},{"../../elliptic":87,"../curve":90,"bn.js":38,"inherits":164}],93:[function(require,module,exports){ 'use strict'; var curves = exports; @@ -24453,7 +25064,7 @@ defineCurve('secp256k1', { ] }); -},{"../elliptic":84,"./precomputed/secp256k1":97,"hash.js":152}],91:[function(require,module,exports){ +},{"../elliptic":87,"./precomputed/secp256k1":100,"hash.js":155}],94:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -24695,7 +25306,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { throw new Error('Unable to find valid recovery factor'); }; -},{"../../elliptic":84,"./key":92,"./signature":93,"bn.js":35,"hmac-drbg":158}],92:[function(require,module,exports){ +},{"../../elliptic":87,"./key":95,"./signature":96,"bn.js":38,"hmac-drbg":161}],95:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -24816,7 +25427,7 @@ KeyPair.prototype.inspect = function inspect() { ' pub: ' + (this.pub && this.pub.inspect()) + ' >'; }; -},{"../../elliptic":84,"bn.js":35}],93:[function(require,module,exports){ +},{"../../elliptic":87,"bn.js":38}],96:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -24953,7 +25564,7 @@ Signature.prototype.toDER = function toDER(enc) { return utils.encode(res, enc); }; -},{"../../elliptic":84,"bn.js":35}],94:[function(require,module,exports){ +},{"../../elliptic":87,"bn.js":38}],97:[function(require,module,exports){ 'use strict'; var hash = require('hash.js'); @@ -25073,7 +25684,7 @@ EDDSA.prototype.isPoint = function isPoint(val) { return val instanceof this.pointClass; }; -},{"../../elliptic":84,"./key":95,"./signature":96,"hash.js":152}],95:[function(require,module,exports){ +},{"../../elliptic":87,"./key":98,"./signature":99,"hash.js":155}],98:[function(require,module,exports){ 'use strict'; var elliptic = require('../../elliptic'); @@ -25171,7 +25782,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) { module.exports = KeyPair; -},{"../../elliptic":84}],96:[function(require,module,exports){ +},{"../../elliptic":87}],99:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -25239,7 +25850,7 @@ Signature.prototype.toHex = function toHex() { module.exports = Signature; -},{"../../elliptic":84,"bn.js":35}],97:[function(require,module,exports){ +},{"../../elliptic":87,"bn.js":38}],100:[function(require,module,exports){ module.exports = { doubles: { step: 4, @@ -26021,7 +26632,7 @@ module.exports = { } }; -},{}],98:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -26143,7 +26754,7 @@ function intFromLE(bytes) { utils.intFromLE = intFromLE; -},{"bn.js":35,"minimalistic-assert":412,"minimalistic-crypto-utils":413}],99:[function(require,module,exports){ +},{"bn.js":38,"minimalistic-assert":415,"minimalistic-crypto-utils":416}],102:[function(require,module,exports){ module.exports={ "name": "elliptic", "version": "6.4.0", @@ -26203,7 +26814,7 @@ module.exports={ } } -},{}],100:[function(require,module,exports){ +},{}],103:[function(require,module,exports){ "use strict"; var numberIsNaN = require("../../number/is-nan") @@ -26233,14 +26844,14 @@ module.exports = function (searchElement /*, fromIndex*/) { return -1; }; -},{"../../number/is-nan":113,"../../number/to-pos-integer":117,"../../object/valid-value":134}],101:[function(require,module,exports){ +},{"../../number/is-nan":116,"../../number/to-pos-integer":120,"../../object/valid-value":137}],104:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Array.from : require("./shim"); -},{"./is-implemented":102,"./shim":103}],102:[function(require,module,exports){ +},{"./is-implemented":105,"./shim":106}],105:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -26251,7 +26862,7 @@ module.exports = function () { return Boolean(result && (result !== arr) && (result[1] === "dwa")); }; -},{}],103:[function(require,module,exports){ +},{}],106:[function(require,module,exports){ "use strict"; var iteratorSymbol = require("es6-symbol").iterator @@ -26372,7 +26983,7 @@ module.exports = function (arrayLike /*, mapFn, thisArg*/) { return arr; }; -},{"../../function/is-arguments":107,"../../function/is-function":108,"../../number/to-pos-integer":117,"../../object/is-value":125,"../../object/valid-callable":133,"../../object/valid-value":134,"../../string/is-string":141,"es6-symbol":143}],104:[function(require,module,exports){ +},{"../../function/is-arguments":110,"../../function/is-function":111,"../../number/to-pos-integer":120,"../../object/is-value":128,"../../object/valid-callable":136,"../../object/valid-value":137,"../../string/is-string":144,"es6-symbol":146}],107:[function(require,module,exports){ "use strict"; var from = require("./from") @@ -26383,7 +26994,7 @@ module.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); }; -},{"./from":101}],105:[function(require,module,exports){ +},{"./from":104}],108:[function(require,module,exports){ "use strict"; var assign = require("../object/assign") @@ -26405,7 +27016,7 @@ exports = module.exports = function (message /*, code, ext*/) { return err; }; -},{"../object/assign":119,"../object/is-object":124,"../object/is-value":125}],106:[function(require,module,exports){ +},{"../object/assign":122,"../object/is-object":127,"../object/is-value":128}],109:[function(require,module,exports){ "use strict"; var toPosInt = require("../number/to-pos-integer"); @@ -26463,7 +27074,7 @@ if (test.length === 1) { }; } -},{"../number/to-pos-integer":117,"../object/mixin":130}],107:[function(require,module,exports){ +},{"../number/to-pos-integer":120,"../object/mixin":133}],110:[function(require,module,exports){ "use strict"; var objToString = Object.prototype.toString @@ -26477,7 +27088,7 @@ module.exports = function (value) { return objToString.call(value) === id; }; -},{}],108:[function(require,module,exports){ +},{}],111:[function(require,module,exports){ "use strict"; var objToString = Object.prototype.toString, id = objToString.call(require("./noop")); @@ -26486,20 +27097,20 @@ module.exports = function (value) { return typeof value === "function" && objToString.call(value) === id; }; -},{"./noop":109}],109:[function(require,module,exports){ +},{"./noop":112}],112:[function(require,module,exports){ "use strict"; // eslint-disable-next-line no-empty-function module.exports = function () {}; -},{}],110:[function(require,module,exports){ +},{}],113:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Math.sign : require("./shim"); -},{"./is-implemented":111,"./shim":112}],111:[function(require,module,exports){ +},{"./is-implemented":114,"./shim":115}],114:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -26508,7 +27119,7 @@ module.exports = function () { return (sign(10) === 1) && (sign(-20) === -1); }; -},{}],112:[function(require,module,exports){ +},{}],115:[function(require,module,exports){ "use strict"; module.exports = function (value) { @@ -26517,14 +27128,14 @@ module.exports = function (value) { return value > 0 ? 1 : -1; }; -},{}],113:[function(require,module,exports){ +},{}],116:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Number.isNaN : require("./shim"); -},{"./is-implemented":114,"./shim":115}],114:[function(require,module,exports){ +},{"./is-implemented":117,"./shim":118}],117:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -26533,7 +27144,7 @@ module.exports = function () { return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); }; -},{}],115:[function(require,module,exports){ +},{}],118:[function(require,module,exports){ "use strict"; module.exports = function (value) { @@ -26541,7 +27152,7 @@ module.exports = function (value) { return value !== value; }; -},{}],116:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ "use strict"; var sign = require("../math/sign") @@ -26555,7 +27166,7 @@ module.exports = function (value) { return sign(value) * floor(abs(value)); }; -},{"../math/sign":110}],117:[function(require,module,exports){ +},{"../math/sign":113}],120:[function(require,module,exports){ "use strict"; var toInteger = require("./to-integer") @@ -26566,7 +27177,7 @@ module.exports = function (value) { return max(0, toInteger(value)); }; -},{"./to-integer":116}],118:[function(require,module,exports){ +},{"./to-integer":119}],121:[function(require,module,exports){ // Internal method, used by iteration functions. // Calls a function for each key-value pair found in object // Optionally takes compareFn to iterate object in specific order @@ -26598,14 +27209,14 @@ module.exports = function (method, defVal) { }; }; -},{"./valid-callable":133,"./valid-value":134}],119:[function(require,module,exports){ +},{"./valid-callable":136,"./valid-value":137}],122:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Object.assign : require("./shim"); -},{"./is-implemented":120,"./shim":121}],120:[function(require,module,exports){ +},{"./is-implemented":123,"./shim":124}],123:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -26616,7 +27227,7 @@ module.exports = function () { return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy"; }; -},{}],121:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ "use strict"; var keys = require("../keys") @@ -26641,12 +27252,12 @@ module.exports = function (dest, src /*, …srcn*/) { return dest; }; -},{"../keys":126,"../valid-value":134}],122:[function(require,module,exports){ +},{"../keys":129,"../valid-value":137}],125:[function(require,module,exports){ "use strict"; module.exports = require("./_iterate")("forEach"); -},{"./_iterate":118}],123:[function(require,module,exports){ +},{"./_iterate":121}],126:[function(require,module,exports){ // Deprecated "use strict"; @@ -26655,7 +27266,7 @@ module.exports = function (obj) { return typeof obj === "function"; }; -},{}],124:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ "use strict"; var isValue = require("./is-value"); @@ -26666,7 +27277,7 @@ module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; }; -},{"./is-value":125}],125:[function(require,module,exports){ +},{"./is-value":128}],128:[function(require,module,exports){ "use strict"; var _undefined = require("../function/noop")(); // Support ES3 engines @@ -26675,14 +27286,14 @@ module.exports = function (val) { return (val !== _undefined) && (val !== null); }; -},{"../function/noop":109}],126:[function(require,module,exports){ +},{"../function/noop":112}],129:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); -},{"./is-implemented":127,"./shim":128}],127:[function(require,module,exports){ +},{"./is-implemented":130,"./shim":131}],130:[function(require,module,exports){ "use strict"; module.exports = function () { @@ -26694,7 +27305,7 @@ module.exports = function () { } }; -},{}],128:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ "use strict"; var isValue = require("../is-value"); @@ -26705,7 +27316,7 @@ module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; -},{"../is-value":125}],129:[function(require,module,exports){ +},{"../is-value":128}],132:[function(require,module,exports){ "use strict"; var callable = require("./valid-callable") @@ -26721,7 +27332,7 @@ module.exports = function (obj, cb /*, thisArg*/) { return result; }; -},{"./for-each":122,"./valid-callable":133}],130:[function(require,module,exports){ +},{"./for-each":125,"./valid-callable":136}],133:[function(require,module,exports){ "use strict"; var value = require("./valid-value") @@ -26754,7 +27365,7 @@ module.exports = function (target, source) { return target; }; -},{"./valid-value":134}],131:[function(require,module,exports){ +},{"./valid-value":137}],134:[function(require,module,exports){ "use strict"; var isValue = require("./is-value"); @@ -26776,7 +27387,7 @@ module.exports = function (opts1 /*, …options*/) { return result; }; -},{"./is-value":125}],132:[function(require,module,exports){ +},{"./is-value":128}],135:[function(require,module,exports){ "use strict"; var forEach = Array.prototype.forEach, create = Object.create; @@ -26790,7 +27401,7 @@ module.exports = function (arg /*, …args*/) { return set; }; -},{}],133:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ "use strict"; module.exports = function (fn) { @@ -26798,7 +27409,7 @@ module.exports = function (fn) { return fn; }; -},{}],134:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ "use strict"; var isValue = require("./is-value"); @@ -26808,7 +27419,7 @@ module.exports = function (value) { return value; }; -},{"./is-value":125}],135:[function(require,module,exports){ +},{"./is-value":128}],138:[function(require,module,exports){ "use strict"; var ensureValue = require("./valid-value") @@ -26818,7 +27429,7 @@ module.exports = function (value) { return stringifiable(ensureValue(value)); }; -},{"./valid-value":134,"./validate-stringifiable":136}],136:[function(require,module,exports){ +},{"./valid-value":137,"./validate-stringifiable":139}],139:[function(require,module,exports){ "use strict"; var isCallable = require("./is-callable"); @@ -26832,7 +27443,7 @@ module.exports = function (stringifiable) { } }; -},{"./is-callable":123}],137:[function(require,module,exports){ +},{"./is-callable":126}],140:[function(require,module,exports){ "use strict"; var isCallable = require("./object/is-callable"); @@ -26846,14 +27457,14 @@ module.exports = function (value) { } }; -},{"./object/is-callable":123}],138:[function(require,module,exports){ +},{"./object/is-callable":126}],141:[function(require,module,exports){ "use strict"; module.exports = require("./is-implemented")() ? String.prototype.contains : require("./shim"); -},{"./is-implemented":139,"./shim":140}],139:[function(require,module,exports){ +},{"./is-implemented":142,"./shim":143}],142:[function(require,module,exports){ "use strict"; var str = "razdwatrzy"; @@ -26863,7 +27474,7 @@ module.exports = function () { return (str.contains("dwa") === true) && (str.contains("foo") === false); }; -},{}],140:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ "use strict"; var indexOf = String.prototype.indexOf; @@ -26872,7 +27483,7 @@ module.exports = function (searchString/*, position*/) { return indexOf.call(this, searchString, arguments[1]) > -1; }; -},{}],141:[function(require,module,exports){ +},{}],144:[function(require,module,exports){ "use strict"; var objToString = Object.prototype.toString, id = objToString.call(""); @@ -26887,7 +27498,7 @@ module.exports = function (value) { ); }; -},{}],142:[function(require,module,exports){ +},{}],145:[function(require,module,exports){ "use strict"; var safeToString = require("./safe-to-string"); @@ -26905,12 +27516,12 @@ module.exports = function (value) { return string; }; -},{"./safe-to-string":137}],143:[function(require,module,exports){ +},{"./safe-to-string":140}],146:[function(require,module,exports){ 'use strict'; module.exports = require('./is-implemented')() ? Symbol : require('./polyfill'); -},{"./is-implemented":144,"./polyfill":146}],144:[function(require,module,exports){ +},{"./is-implemented":147,"./polyfill":149}],147:[function(require,module,exports){ 'use strict'; var validTypes = { object: true, symbol: true }; @@ -26929,7 +27540,7 @@ module.exports = function () { return true; }; -},{}],145:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ 'use strict'; module.exports = function (x) { @@ -26940,7 +27551,7 @@ module.exports = function (x) { return (x[x.constructor.toStringTag] === 'Symbol'); }; -},{}],146:[function(require,module,exports){ +},{}],149:[function(require,module,exports){ // ES2015 Symbol polyfill for environments that do not (or partially) support it 'use strict'; @@ -27060,7 +27671,7 @@ defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); -},{"./validate-symbol":147,"d":73}],147:[function(require,module,exports){ +},{"./validate-symbol":150,"d":76}],150:[function(require,module,exports){ 'use strict'; var isSymbol = require('./is-symbol'); @@ -27070,7 +27681,7 @@ module.exports = function (value) { return value; }; -},{"./is-symbol":145}],148:[function(require,module,exports){ +},{"./is-symbol":148}],151:[function(require,module,exports){ 'use strict'; var d = require('d') @@ -27204,7 +27815,7 @@ module.exports = exports = function (o) { }; exports.methods = methods; -},{"d":73,"es5-ext/object/valid-callable":133}],149:[function(require,module,exports){ +},{"d":76,"es5-ext/object/valid-callable":136}],152:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -27508,7 +28119,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],150:[function(require,module,exports){ +},{}],153:[function(require,module,exports){ (function (Buffer){ var md5 = require('create-hash/md5') module.exports = EVP_BytesToKey @@ -27580,7 +28191,7 @@ function EVP_BytesToKey (password, salt, keyLen, ivLen) { } }).call(this,require("buffer").Buffer) -},{"buffer":64,"create-hash/md5":70}],151:[function(require,module,exports){ +},{"buffer":67,"create-hash/md5":73}],154:[function(require,module,exports){ (function (self) { 'use strict'; @@ -28081,7 +28692,7 @@ function EVP_BytesToKey (password, salt, keyLen, ivLen) { }(typeof self === 'undefined' ? this : self)); -},{}],152:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ var hash = exports; hash.utils = require('./hash/utils'); @@ -28098,7 +28709,7 @@ hash.sha384 = hash.sha.sha384; hash.sha512 = hash.sha.sha512; hash.ripemd160 = hash.ripemd.ripemd160; -},{"./hash/common":153,"./hash/hmac":154,"./hash/ripemd":155,"./hash/sha":156,"./hash/utils":157}],153:[function(require,module,exports){ +},{"./hash/common":156,"./hash/hmac":157,"./hash/ripemd":158,"./hash/sha":159,"./hash/utils":160}],156:[function(require,module,exports){ var hash = require('../hash'); var utils = hash.utils; var assert = utils.assert; @@ -28191,7 +28802,7 @@ BlockHash.prototype._pad = function pad() { return res; }; -},{"../hash":152}],154:[function(require,module,exports){ +},{"../hash":155}],157:[function(require,module,exports){ var hmac = exports; var hash = require('../hash'); @@ -28241,7 +28852,7 @@ Hmac.prototype.digest = function digest(enc) { return this.outer.digest(enc); }; -},{"../hash":152}],155:[function(require,module,exports){ +},{"../hash":155}],158:[function(require,module,exports){ var hash = require('../hash'); var utils = hash.utils; @@ -28387,7 +28998,7 @@ var sh = [ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]; -},{"../hash":152}],156:[function(require,module,exports){ +},{"../hash":155}],159:[function(require,module,exports){ var hash = require('../hash'); var utils = hash.utils; var assert = utils.assert; @@ -28953,7 +29564,7 @@ function g1_512_lo(xh, xl) { return r; } -},{"../hash":152}],157:[function(require,module,exports){ +},{"../hash":155}],160:[function(require,module,exports){ var utils = exports; var inherits = require('inherits'); @@ -29212,7 +29823,7 @@ function shr64_lo(ah, al, num) { }; exports.shr64_lo = shr64_lo; -},{"inherits":161}],158:[function(require,module,exports){ +},{"inherits":164}],161:[function(require,module,exports){ 'use strict'; var hash = require('hash.js'); @@ -29327,7 +29938,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { return utils.encode(res, enc); }; -},{"hash.js":152,"minimalistic-assert":412,"minimalistic-crypto-utils":413}],159:[function(require,module,exports){ +},{"hash.js":155,"minimalistic-assert":415,"minimalistic-crypto-utils":416}],162:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -29413,7 +30024,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],160:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ var indexOf = [].indexOf; @@ -29424,7 +30035,7 @@ module.exports = function(arr, obj){ } return -1; }; -},{}],161:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -29449,7 +30060,7 @@ if (typeof Object.create === 'function') { } } -},{}],162:[function(require,module,exports){ +},{}],165:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -29472,14 +30083,14 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],163:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = isPromise; function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } -},{}],164:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ /** * The code was extracted from: * https://github.com/davidchambers/Base64.js @@ -29519,7 +30130,7 @@ function polyfill (input) { module.exports = typeof window !== 'undefined' && window.atob && window.atob.bind(window) || polyfill; -},{}],165:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ var atob = require('./atob'); function b64DecodeUnicode(str) { @@ -29554,7 +30165,7 @@ module.exports = function(str) { } }; -},{"./atob":164}],166:[function(require,module,exports){ +},{"./atob":167}],169:[function(require,module,exports){ 'use strict'; var base64_url_decode = require('./base64_url_decode'); @@ -29582,7 +30193,7 @@ module.exports = function (token,options) { module.exports.InvalidTokenError = InvalidTokenError; -},{"./base64_url_decode":165}],167:[function(require,module,exports){ +},{"./base64_url_decode":168}],170:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -29591,7 +30202,7 @@ var DataView = getNative(root, 'DataView'); module.exports = DataView; -},{"./_getNative":269,"./_root":314}],168:[function(require,module,exports){ +},{"./_getNative":272,"./_root":317}],171:[function(require,module,exports){ var hashClear = require('./_hashClear'), hashDelete = require('./_hashDelete'), hashGet = require('./_hashGet'), @@ -29625,7 +30236,7 @@ Hash.prototype.set = hashSet; module.exports = Hash; -},{"./_hashClear":278,"./_hashDelete":279,"./_hashGet":280,"./_hashHas":281,"./_hashSet":282}],169:[function(require,module,exports){ +},{"./_hashClear":281,"./_hashDelete":282,"./_hashGet":283,"./_hashHas":284,"./_hashSet":285}],172:[function(require,module,exports){ var listCacheClear = require('./_listCacheClear'), listCacheDelete = require('./_listCacheDelete'), listCacheGet = require('./_listCacheGet'), @@ -29659,7 +30270,7 @@ ListCache.prototype.set = listCacheSet; module.exports = ListCache; -},{"./_listCacheClear":294,"./_listCacheDelete":295,"./_listCacheGet":296,"./_listCacheHas":297,"./_listCacheSet":298}],170:[function(require,module,exports){ +},{"./_listCacheClear":297,"./_listCacheDelete":298,"./_listCacheGet":299,"./_listCacheHas":300,"./_listCacheSet":301}],173:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -29668,7 +30279,7 @@ var Map = getNative(root, 'Map'); module.exports = Map; -},{"./_getNative":269,"./_root":314}],171:[function(require,module,exports){ +},{"./_getNative":272,"./_root":317}],174:[function(require,module,exports){ var mapCacheClear = require('./_mapCacheClear'), mapCacheDelete = require('./_mapCacheDelete'), mapCacheGet = require('./_mapCacheGet'), @@ -29702,7 +30313,7 @@ MapCache.prototype.set = mapCacheSet; module.exports = MapCache; -},{"./_mapCacheClear":299,"./_mapCacheDelete":300,"./_mapCacheGet":301,"./_mapCacheHas":302,"./_mapCacheSet":303}],172:[function(require,module,exports){ +},{"./_mapCacheClear":302,"./_mapCacheDelete":303,"./_mapCacheGet":304,"./_mapCacheHas":305,"./_mapCacheSet":306}],175:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -29711,7 +30322,7 @@ var Promise = getNative(root, 'Promise'); module.exports = Promise; -},{"./_getNative":269,"./_root":314}],173:[function(require,module,exports){ +},{"./_getNative":272,"./_root":317}],176:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -29720,7 +30331,7 @@ var Set = getNative(root, 'Set'); module.exports = Set; -},{"./_getNative":269,"./_root":314}],174:[function(require,module,exports){ +},{"./_getNative":272,"./_root":317}],177:[function(require,module,exports){ var MapCache = require('./_MapCache'), setCacheAdd = require('./_setCacheAdd'), setCacheHas = require('./_setCacheHas'); @@ -29749,7 +30360,7 @@ SetCache.prototype.has = setCacheHas; module.exports = SetCache; -},{"./_MapCache":171,"./_setCacheAdd":315,"./_setCacheHas":316}],175:[function(require,module,exports){ +},{"./_MapCache":174,"./_setCacheAdd":318,"./_setCacheHas":319}],178:[function(require,module,exports){ var ListCache = require('./_ListCache'), stackClear = require('./_stackClear'), stackDelete = require('./_stackDelete'), @@ -29778,7 +30389,7 @@ Stack.prototype.set = stackSet; module.exports = Stack; -},{"./_ListCache":169,"./_stackClear":320,"./_stackDelete":321,"./_stackGet":322,"./_stackHas":323,"./_stackSet":324}],176:[function(require,module,exports){ +},{"./_ListCache":172,"./_stackClear":323,"./_stackDelete":324,"./_stackGet":325,"./_stackHas":326,"./_stackSet":327}],179:[function(require,module,exports){ var root = require('./_root'); /** Built-in value references. */ @@ -29786,7 +30397,7 @@ var Symbol = root.Symbol; module.exports = Symbol; -},{"./_root":314}],177:[function(require,module,exports){ +},{"./_root":317}],180:[function(require,module,exports){ var root = require('./_root'); /** Built-in value references. */ @@ -29794,7 +30405,7 @@ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; -},{"./_root":314}],178:[function(require,module,exports){ +},{"./_root":317}],181:[function(require,module,exports){ var getNative = require('./_getNative'), root = require('./_root'); @@ -29803,7 +30414,7 @@ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; -},{"./_getNative":269,"./_root":314}],179:[function(require,module,exports){ +},{"./_getNative":272,"./_root":317}],182:[function(require,module,exports){ /** * Adds the key-value `pair` to `map`. * @@ -29820,7 +30431,7 @@ function addMapEntry(map, pair) { module.exports = addMapEntry; -},{}],180:[function(require,module,exports){ +},{}],183:[function(require,module,exports){ /** * Adds `value` to `set`. * @@ -29837,7 +30448,7 @@ function addSetEntry(set, value) { module.exports = addSetEntry; -},{}],181:[function(require,module,exports){ +},{}],184:[function(require,module,exports){ /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -29860,7 +30471,7 @@ function apply(func, thisArg, args) { module.exports = apply; -},{}],182:[function(require,module,exports){ +},{}],185:[function(require,module,exports){ /** * A specialized version of `baseAggregator` for arrays. * @@ -29884,7 +30495,7 @@ function arrayAggregator(array, setter, iteratee, accumulator) { module.exports = arrayAggregator; -},{}],183:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. @@ -29908,7 +30519,7 @@ function arrayEach(array, iteratee) { module.exports = arrayEach; -},{}],184:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -29935,7 +30546,7 @@ function arrayFilter(array, predicate) { module.exports = arrayFilter; -},{}],185:[function(require,module,exports){ +},{}],188:[function(require,module,exports){ var baseIndexOf = require('./_baseIndexOf'); /** @@ -29954,7 +30565,7 @@ function arrayIncludes(array, value) { module.exports = arrayIncludes; -},{"./_baseIndexOf":212}],186:[function(require,module,exports){ +},{"./_baseIndexOf":215}],189:[function(require,module,exports){ /** * This function is like `arrayIncludes` except that it accepts a comparator. * @@ -29978,7 +30589,7 @@ function arrayIncludesWith(array, value, comparator) { module.exports = arrayIncludesWith; -},{}],187:[function(require,module,exports){ +},{}],190:[function(require,module,exports){ var baseTimes = require('./_baseTimes'), isArguments = require('./isArguments'), isArray = require('./isArray'), @@ -30029,7 +30640,7 @@ function arrayLikeKeys(value, inherited) { module.exports = arrayLikeKeys; -},{"./_baseTimes":232,"./_isIndex":287,"./isArguments":349,"./isArray":350,"./isBuffer":354,"./isTypedArray":365}],188:[function(require,module,exports){ +},{"./_baseTimes":235,"./_isIndex":290,"./isArguments":352,"./isArray":353,"./isBuffer":357,"./isTypedArray":368}],191:[function(require,module,exports){ /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. @@ -30052,7 +30663,7 @@ function arrayMap(array, iteratee) { module.exports = arrayMap; -},{}],189:[function(require,module,exports){ +},{}],192:[function(require,module,exports){ /** * Appends the elements of `values` to `array`. * @@ -30074,7 +30685,7 @@ function arrayPush(array, values) { module.exports = arrayPush; -},{}],190:[function(require,module,exports){ +},{}],193:[function(require,module,exports){ /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. @@ -30102,7 +30713,7 @@ function arrayReduce(array, iteratee, accumulator, initAccum) { module.exports = arrayReduce; -},{}],191:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. @@ -30127,7 +30738,7 @@ function arraySome(array, predicate) { module.exports = arraySome; -},{}],192:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ var baseProperty = require('./_baseProperty'); /** @@ -30141,7 +30752,7 @@ var asciiSize = baseProperty('length'); module.exports = asciiSize; -},{"./_baseProperty":227}],193:[function(require,module,exports){ +},{"./_baseProperty":230}],196:[function(require,module,exports){ var baseAssignValue = require('./_baseAssignValue'), eq = require('./eq'); @@ -30171,7 +30782,7 @@ function assignValue(object, key, value) { module.exports = assignValue; -},{"./_baseAssignValue":198,"./eq":338}],194:[function(require,module,exports){ +},{"./_baseAssignValue":201,"./eq":341}],197:[function(require,module,exports){ var eq = require('./eq'); /** @@ -30194,7 +30805,7 @@ function assocIndexOf(array, key) { module.exports = assocIndexOf; -},{"./eq":338}],195:[function(require,module,exports){ +},{"./eq":341}],198:[function(require,module,exports){ var baseEach = require('./_baseEach'); /** @@ -30217,7 +30828,7 @@ function baseAggregator(collection, setter, iteratee, accumulator) { module.exports = baseAggregator; -},{"./_baseEach":202}],196:[function(require,module,exports){ +},{"./_baseEach":205}],199:[function(require,module,exports){ var copyObject = require('./_copyObject'), keys = require('./keys'); @@ -30236,7 +30847,7 @@ function baseAssign(object, source) { module.exports = baseAssign; -},{"./_copyObject":249,"./keys":366}],197:[function(require,module,exports){ +},{"./_copyObject":252,"./keys":369}],200:[function(require,module,exports){ var copyObject = require('./_copyObject'), keysIn = require('./keysIn'); @@ -30255,7 +30866,7 @@ function baseAssignIn(object, source) { module.exports = baseAssignIn; -},{"./_copyObject":249,"./keysIn":367}],198:[function(require,module,exports){ +},{"./_copyObject":252,"./keysIn":370}],201:[function(require,module,exports){ var defineProperty = require('./_defineProperty'); /** @@ -30282,7 +30893,7 @@ function baseAssignValue(object, key, value) { module.exports = baseAssignValue; -},{"./_defineProperty":260}],199:[function(require,module,exports){ +},{"./_defineProperty":263}],202:[function(require,module,exports){ var Stack = require('./_Stack'), arrayEach = require('./_arrayEach'), assignValue = require('./_assignValue'), @@ -30437,7 +31048,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) { module.exports = baseClone; -},{"./_Stack":175,"./_arrayEach":183,"./_assignValue":193,"./_baseAssign":196,"./_baseAssignIn":197,"./_cloneBuffer":241,"./_copyArray":248,"./_copySymbols":250,"./_copySymbolsIn":251,"./_getAllKeys":265,"./_getAllKeysIn":266,"./_getTag":274,"./_initCloneArray":283,"./_initCloneByTag":284,"./_initCloneObject":285,"./isArray":350,"./isBuffer":354,"./isObject":361,"./keys":366}],200:[function(require,module,exports){ +},{"./_Stack":178,"./_arrayEach":186,"./_assignValue":196,"./_baseAssign":199,"./_baseAssignIn":200,"./_cloneBuffer":244,"./_copyArray":251,"./_copySymbols":253,"./_copySymbolsIn":254,"./_getAllKeys":268,"./_getAllKeysIn":269,"./_getTag":277,"./_initCloneArray":286,"./_initCloneByTag":287,"./_initCloneObject":288,"./isArray":353,"./isBuffer":357,"./isObject":364,"./keys":369}],203:[function(require,module,exports){ var isObject = require('./isObject'); /** Built-in value references. */ @@ -30469,7 +31080,7 @@ var baseCreate = (function() { module.exports = baseCreate; -},{"./isObject":361}],201:[function(require,module,exports){ +},{"./isObject":364}],204:[function(require,module,exports){ var SetCache = require('./_SetCache'), arrayIncludes = require('./_arrayIncludes'), arrayIncludesWith = require('./_arrayIncludesWith'), @@ -30538,7 +31149,7 @@ function baseDifference(array, values, iteratee, comparator) { module.exports = baseDifference; -},{"./_SetCache":174,"./_arrayIncludes":185,"./_arrayIncludesWith":186,"./_arrayMap":188,"./_baseUnary":234,"./_cacheHas":237}],202:[function(require,module,exports){ +},{"./_SetCache":177,"./_arrayIncludes":188,"./_arrayIncludesWith":189,"./_arrayMap":191,"./_baseUnary":237,"./_cacheHas":240}],205:[function(require,module,exports){ var baseForOwn = require('./_baseForOwn'), createBaseEach = require('./_createBaseEach'); @@ -30554,7 +31165,7 @@ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; -},{"./_baseForOwn":207,"./_createBaseEach":255}],203:[function(require,module,exports){ +},{"./_baseForOwn":210,"./_createBaseEach":258}],206:[function(require,module,exports){ var baseEach = require('./_baseEach'); /** @@ -30577,7 +31188,7 @@ function baseFilter(collection, predicate) { module.exports = baseFilter; -},{"./_baseEach":202}],204:[function(require,module,exports){ +},{"./_baseEach":205}],207:[function(require,module,exports){ /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. @@ -30603,7 +31214,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { module.exports = baseFindIndex; -},{}],205:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ var arrayPush = require('./_arrayPush'), isFlattenable = require('./_isFlattenable'); @@ -30643,7 +31254,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) { module.exports = baseFlatten; -},{"./_arrayPush":189,"./_isFlattenable":286}],206:[function(require,module,exports){ +},{"./_arrayPush":192,"./_isFlattenable":289}],209:[function(require,module,exports){ var createBaseFor = require('./_createBaseFor'); /** @@ -30661,7 +31272,7 @@ var baseFor = createBaseFor(); module.exports = baseFor; -},{"./_createBaseFor":256}],207:[function(require,module,exports){ +},{"./_createBaseFor":259}],210:[function(require,module,exports){ var baseFor = require('./_baseFor'), keys = require('./keys'); @@ -30679,7 +31290,7 @@ function baseForOwn(object, iteratee) { module.exports = baseForOwn; -},{"./_baseFor":206,"./keys":366}],208:[function(require,module,exports){ +},{"./_baseFor":209,"./keys":369}],211:[function(require,module,exports){ var castPath = require('./_castPath'), toKey = require('./_toKey'); @@ -30705,7 +31316,7 @@ function baseGet(object, path) { module.exports = baseGet; -},{"./_castPath":239,"./_toKey":328}],209:[function(require,module,exports){ +},{"./_castPath":242,"./_toKey":331}],212:[function(require,module,exports){ var arrayPush = require('./_arrayPush'), isArray = require('./isArray'); @@ -30727,7 +31338,7 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) { module.exports = baseGetAllKeys; -},{"./_arrayPush":189,"./isArray":350}],210:[function(require,module,exports){ +},{"./_arrayPush":192,"./isArray":353}],213:[function(require,module,exports){ var Symbol = require('./_Symbol'), getRawTag = require('./_getRawTag'), objectToString = require('./_objectToString'); @@ -30757,7 +31368,7 @@ function baseGetTag(value) { module.exports = baseGetTag; -},{"./_Symbol":176,"./_getRawTag":271,"./_objectToString":311}],211:[function(require,module,exports){ +},{"./_Symbol":179,"./_getRawTag":274,"./_objectToString":314}],214:[function(require,module,exports){ /** * The base implementation of `_.hasIn` without support for deep paths. * @@ -30772,7 +31383,7 @@ function baseHasIn(object, key) { module.exports = baseHasIn; -},{}],212:[function(require,module,exports){ +},{}],215:[function(require,module,exports){ var baseFindIndex = require('./_baseFindIndex'), baseIsNaN = require('./_baseIsNaN'), strictIndexOf = require('./_strictIndexOf'); @@ -30794,7 +31405,7 @@ function baseIndexOf(array, value, fromIndex) { module.exports = baseIndexOf; -},{"./_baseFindIndex":204,"./_baseIsNaN":218,"./_strictIndexOf":325}],213:[function(require,module,exports){ +},{"./_baseFindIndex":207,"./_baseIsNaN":221,"./_strictIndexOf":328}],216:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -30814,7 +31425,7 @@ function baseIsArguments(value) { module.exports = baseIsArguments; -},{"./_baseGetTag":210,"./isObjectLike":362}],214:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObjectLike":365}],217:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -30834,7 +31445,7 @@ function baseIsDate(value) { module.exports = baseIsDate; -},{"./_baseGetTag":210,"./isObjectLike":362}],215:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObjectLike":365}],218:[function(require,module,exports){ var baseIsEqualDeep = require('./_baseIsEqualDeep'), isObjectLike = require('./isObjectLike'); @@ -30864,7 +31475,7 @@ function baseIsEqual(value, other, bitmask, customizer, stack) { module.exports = baseIsEqual; -},{"./_baseIsEqualDeep":216,"./isObjectLike":362}],216:[function(require,module,exports){ +},{"./_baseIsEqualDeep":219,"./isObjectLike":365}],219:[function(require,module,exports){ var Stack = require('./_Stack'), equalArrays = require('./_equalArrays'), equalByTag = require('./_equalByTag'), @@ -30949,7 +31560,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { module.exports = baseIsEqualDeep; -},{"./_Stack":175,"./_equalArrays":261,"./_equalByTag":262,"./_equalObjects":263,"./_getTag":274,"./isArray":350,"./isBuffer":354,"./isTypedArray":365}],217:[function(require,module,exports){ +},{"./_Stack":178,"./_equalArrays":264,"./_equalByTag":265,"./_equalObjects":266,"./_getTag":277,"./isArray":353,"./isBuffer":357,"./isTypedArray":368}],220:[function(require,module,exports){ var Stack = require('./_Stack'), baseIsEqual = require('./_baseIsEqual'); @@ -31013,7 +31624,7 @@ function baseIsMatch(object, source, matchData, customizer) { module.exports = baseIsMatch; -},{"./_Stack":175,"./_baseIsEqual":215}],218:[function(require,module,exports){ +},{"./_Stack":178,"./_baseIsEqual":218}],221:[function(require,module,exports){ /** * The base implementation of `_.isNaN` without support for number objects. * @@ -31027,7 +31638,7 @@ function baseIsNaN(value) { module.exports = baseIsNaN; -},{}],219:[function(require,module,exports){ +},{}],222:[function(require,module,exports){ var isFunction = require('./isFunction'), isMasked = require('./_isMasked'), isObject = require('./isObject'), @@ -31076,7 +31687,7 @@ function baseIsNative(value) { module.exports = baseIsNative; -},{"./_isMasked":291,"./_toSource":329,"./isFunction":358,"./isObject":361}],220:[function(require,module,exports){ +},{"./_isMasked":294,"./_toSource":332,"./isFunction":361,"./isObject":364}],223:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isLength = require('./isLength'), isObjectLike = require('./isObjectLike'); @@ -31138,7 +31749,7 @@ function baseIsTypedArray(value) { module.exports = baseIsTypedArray; -},{"./_baseGetTag":210,"./isLength":359,"./isObjectLike":362}],221:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isLength":362,"./isObjectLike":365}],224:[function(require,module,exports){ var baseMatches = require('./_baseMatches'), baseMatchesProperty = require('./_baseMatchesProperty'), identity = require('./identity'), @@ -31171,7 +31782,7 @@ function baseIteratee(value) { module.exports = baseIteratee; -},{"./_baseMatches":225,"./_baseMatchesProperty":226,"./identity":347,"./isArray":350,"./property":378}],222:[function(require,module,exports){ +},{"./_baseMatches":228,"./_baseMatchesProperty":229,"./identity":350,"./isArray":353,"./property":381}],225:[function(require,module,exports){ var isPrototype = require('./_isPrototype'), nativeKeys = require('./_nativeKeys'); @@ -31203,7 +31814,7 @@ function baseKeys(object) { module.exports = baseKeys; -},{"./_isPrototype":292,"./_nativeKeys":308}],223:[function(require,module,exports){ +},{"./_isPrototype":295,"./_nativeKeys":311}],226:[function(require,module,exports){ var isObject = require('./isObject'), isPrototype = require('./_isPrototype'), nativeKeysIn = require('./_nativeKeysIn'); @@ -31238,7 +31849,7 @@ function baseKeysIn(object) { module.exports = baseKeysIn; -},{"./_isPrototype":292,"./_nativeKeysIn":309,"./isObject":361}],224:[function(require,module,exports){ +},{"./_isPrototype":295,"./_nativeKeysIn":312,"./isObject":364}],227:[function(require,module,exports){ var baseEach = require('./_baseEach'), isArrayLike = require('./isArrayLike'); @@ -31262,7 +31873,7 @@ function baseMap(collection, iteratee) { module.exports = baseMap; -},{"./_baseEach":202,"./isArrayLike":351}],225:[function(require,module,exports){ +},{"./_baseEach":205,"./isArrayLike":354}],228:[function(require,module,exports){ var baseIsMatch = require('./_baseIsMatch'), getMatchData = require('./_getMatchData'), matchesStrictComparable = require('./_matchesStrictComparable'); @@ -31286,7 +31897,7 @@ function baseMatches(source) { module.exports = baseMatches; -},{"./_baseIsMatch":217,"./_getMatchData":268,"./_matchesStrictComparable":305}],226:[function(require,module,exports){ +},{"./_baseIsMatch":220,"./_getMatchData":271,"./_matchesStrictComparable":308}],229:[function(require,module,exports){ var baseIsEqual = require('./_baseIsEqual'), get = require('./get'), hasIn = require('./hasIn'), @@ -31321,7 +31932,7 @@ function baseMatchesProperty(path, srcValue) { module.exports = baseMatchesProperty; -},{"./_baseIsEqual":215,"./_isKey":289,"./_isStrictComparable":293,"./_matchesStrictComparable":305,"./_toKey":328,"./get":345,"./hasIn":346}],227:[function(require,module,exports){ +},{"./_baseIsEqual":218,"./_isKey":292,"./_isStrictComparable":296,"./_matchesStrictComparable":308,"./_toKey":331,"./get":348,"./hasIn":349}],230:[function(require,module,exports){ /** * The base implementation of `_.property` without support for deep paths. * @@ -31337,7 +31948,7 @@ function baseProperty(key) { module.exports = baseProperty; -},{}],228:[function(require,module,exports){ +},{}],231:[function(require,module,exports){ var baseGet = require('./_baseGet'); /** @@ -31355,7 +31966,7 @@ function basePropertyDeep(path) { module.exports = basePropertyDeep; -},{"./_baseGet":208}],229:[function(require,module,exports){ +},{"./_baseGet":211}],232:[function(require,module,exports){ var identity = require('./identity'), overRest = require('./_overRest'), setToString = require('./_setToString'); @@ -31374,7 +31985,7 @@ function baseRest(func, start) { module.exports = baseRest; -},{"./_overRest":313,"./_setToString":318,"./identity":347}],230:[function(require,module,exports){ +},{"./_overRest":316,"./_setToString":321,"./identity":350}],233:[function(require,module,exports){ var constant = require('./constant'), defineProperty = require('./_defineProperty'), identity = require('./identity'); @@ -31398,7 +32009,7 @@ var baseSetToString = !defineProperty ? identity : function(func, string) { module.exports = baseSetToString; -},{"./_defineProperty":260,"./constant":335,"./identity":347}],231:[function(require,module,exports){ +},{"./_defineProperty":263,"./constant":338,"./identity":350}],234:[function(require,module,exports){ var baseEach = require('./_baseEach'); /** @@ -31422,7 +32033,7 @@ function baseSome(collection, predicate) { module.exports = baseSome; -},{"./_baseEach":202}],232:[function(require,module,exports){ +},{"./_baseEach":205}],235:[function(require,module,exports){ /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. @@ -31444,7 +32055,7 @@ function baseTimes(n, iteratee) { module.exports = baseTimes; -},{}],233:[function(require,module,exports){ +},{}],236:[function(require,module,exports){ var Symbol = require('./_Symbol'), arrayMap = require('./_arrayMap'), isArray = require('./isArray'), @@ -31483,7 +32094,7 @@ function baseToString(value) { module.exports = baseToString; -},{"./_Symbol":176,"./_arrayMap":188,"./isArray":350,"./isSymbol":364}],234:[function(require,module,exports){ +},{"./_Symbol":179,"./_arrayMap":191,"./isArray":353,"./isSymbol":367}],237:[function(require,module,exports){ /** * The base implementation of `_.unary` without support for storing metadata. * @@ -31499,7 +32110,7 @@ function baseUnary(func) { module.exports = baseUnary; -},{}],235:[function(require,module,exports){ +},{}],238:[function(require,module,exports){ var SetCache = require('./_SetCache'), arrayIncludes = require('./_arrayIncludes'), arrayIncludesWith = require('./_arrayIncludesWith'), @@ -31573,7 +32184,7 @@ function baseUniq(array, iteratee, comparator) { module.exports = baseUniq; -},{"./_SetCache":174,"./_arrayIncludes":185,"./_arrayIncludesWith":186,"./_cacheHas":237,"./_createSet":258,"./_setToArray":317}],236:[function(require,module,exports){ +},{"./_SetCache":177,"./_arrayIncludes":188,"./_arrayIncludesWith":189,"./_cacheHas":240,"./_createSet":261,"./_setToArray":320}],239:[function(require,module,exports){ var arrayMap = require('./_arrayMap'); /** @@ -31594,7 +32205,7 @@ function baseValues(object, props) { module.exports = baseValues; -},{"./_arrayMap":188}],237:[function(require,module,exports){ +},{"./_arrayMap":191}],240:[function(require,module,exports){ /** * Checks if a `cache` value for `key` exists. * @@ -31609,7 +32220,7 @@ function cacheHas(cache, key) { module.exports = cacheHas; -},{}],238:[function(require,module,exports){ +},{}],241:[function(require,module,exports){ var identity = require('./identity'); /** @@ -31625,7 +32236,7 @@ function castFunction(value) { module.exports = castFunction; -},{"./identity":347}],239:[function(require,module,exports){ +},{"./identity":350}],242:[function(require,module,exports){ var isArray = require('./isArray'), isKey = require('./_isKey'), stringToPath = require('./_stringToPath'), @@ -31648,7 +32259,7 @@ function castPath(value, object) { module.exports = castPath; -},{"./_isKey":289,"./_stringToPath":327,"./isArray":350,"./toString":388}],240:[function(require,module,exports){ +},{"./_isKey":292,"./_stringToPath":330,"./isArray":353,"./toString":391}],243:[function(require,module,exports){ var Uint8Array = require('./_Uint8Array'); /** @@ -31666,7 +32277,7 @@ function cloneArrayBuffer(arrayBuffer) { module.exports = cloneArrayBuffer; -},{"./_Uint8Array":177}],241:[function(require,module,exports){ +},{"./_Uint8Array":180}],244:[function(require,module,exports){ var root = require('./_root'); /** Detect free variable `exports`. */ @@ -31703,7 +32314,7 @@ function cloneBuffer(buffer, isDeep) { module.exports = cloneBuffer; -},{"./_root":314}],242:[function(require,module,exports){ +},{"./_root":317}],245:[function(require,module,exports){ var cloneArrayBuffer = require('./_cloneArrayBuffer'); /** @@ -31721,7 +32332,7 @@ function cloneDataView(dataView, isDeep) { module.exports = cloneDataView; -},{"./_cloneArrayBuffer":240}],243:[function(require,module,exports){ +},{"./_cloneArrayBuffer":243}],246:[function(require,module,exports){ var addMapEntry = require('./_addMapEntry'), arrayReduce = require('./_arrayReduce'), mapToArray = require('./_mapToArray'); @@ -31745,7 +32356,7 @@ function cloneMap(map, isDeep, cloneFunc) { module.exports = cloneMap; -},{"./_addMapEntry":179,"./_arrayReduce":190,"./_mapToArray":304}],244:[function(require,module,exports){ +},{"./_addMapEntry":182,"./_arrayReduce":193,"./_mapToArray":307}],247:[function(require,module,exports){ /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; @@ -31764,7 +32375,7 @@ function cloneRegExp(regexp) { module.exports = cloneRegExp; -},{}],245:[function(require,module,exports){ +},{}],248:[function(require,module,exports){ var addSetEntry = require('./_addSetEntry'), arrayReduce = require('./_arrayReduce'), setToArray = require('./_setToArray'); @@ -31788,7 +32399,7 @@ function cloneSet(set, isDeep, cloneFunc) { module.exports = cloneSet; -},{"./_addSetEntry":180,"./_arrayReduce":190,"./_setToArray":317}],246:[function(require,module,exports){ +},{"./_addSetEntry":183,"./_arrayReduce":193,"./_setToArray":320}],249:[function(require,module,exports){ var Symbol = require('./_Symbol'); /** Used to convert symbols to primitives and strings. */ @@ -31808,7 +32419,7 @@ function cloneSymbol(symbol) { module.exports = cloneSymbol; -},{"./_Symbol":176}],247:[function(require,module,exports){ +},{"./_Symbol":179}],250:[function(require,module,exports){ var cloneArrayBuffer = require('./_cloneArrayBuffer'); /** @@ -31826,7 +32437,7 @@ function cloneTypedArray(typedArray, isDeep) { module.exports = cloneTypedArray; -},{"./_cloneArrayBuffer":240}],248:[function(require,module,exports){ +},{"./_cloneArrayBuffer":243}],251:[function(require,module,exports){ /** * Copies the values of `source` to `array`. * @@ -31848,7 +32459,7 @@ function copyArray(source, array) { module.exports = copyArray; -},{}],249:[function(require,module,exports){ +},{}],252:[function(require,module,exports){ var assignValue = require('./_assignValue'), baseAssignValue = require('./_baseAssignValue'); @@ -31890,7 +32501,7 @@ function copyObject(source, props, object, customizer) { module.exports = copyObject; -},{"./_assignValue":193,"./_baseAssignValue":198}],250:[function(require,module,exports){ +},{"./_assignValue":196,"./_baseAssignValue":201}],253:[function(require,module,exports){ var copyObject = require('./_copyObject'), getSymbols = require('./_getSymbols'); @@ -31908,7 +32519,7 @@ function copySymbols(source, object) { module.exports = copySymbols; -},{"./_copyObject":249,"./_getSymbols":272}],251:[function(require,module,exports){ +},{"./_copyObject":252,"./_getSymbols":275}],254:[function(require,module,exports){ var copyObject = require('./_copyObject'), getSymbolsIn = require('./_getSymbolsIn'); @@ -31926,7 +32537,7 @@ function copySymbolsIn(source, object) { module.exports = copySymbolsIn; -},{"./_copyObject":249,"./_getSymbolsIn":273}],252:[function(require,module,exports){ +},{"./_copyObject":252,"./_getSymbolsIn":276}],255:[function(require,module,exports){ var root = require('./_root'); /** Used to detect overreaching core-js shims. */ @@ -31934,7 +32545,7 @@ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; -},{"./_root":314}],253:[function(require,module,exports){ +},{"./_root":317}],256:[function(require,module,exports){ var arrayAggregator = require('./_arrayAggregator'), baseAggregator = require('./_baseAggregator'), baseIteratee = require('./_baseIteratee'), @@ -31959,7 +32570,7 @@ function createAggregator(setter, initializer) { module.exports = createAggregator; -},{"./_arrayAggregator":182,"./_baseAggregator":195,"./_baseIteratee":221,"./isArray":350}],254:[function(require,module,exports){ +},{"./_arrayAggregator":185,"./_baseAggregator":198,"./_baseIteratee":224,"./isArray":353}],257:[function(require,module,exports){ var baseRest = require('./_baseRest'), isIterateeCall = require('./_isIterateeCall'); @@ -31998,7 +32609,7 @@ function createAssigner(assigner) { module.exports = createAssigner; -},{"./_baseRest":229,"./_isIterateeCall":288}],255:[function(require,module,exports){ +},{"./_baseRest":232,"./_isIterateeCall":291}],258:[function(require,module,exports){ var isArrayLike = require('./isArrayLike'); /** @@ -32032,7 +32643,7 @@ function createBaseEach(eachFunc, fromRight) { module.exports = createBaseEach; -},{"./isArrayLike":351}],256:[function(require,module,exports){ +},{"./isArrayLike":354}],259:[function(require,module,exports){ /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * @@ -32059,7 +32670,7 @@ function createBaseFor(fromRight) { module.exports = createBaseFor; -},{}],257:[function(require,module,exports){ +},{}],260:[function(require,module,exports){ var baseIteratee = require('./_baseIteratee'), isArrayLike = require('./isArrayLike'), keys = require('./keys'); @@ -32086,7 +32697,7 @@ function createFind(findIndexFunc) { module.exports = createFind; -},{"./_baseIteratee":221,"./isArrayLike":351,"./keys":366}],258:[function(require,module,exports){ +},{"./_baseIteratee":224,"./isArrayLike":354,"./keys":369}],261:[function(require,module,exports){ var Set = require('./_Set'), noop = require('./noop'), setToArray = require('./_setToArray'); @@ -32107,7 +32718,7 @@ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop module.exports = createSet; -},{"./_Set":173,"./_setToArray":317,"./noop":373}],259:[function(require,module,exports){ +},{"./_Set":176,"./_setToArray":320,"./noop":376}],262:[function(require,module,exports){ var eq = require('./eq'); /** Used for built-in method references. */ @@ -32138,7 +32749,7 @@ function customDefaultsAssignIn(objValue, srcValue, key, object) { module.exports = customDefaultsAssignIn; -},{"./eq":338}],260:[function(require,module,exports){ +},{"./eq":341}],263:[function(require,module,exports){ var getNative = require('./_getNative'); var defineProperty = (function() { @@ -32151,7 +32762,7 @@ var defineProperty = (function() { module.exports = defineProperty; -},{"./_getNative":269}],261:[function(require,module,exports){ +},{"./_getNative":272}],264:[function(require,module,exports){ var SetCache = require('./_SetCache'), arraySome = require('./_arraySome'), cacheHas = require('./_cacheHas'); @@ -32236,7 +32847,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { module.exports = equalArrays; -},{"./_SetCache":174,"./_arraySome":191,"./_cacheHas":237}],262:[function(require,module,exports){ +},{"./_SetCache":177,"./_arraySome":194,"./_cacheHas":240}],265:[function(require,module,exports){ var Symbol = require('./_Symbol'), Uint8Array = require('./_Uint8Array'), eq = require('./eq'), @@ -32350,7 +32961,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { module.exports = equalByTag; -},{"./_Symbol":176,"./_Uint8Array":177,"./_equalArrays":261,"./_mapToArray":304,"./_setToArray":317,"./eq":338}],263:[function(require,module,exports){ +},{"./_Symbol":179,"./_Uint8Array":180,"./_equalArrays":264,"./_mapToArray":307,"./_setToArray":320,"./eq":341}],266:[function(require,module,exports){ var getAllKeys = require('./_getAllKeys'); /** Used to compose bitmasks for value comparisons. */ @@ -32441,7 +33052,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { module.exports = equalObjects; -},{"./_getAllKeys":265}],264:[function(require,module,exports){ +},{"./_getAllKeys":268}],267:[function(require,module,exports){ (function (global){ /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; @@ -32449,7 +33060,7 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object module.exports = freeGlobal; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],265:[function(require,module,exports){ +},{}],268:[function(require,module,exports){ var baseGetAllKeys = require('./_baseGetAllKeys'), getSymbols = require('./_getSymbols'), keys = require('./keys'); @@ -32467,7 +33078,7 @@ function getAllKeys(object) { module.exports = getAllKeys; -},{"./_baseGetAllKeys":209,"./_getSymbols":272,"./keys":366}],266:[function(require,module,exports){ +},{"./_baseGetAllKeys":212,"./_getSymbols":275,"./keys":369}],269:[function(require,module,exports){ var baseGetAllKeys = require('./_baseGetAllKeys'), getSymbolsIn = require('./_getSymbolsIn'), keysIn = require('./keysIn'); @@ -32486,7 +33097,7 @@ function getAllKeysIn(object) { module.exports = getAllKeysIn; -},{"./_baseGetAllKeys":209,"./_getSymbolsIn":273,"./keysIn":367}],267:[function(require,module,exports){ +},{"./_baseGetAllKeys":212,"./_getSymbolsIn":276,"./keysIn":370}],270:[function(require,module,exports){ var isKeyable = require('./_isKeyable'); /** @@ -32506,7 +33117,7 @@ function getMapData(map, key) { module.exports = getMapData; -},{"./_isKeyable":290}],268:[function(require,module,exports){ +},{"./_isKeyable":293}],271:[function(require,module,exports){ var isStrictComparable = require('./_isStrictComparable'), keys = require('./keys'); @@ -32532,7 +33143,7 @@ function getMatchData(object) { module.exports = getMatchData; -},{"./_isStrictComparable":293,"./keys":366}],269:[function(require,module,exports){ +},{"./_isStrictComparable":296,"./keys":369}],272:[function(require,module,exports){ var baseIsNative = require('./_baseIsNative'), getValue = require('./_getValue'); @@ -32551,7 +33162,7 @@ function getNative(object, key) { module.exports = getNative; -},{"./_baseIsNative":219,"./_getValue":275}],270:[function(require,module,exports){ +},{"./_baseIsNative":222,"./_getValue":278}],273:[function(require,module,exports){ var overArg = require('./_overArg'); /** Built-in value references. */ @@ -32559,7 +33170,7 @@ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; -},{"./_overArg":312}],271:[function(require,module,exports){ +},{"./_overArg":315}],274:[function(require,module,exports){ var Symbol = require('./_Symbol'); /** Used for built-in method references. */ @@ -32607,7 +33218,7 @@ function getRawTag(value) { module.exports = getRawTag; -},{"./_Symbol":176}],272:[function(require,module,exports){ +},{"./_Symbol":179}],275:[function(require,module,exports){ var arrayFilter = require('./_arrayFilter'), stubArray = require('./stubArray'); @@ -32639,7 +33250,7 @@ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { module.exports = getSymbols; -},{"./_arrayFilter":184,"./stubArray":382}],273:[function(require,module,exports){ +},{"./_arrayFilter":187,"./stubArray":385}],276:[function(require,module,exports){ var arrayPush = require('./_arrayPush'), getPrototype = require('./_getPrototype'), getSymbols = require('./_getSymbols'), @@ -32666,7 +33277,7 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { module.exports = getSymbolsIn; -},{"./_arrayPush":189,"./_getPrototype":270,"./_getSymbols":272,"./stubArray":382}],274:[function(require,module,exports){ +},{"./_arrayPush":192,"./_getPrototype":273,"./_getSymbols":275,"./stubArray":385}],277:[function(require,module,exports){ var DataView = require('./_DataView'), Map = require('./_Map'), Promise = require('./_Promise'), @@ -32726,7 +33337,7 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || module.exports = getTag; -},{"./_DataView":167,"./_Map":170,"./_Promise":172,"./_Set":173,"./_WeakMap":178,"./_baseGetTag":210,"./_toSource":329}],275:[function(require,module,exports){ +},{"./_DataView":170,"./_Map":173,"./_Promise":175,"./_Set":176,"./_WeakMap":181,"./_baseGetTag":213,"./_toSource":332}],278:[function(require,module,exports){ /** * Gets the value at `key` of `object`. * @@ -32741,7 +33352,7 @@ function getValue(object, key) { module.exports = getValue; -},{}],276:[function(require,module,exports){ +},{}],279:[function(require,module,exports){ var castPath = require('./_castPath'), isArguments = require('./isArguments'), isArray = require('./isArray'), @@ -32782,7 +33393,7 @@ function hasPath(object, path, hasFunc) { module.exports = hasPath; -},{"./_castPath":239,"./_isIndex":287,"./_toKey":328,"./isArguments":349,"./isArray":350,"./isLength":359}],277:[function(require,module,exports){ +},{"./_castPath":242,"./_isIndex":290,"./_toKey":331,"./isArguments":352,"./isArray":353,"./isLength":362}],280:[function(require,module,exports){ /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', @@ -32810,7 +33421,7 @@ function hasUnicode(string) { module.exports = hasUnicode; -},{}],278:[function(require,module,exports){ +},{}],281:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** @@ -32827,7 +33438,7 @@ function hashClear() { module.exports = hashClear; -},{"./_nativeCreate":307}],279:[function(require,module,exports){ +},{"./_nativeCreate":310}],282:[function(require,module,exports){ /** * Removes `key` and its value from the hash. * @@ -32846,7 +33457,7 @@ function hashDelete(key) { module.exports = hashDelete; -},{}],280:[function(require,module,exports){ +},{}],283:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ @@ -32878,7 +33489,7 @@ function hashGet(key) { module.exports = hashGet; -},{"./_nativeCreate":307}],281:[function(require,module,exports){ +},{"./_nativeCreate":310}],284:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used for built-in method references. */ @@ -32903,7 +33514,7 @@ function hashHas(key) { module.exports = hashHas; -},{"./_nativeCreate":307}],282:[function(require,module,exports){ +},{"./_nativeCreate":310}],285:[function(require,module,exports){ var nativeCreate = require('./_nativeCreate'); /** Used to stand-in for `undefined` hash values. */ @@ -32928,7 +33539,7 @@ function hashSet(key, value) { module.exports = hashSet; -},{"./_nativeCreate":307}],283:[function(require,module,exports){ +},{"./_nativeCreate":310}],286:[function(require,module,exports){ /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -32956,7 +33567,7 @@ function initCloneArray(array) { module.exports = initCloneArray; -},{}],284:[function(require,module,exports){ +},{}],287:[function(require,module,exports){ var cloneArrayBuffer = require('./_cloneArrayBuffer'), cloneDataView = require('./_cloneDataView'), cloneMap = require('./_cloneMap'), @@ -33038,7 +33649,7 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) { module.exports = initCloneByTag; -},{"./_cloneArrayBuffer":240,"./_cloneDataView":242,"./_cloneMap":243,"./_cloneRegExp":244,"./_cloneSet":245,"./_cloneSymbol":246,"./_cloneTypedArray":247}],285:[function(require,module,exports){ +},{"./_cloneArrayBuffer":243,"./_cloneDataView":245,"./_cloneMap":246,"./_cloneRegExp":247,"./_cloneSet":248,"./_cloneSymbol":249,"./_cloneTypedArray":250}],288:[function(require,module,exports){ var baseCreate = require('./_baseCreate'), getPrototype = require('./_getPrototype'), isPrototype = require('./_isPrototype'); @@ -33058,7 +33669,7 @@ function initCloneObject(object) { module.exports = initCloneObject; -},{"./_baseCreate":200,"./_getPrototype":270,"./_isPrototype":292}],286:[function(require,module,exports){ +},{"./_baseCreate":203,"./_getPrototype":273,"./_isPrototype":295}],289:[function(require,module,exports){ var Symbol = require('./_Symbol'), isArguments = require('./isArguments'), isArray = require('./isArray'); @@ -33080,7 +33691,7 @@ function isFlattenable(value) { module.exports = isFlattenable; -},{"./_Symbol":176,"./isArguments":349,"./isArray":350}],287:[function(require,module,exports){ +},{"./_Symbol":179,"./isArguments":352,"./isArray":353}],290:[function(require,module,exports){ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -33104,7 +33715,7 @@ function isIndex(value, length) { module.exports = isIndex; -},{}],288:[function(require,module,exports){ +},{}],291:[function(require,module,exports){ var eq = require('./eq'), isArrayLike = require('./isArrayLike'), isIndex = require('./_isIndex'), @@ -33136,7 +33747,7 @@ function isIterateeCall(value, index, object) { module.exports = isIterateeCall; -},{"./_isIndex":287,"./eq":338,"./isArrayLike":351,"./isObject":361}],289:[function(require,module,exports){ +},{"./_isIndex":290,"./eq":341,"./isArrayLike":354,"./isObject":364}],292:[function(require,module,exports){ var isArray = require('./isArray'), isSymbol = require('./isSymbol'); @@ -33167,7 +33778,7 @@ function isKey(value, object) { module.exports = isKey; -},{"./isArray":350,"./isSymbol":364}],290:[function(require,module,exports){ +},{"./isArray":353,"./isSymbol":367}],293:[function(require,module,exports){ /** * Checks if `value` is suitable for use as unique object key. * @@ -33184,7 +33795,7 @@ function isKeyable(value) { module.exports = isKeyable; -},{}],291:[function(require,module,exports){ +},{}],294:[function(require,module,exports){ var coreJsData = require('./_coreJsData'); /** Used to detect methods masquerading as native. */ @@ -33206,7 +33817,7 @@ function isMasked(func) { module.exports = isMasked; -},{"./_coreJsData":252}],292:[function(require,module,exports){ +},{"./_coreJsData":255}],295:[function(require,module,exports){ /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -33226,7 +33837,7 @@ function isPrototype(value) { module.exports = isPrototype; -},{}],293:[function(require,module,exports){ +},{}],296:[function(require,module,exports){ var isObject = require('./isObject'); /** @@ -33243,7 +33854,7 @@ function isStrictComparable(value) { module.exports = isStrictComparable; -},{"./isObject":361}],294:[function(require,module,exports){ +},{"./isObject":364}],297:[function(require,module,exports){ /** * Removes all key-value entries from the list cache. * @@ -33258,7 +33869,7 @@ function listCacheClear() { module.exports = listCacheClear; -},{}],295:[function(require,module,exports){ +},{}],298:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** Used for built-in method references. */ @@ -33295,7 +33906,7 @@ function listCacheDelete(key) { module.exports = listCacheDelete; -},{"./_assocIndexOf":194}],296:[function(require,module,exports){ +},{"./_assocIndexOf":197}],299:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -33316,7 +33927,7 @@ function listCacheGet(key) { module.exports = listCacheGet; -},{"./_assocIndexOf":194}],297:[function(require,module,exports){ +},{"./_assocIndexOf":197}],300:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -33334,7 +33945,7 @@ function listCacheHas(key) { module.exports = listCacheHas; -},{"./_assocIndexOf":194}],298:[function(require,module,exports){ +},{"./_assocIndexOf":197}],301:[function(require,module,exports){ var assocIndexOf = require('./_assocIndexOf'); /** @@ -33362,7 +33973,7 @@ function listCacheSet(key, value) { module.exports = listCacheSet; -},{"./_assocIndexOf":194}],299:[function(require,module,exports){ +},{"./_assocIndexOf":197}],302:[function(require,module,exports){ var Hash = require('./_Hash'), ListCache = require('./_ListCache'), Map = require('./_Map'); @@ -33385,7 +33996,7 @@ function mapCacheClear() { module.exports = mapCacheClear; -},{"./_Hash":168,"./_ListCache":169,"./_Map":170}],300:[function(require,module,exports){ +},{"./_Hash":171,"./_ListCache":172,"./_Map":173}],303:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -33405,7 +34016,7 @@ function mapCacheDelete(key) { module.exports = mapCacheDelete; -},{"./_getMapData":267}],301:[function(require,module,exports){ +},{"./_getMapData":270}],304:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -33423,7 +34034,7 @@ function mapCacheGet(key) { module.exports = mapCacheGet; -},{"./_getMapData":267}],302:[function(require,module,exports){ +},{"./_getMapData":270}],305:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -33441,7 +34052,7 @@ function mapCacheHas(key) { module.exports = mapCacheHas; -},{"./_getMapData":267}],303:[function(require,module,exports){ +},{"./_getMapData":270}],306:[function(require,module,exports){ var getMapData = require('./_getMapData'); /** @@ -33465,7 +34076,7 @@ function mapCacheSet(key, value) { module.exports = mapCacheSet; -},{"./_getMapData":267}],304:[function(require,module,exports){ +},{"./_getMapData":270}],307:[function(require,module,exports){ /** * Converts `map` to its key-value pairs. * @@ -33485,7 +34096,7 @@ function mapToArray(map) { module.exports = mapToArray; -},{}],305:[function(require,module,exports){ +},{}],308:[function(require,module,exports){ /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. @@ -33507,7 +34118,7 @@ function matchesStrictComparable(key, srcValue) { module.exports = matchesStrictComparable; -},{}],306:[function(require,module,exports){ +},{}],309:[function(require,module,exports){ var memoize = require('./memoize'); /** Used as the maximum memoize cache size. */ @@ -33535,7 +34146,7 @@ function memoizeCapped(func) { module.exports = memoizeCapped; -},{"./memoize":371}],307:[function(require,module,exports){ +},{"./memoize":374}],310:[function(require,module,exports){ var getNative = require('./_getNative'); /* Built-in method references that are verified to be native. */ @@ -33543,7 +34154,7 @@ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; -},{"./_getNative":269}],308:[function(require,module,exports){ +},{"./_getNative":272}],311:[function(require,module,exports){ var overArg = require('./_overArg'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -33551,7 +34162,7 @@ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; -},{"./_overArg":312}],309:[function(require,module,exports){ +},{"./_overArg":315}],312:[function(require,module,exports){ /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) @@ -33573,7 +34184,7 @@ function nativeKeysIn(object) { module.exports = nativeKeysIn; -},{}],310:[function(require,module,exports){ +},{}],313:[function(require,module,exports){ var freeGlobal = require('./_freeGlobal'); /** Detect free variable `exports`. */ @@ -33597,7 +34208,7 @@ var nodeUtil = (function() { module.exports = nodeUtil; -},{"./_freeGlobal":264}],311:[function(require,module,exports){ +},{"./_freeGlobal":267}],314:[function(require,module,exports){ /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -33621,7 +34232,7 @@ function objectToString(value) { module.exports = objectToString; -},{}],312:[function(require,module,exports){ +},{}],315:[function(require,module,exports){ /** * Creates a unary function that invokes `func` with its argument transformed. * @@ -33638,7 +34249,7 @@ function overArg(func, transform) { module.exports = overArg; -},{}],313:[function(require,module,exports){ +},{}],316:[function(require,module,exports){ var apply = require('./_apply'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -33676,7 +34287,7 @@ function overRest(func, start, transform) { module.exports = overRest; -},{"./_apply":181}],314:[function(require,module,exports){ +},{"./_apply":184}],317:[function(require,module,exports){ var freeGlobal = require('./_freeGlobal'); /** Detect free variable `self`. */ @@ -33687,7 +34298,7 @@ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; -},{"./_freeGlobal":264}],315:[function(require,module,exports){ +},{"./_freeGlobal":267}],318:[function(require,module,exports){ /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; @@ -33708,7 +34319,7 @@ function setCacheAdd(value) { module.exports = setCacheAdd; -},{}],316:[function(require,module,exports){ +},{}],319:[function(require,module,exports){ /** * Checks if `value` is in the array cache. * @@ -33724,7 +34335,7 @@ function setCacheHas(value) { module.exports = setCacheHas; -},{}],317:[function(require,module,exports){ +},{}],320:[function(require,module,exports){ /** * Converts `set` to an array of its values. * @@ -33744,7 +34355,7 @@ function setToArray(set) { module.exports = setToArray; -},{}],318:[function(require,module,exports){ +},{}],321:[function(require,module,exports){ var baseSetToString = require('./_baseSetToString'), shortOut = require('./_shortOut'); @@ -33760,7 +34371,7 @@ var setToString = shortOut(baseSetToString); module.exports = setToString; -},{"./_baseSetToString":230,"./_shortOut":319}],319:[function(require,module,exports){ +},{"./_baseSetToString":233,"./_shortOut":322}],322:[function(require,module,exports){ /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; @@ -33799,7 +34410,7 @@ function shortOut(func) { module.exports = shortOut; -},{}],320:[function(require,module,exports){ +},{}],323:[function(require,module,exports){ var ListCache = require('./_ListCache'); /** @@ -33816,7 +34427,7 @@ function stackClear() { module.exports = stackClear; -},{"./_ListCache":169}],321:[function(require,module,exports){ +},{"./_ListCache":172}],324:[function(require,module,exports){ /** * Removes `key` and its value from the stack. * @@ -33836,7 +34447,7 @@ function stackDelete(key) { module.exports = stackDelete; -},{}],322:[function(require,module,exports){ +},{}],325:[function(require,module,exports){ /** * Gets the stack value for `key`. * @@ -33852,7 +34463,7 @@ function stackGet(key) { module.exports = stackGet; -},{}],323:[function(require,module,exports){ +},{}],326:[function(require,module,exports){ /** * Checks if a stack value for `key` exists. * @@ -33868,7 +34479,7 @@ function stackHas(key) { module.exports = stackHas; -},{}],324:[function(require,module,exports){ +},{}],327:[function(require,module,exports){ var ListCache = require('./_ListCache'), Map = require('./_Map'), MapCache = require('./_MapCache'); @@ -33904,7 +34515,7 @@ function stackSet(key, value) { module.exports = stackSet; -},{"./_ListCache":169,"./_Map":170,"./_MapCache":171}],325:[function(require,module,exports){ +},{"./_ListCache":172,"./_Map":173,"./_MapCache":174}],328:[function(require,module,exports){ /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. @@ -33929,7 +34540,7 @@ function strictIndexOf(array, value, fromIndex) { module.exports = strictIndexOf; -},{}],326:[function(require,module,exports){ +},{}],329:[function(require,module,exports){ var asciiSize = require('./_asciiSize'), hasUnicode = require('./_hasUnicode'), unicodeSize = require('./_unicodeSize'); @@ -33949,7 +34560,7 @@ function stringSize(string) { module.exports = stringSize; -},{"./_asciiSize":192,"./_hasUnicode":277,"./_unicodeSize":330}],327:[function(require,module,exports){ +},{"./_asciiSize":195,"./_hasUnicode":280,"./_unicodeSize":333}],330:[function(require,module,exports){ var memoizeCapped = require('./_memoizeCapped'); /** Used to match property names within property paths. */ @@ -33979,7 +34590,7 @@ var stringToPath = memoizeCapped(function(string) { module.exports = stringToPath; -},{"./_memoizeCapped":306}],328:[function(require,module,exports){ +},{"./_memoizeCapped":309}],331:[function(require,module,exports){ var isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ @@ -34002,7 +34613,7 @@ function toKey(value) { module.exports = toKey; -},{"./isSymbol":364}],329:[function(require,module,exports){ +},{"./isSymbol":367}],332:[function(require,module,exports){ /** Used for built-in method references. */ var funcProto = Function.prototype; @@ -34030,7 +34641,7 @@ function toSource(func) { module.exports = toSource; -},{}],330:[function(require,module,exports){ +},{}],333:[function(require,module,exports){ /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', @@ -34076,7 +34687,7 @@ function unicodeSize(string) { module.exports = unicodeSize; -},{}],331:[function(require,module,exports){ +},{}],334:[function(require,module,exports){ var assignValue = require('./_assignValue'), copyObject = require('./_copyObject'), createAssigner = require('./_createAssigner'), @@ -34136,7 +34747,7 @@ var assign = createAssigner(function(object, source) { module.exports = assign; -},{"./_assignValue":193,"./_copyObject":249,"./_createAssigner":254,"./_isPrototype":292,"./isArrayLike":351,"./keys":366}],332:[function(require,module,exports){ +},{"./_assignValue":196,"./_copyObject":252,"./_createAssigner":257,"./_isPrototype":295,"./isArrayLike":354,"./keys":369}],335:[function(require,module,exports){ var copyObject = require('./_copyObject'), createAssigner = require('./_createAssigner'), keysIn = require('./keysIn'); @@ -34176,7 +34787,7 @@ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) module.exports = assignInWith; -},{"./_copyObject":249,"./_createAssigner":254,"./keysIn":367}],333:[function(require,module,exports){ +},{"./_copyObject":252,"./_createAssigner":257,"./keysIn":370}],336:[function(require,module,exports){ var toInteger = require('./toInteger'); /** Error message constants. */ @@ -34218,7 +34829,7 @@ function before(n, func) { module.exports = before; -},{"./toInteger":386}],334:[function(require,module,exports){ +},{"./toInteger":389}],337:[function(require,module,exports){ var baseClone = require('./_baseClone'); /** Used to compose bitmasks for cloning. */ @@ -34249,7 +34860,7 @@ function cloneDeep(value) { module.exports = cloneDeep; -},{"./_baseClone":199}],335:[function(require,module,exports){ +},{"./_baseClone":202}],338:[function(require,module,exports){ /** * Creates a function that returns `value`. * @@ -34277,7 +34888,7 @@ function constant(value) { module.exports = constant; -},{}],336:[function(require,module,exports){ +},{}],339:[function(require,module,exports){ var isObject = require('./isObject'), now = require('./now'), toNumber = require('./toNumber'); @@ -34467,7 +35078,7 @@ function debounce(func, wait, options) { module.exports = debounce; -},{"./isObject":361,"./now":374,"./toNumber":387}],337:[function(require,module,exports){ +},{"./isObject":364,"./now":377,"./toNumber":390}],340:[function(require,module,exports){ var apply = require('./_apply'), assignInWith = require('./assignInWith'), baseRest = require('./_baseRest'), @@ -34501,7 +35112,7 @@ var defaults = baseRest(function(args) { module.exports = defaults; -},{"./_apply":181,"./_baseRest":229,"./_customDefaultsAssignIn":259,"./assignInWith":332}],338:[function(require,module,exports){ +},{"./_apply":184,"./_baseRest":232,"./_customDefaultsAssignIn":262,"./assignInWith":335}],341:[function(require,module,exports){ /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -34540,7 +35151,7 @@ function eq(value, other) { module.exports = eq; -},{}],339:[function(require,module,exports){ +},{}],342:[function(require,module,exports){ var arrayFilter = require('./_arrayFilter'), baseFilter = require('./_baseFilter'), baseIteratee = require('./_baseIteratee'), @@ -34590,7 +35201,7 @@ function filter(collection, predicate) { module.exports = filter; -},{"./_arrayFilter":184,"./_baseFilter":203,"./_baseIteratee":221,"./isArray":350}],340:[function(require,module,exports){ +},{"./_arrayFilter":187,"./_baseFilter":206,"./_baseIteratee":224,"./isArray":353}],343:[function(require,module,exports){ var createFind = require('./_createFind'), findIndex = require('./findIndex'); @@ -34634,7 +35245,7 @@ var find = createFind(findIndex); module.exports = find; -},{"./_createFind":257,"./findIndex":341}],341:[function(require,module,exports){ +},{"./_createFind":260,"./findIndex":344}],344:[function(require,module,exports){ var baseFindIndex = require('./_baseFindIndex'), baseIteratee = require('./_baseIteratee'), toInteger = require('./toInteger'); @@ -34691,7 +35302,7 @@ function findIndex(array, predicate, fromIndex) { module.exports = findIndex; -},{"./_baseFindIndex":204,"./_baseIteratee":221,"./toInteger":386}],342:[function(require,module,exports){ +},{"./_baseFindIndex":207,"./_baseIteratee":224,"./toInteger":389}],345:[function(require,module,exports){ var baseFlatten = require('./_baseFlatten'); /** @@ -34715,7 +35326,7 @@ function flatten(array) { module.exports = flatten; -},{"./_baseFlatten":205}],343:[function(require,module,exports){ +},{"./_baseFlatten":208}],346:[function(require,module,exports){ var arrayEach = require('./_arrayEach'), baseEach = require('./_baseEach'), castFunction = require('./_castFunction'), @@ -34758,7 +35369,7 @@ function forEach(collection, iteratee) { module.exports = forEach; -},{"./_arrayEach":183,"./_baseEach":202,"./_castFunction":238,"./isArray":350}],344:[function(require,module,exports){ +},{"./_arrayEach":186,"./_baseEach":205,"./_castFunction":241,"./isArray":353}],347:[function(require,module,exports){ /** * The inverse of `_.toPairs`; this method returns an object composed * from key-value `pairs`. @@ -34788,7 +35399,7 @@ function fromPairs(pairs) { module.exports = fromPairs; -},{}],345:[function(require,module,exports){ +},{}],348:[function(require,module,exports){ var baseGet = require('./_baseGet'); /** @@ -34823,7 +35434,7 @@ function get(object, path, defaultValue) { module.exports = get; -},{"./_baseGet":208}],346:[function(require,module,exports){ +},{"./_baseGet":211}],349:[function(require,module,exports){ var baseHasIn = require('./_baseHasIn'), hasPath = require('./_hasPath'); @@ -34859,7 +35470,7 @@ function hasIn(object, path) { module.exports = hasIn; -},{"./_baseHasIn":211,"./_hasPath":276}],347:[function(require,module,exports){ +},{"./_baseHasIn":214,"./_hasPath":279}],350:[function(require,module,exports){ /** * This method returns the first argument it receives. * @@ -34882,7 +35493,7 @@ function identity(value) { module.exports = identity; -},{}],348:[function(require,module,exports){ +},{}],351:[function(require,module,exports){ var baseIndexOf = require('./_baseIndexOf'), isArrayLike = require('./isArrayLike'), isString = require('./isString'), @@ -34937,7 +35548,7 @@ function includes(collection, value, fromIndex, guard) { module.exports = includes; -},{"./_baseIndexOf":212,"./isArrayLike":351,"./isString":363,"./toInteger":386,"./values":390}],349:[function(require,module,exports){ +},{"./_baseIndexOf":215,"./isArrayLike":354,"./isString":366,"./toInteger":389,"./values":393}],352:[function(require,module,exports){ var baseIsArguments = require('./_baseIsArguments'), isObjectLike = require('./isObjectLike'); @@ -34975,7 +35586,7 @@ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsAr module.exports = isArguments; -},{"./_baseIsArguments":213,"./isObjectLike":362}],350:[function(require,module,exports){ +},{"./_baseIsArguments":216,"./isObjectLike":365}],353:[function(require,module,exports){ /** * Checks if `value` is classified as an `Array` object. * @@ -35003,7 +35614,7 @@ var isArray = Array.isArray; module.exports = isArray; -},{}],351:[function(require,module,exports){ +},{}],354:[function(require,module,exports){ var isFunction = require('./isFunction'), isLength = require('./isLength'); @@ -35038,7 +35649,7 @@ function isArrayLike(value) { module.exports = isArrayLike; -},{"./isFunction":358,"./isLength":359}],352:[function(require,module,exports){ +},{"./isFunction":361,"./isLength":362}],355:[function(require,module,exports){ var isArrayLike = require('./isArrayLike'), isObjectLike = require('./isObjectLike'); @@ -35073,7 +35684,7 @@ function isArrayLikeObject(value) { module.exports = isArrayLikeObject; -},{"./isArrayLike":351,"./isObjectLike":362}],353:[function(require,module,exports){ +},{"./isArrayLike":354,"./isObjectLike":365}],356:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -35104,7 +35715,7 @@ function isBoolean(value) { module.exports = isBoolean; -},{"./_baseGetTag":210,"./isObjectLike":362}],354:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObjectLike":365}],357:[function(require,module,exports){ var root = require('./_root'), stubFalse = require('./stubFalse'); @@ -35144,7 +35755,7 @@ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; -},{"./_root":314,"./stubFalse":383}],355:[function(require,module,exports){ +},{"./_root":317,"./stubFalse":386}],358:[function(require,module,exports){ var baseIsDate = require('./_baseIsDate'), baseUnary = require('./_baseUnary'), nodeUtil = require('./_nodeUtil'); @@ -35173,7 +35784,7 @@ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; module.exports = isDate; -},{"./_baseIsDate":214,"./_baseUnary":234,"./_nodeUtil":310}],356:[function(require,module,exports){ +},{"./_baseIsDate":217,"./_baseUnary":237,"./_nodeUtil":313}],359:[function(require,module,exports){ var baseKeys = require('./_baseKeys'), getTag = require('./_getTag'), isArguments = require('./isArguments'), @@ -35252,7 +35863,7 @@ function isEmpty(value) { module.exports = isEmpty; -},{"./_baseKeys":222,"./_getTag":274,"./_isPrototype":292,"./isArguments":349,"./isArray":350,"./isArrayLike":351,"./isBuffer":354,"./isTypedArray":365}],357:[function(require,module,exports){ +},{"./_baseKeys":225,"./_getTag":277,"./_isPrototype":295,"./isArguments":352,"./isArray":353,"./isArrayLike":354,"./isBuffer":357,"./isTypedArray":368}],360:[function(require,module,exports){ var root = require('./_root'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -35290,7 +35901,7 @@ function isFinite(value) { module.exports = isFinite; -},{"./_root":314}],358:[function(require,module,exports){ +},{"./_root":317}],361:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObject = require('./isObject'); @@ -35329,7 +35940,7 @@ function isFunction(value) { module.exports = isFunction; -},{"./_baseGetTag":210,"./isObject":361}],359:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObject":364}],362:[function(require,module,exports){ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -35366,7 +35977,7 @@ function isLength(value) { module.exports = isLength; -},{}],360:[function(require,module,exports){ +},{}],363:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -35406,7 +36017,7 @@ function isNumber(value) { module.exports = isNumber; -},{"./_baseGetTag":210,"./isObjectLike":362}],361:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObjectLike":365}],364:[function(require,module,exports){ /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -35439,7 +36050,7 @@ function isObject(value) { module.exports = isObject; -},{}],362:[function(require,module,exports){ +},{}],365:[function(require,module,exports){ /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". @@ -35470,7 +36081,7 @@ function isObjectLike(value) { module.exports = isObjectLike; -},{}],363:[function(require,module,exports){ +},{}],366:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isArray = require('./isArray'), isObjectLike = require('./isObjectLike'); @@ -35502,7 +36113,7 @@ function isString(value) { module.exports = isString; -},{"./_baseGetTag":210,"./isArray":350,"./isObjectLike":362}],364:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isArray":353,"./isObjectLike":365}],367:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObjectLike = require('./isObjectLike'); @@ -35533,7 +36144,7 @@ function isSymbol(value) { module.exports = isSymbol; -},{"./_baseGetTag":210,"./isObjectLike":362}],365:[function(require,module,exports){ +},{"./_baseGetTag":213,"./isObjectLike":365}],368:[function(require,module,exports){ var baseIsTypedArray = require('./_baseIsTypedArray'), baseUnary = require('./_baseUnary'), nodeUtil = require('./_nodeUtil'); @@ -35562,7 +36173,7 @@ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedA module.exports = isTypedArray; -},{"./_baseIsTypedArray":220,"./_baseUnary":234,"./_nodeUtil":310}],366:[function(require,module,exports){ +},{"./_baseIsTypedArray":223,"./_baseUnary":237,"./_nodeUtil":313}],369:[function(require,module,exports){ var arrayLikeKeys = require('./_arrayLikeKeys'), baseKeys = require('./_baseKeys'), isArrayLike = require('./isArrayLike'); @@ -35601,7 +36212,7 @@ function keys(object) { module.exports = keys; -},{"./_arrayLikeKeys":187,"./_baseKeys":222,"./isArrayLike":351}],367:[function(require,module,exports){ +},{"./_arrayLikeKeys":190,"./_baseKeys":225,"./isArrayLike":354}],370:[function(require,module,exports){ var arrayLikeKeys = require('./_arrayLikeKeys'), baseKeysIn = require('./_baseKeysIn'), isArrayLike = require('./isArrayLike'); @@ -35635,7 +36246,7 @@ function keysIn(object) { module.exports = keysIn; -},{"./_arrayLikeKeys":187,"./_baseKeysIn":223,"./isArrayLike":351}],368:[function(require,module,exports){ +},{"./_arrayLikeKeys":190,"./_baseKeysIn":226,"./isArrayLike":354}],371:[function(require,module,exports){ (function (global){ /** * @license @@ -52723,7 +53334,7 @@ module.exports = keysIn; }.call(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],369:[function(require,module,exports){ +},{}],372:[function(require,module,exports){ var arrayMap = require('./_arrayMap'), baseIteratee = require('./_baseIteratee'), baseMap = require('./_baseMap'), @@ -52778,7 +53389,7 @@ function map(collection, iteratee) { module.exports = map; -},{"./_arrayMap":188,"./_baseIteratee":221,"./_baseMap":224,"./isArray":350}],370:[function(require,module,exports){ +},{"./_arrayMap":191,"./_baseIteratee":224,"./_baseMap":227,"./isArray":353}],373:[function(require,module,exports){ var baseAssignValue = require('./_baseAssignValue'), baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); @@ -52823,7 +53434,7 @@ function mapValues(object, iteratee) { module.exports = mapValues; -},{"./_baseAssignValue":198,"./_baseForOwn":207,"./_baseIteratee":221}],371:[function(require,module,exports){ +},{"./_baseAssignValue":201,"./_baseForOwn":210,"./_baseIteratee":224}],374:[function(require,module,exports){ var MapCache = require('./_MapCache'); /** Error message constants. */ @@ -52898,7 +53509,7 @@ memoize.Cache = MapCache; module.exports = memoize; -},{"./_MapCache":171}],372:[function(require,module,exports){ +},{"./_MapCache":174}],375:[function(require,module,exports){ /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -52940,7 +53551,7 @@ function negate(predicate) { module.exports = negate; -},{}],373:[function(require,module,exports){ +},{}],376:[function(require,module,exports){ /** * This method returns `undefined`. * @@ -52959,7 +53570,7 @@ function noop() { module.exports = noop; -},{}],374:[function(require,module,exports){ +},{}],377:[function(require,module,exports){ var root = require('./_root'); /** @@ -52984,7 +53595,7 @@ var now = function() { module.exports = now; -},{"./_root":314}],375:[function(require,module,exports){ +},{"./_root":317}],378:[function(require,module,exports){ var before = require('./before'); /** @@ -53011,7 +53622,7 @@ function once(func) { module.exports = once; -},{"./before":333}],376:[function(require,module,exports){ +},{"./before":336}],379:[function(require,module,exports){ var root = require('./_root'), toString = require('./toString'); @@ -53056,7 +53667,7 @@ function parseInt(string, radix, guard) { module.exports = parseInt; -},{"./_root":314,"./toString":388}],377:[function(require,module,exports){ +},{"./_root":317,"./toString":391}],380:[function(require,module,exports){ var createAggregator = require('./_createAggregator'); /** @@ -53101,7 +53712,7 @@ var partition = createAggregator(function(result, value, key) { module.exports = partition; -},{"./_createAggregator":253}],378:[function(require,module,exports){ +},{"./_createAggregator":256}],381:[function(require,module,exports){ var baseProperty = require('./_baseProperty'), basePropertyDeep = require('./_basePropertyDeep'), isKey = require('./_isKey'), @@ -53135,7 +53746,7 @@ function property(path) { module.exports = property; -},{"./_baseProperty":227,"./_basePropertyDeep":228,"./_isKey":289,"./_toKey":328}],379:[function(require,module,exports){ +},{"./_baseProperty":230,"./_basePropertyDeep":231,"./_isKey":292,"./_toKey":331}],382:[function(require,module,exports){ var arrayFilter = require('./_arrayFilter'), baseFilter = require('./_baseFilter'), baseIteratee = require('./_baseIteratee'), @@ -53183,7 +53794,7 @@ function reject(collection, predicate) { module.exports = reject; -},{"./_arrayFilter":184,"./_baseFilter":203,"./_baseIteratee":221,"./isArray":350,"./negate":372}],380:[function(require,module,exports){ +},{"./_arrayFilter":187,"./_baseFilter":206,"./_baseIteratee":224,"./isArray":353,"./negate":375}],383:[function(require,module,exports){ var baseKeys = require('./_baseKeys'), getTag = require('./_getTag'), isArrayLike = require('./isArrayLike'), @@ -53231,7 +53842,7 @@ function size(collection) { module.exports = size; -},{"./_baseKeys":222,"./_getTag":274,"./_stringSize":326,"./isArrayLike":351,"./isString":363}],381:[function(require,module,exports){ +},{"./_baseKeys":225,"./_getTag":277,"./_stringSize":329,"./isArrayLike":354,"./isString":366}],384:[function(require,module,exports){ var arraySome = require('./_arraySome'), baseIteratee = require('./_baseIteratee'), baseSome = require('./_baseSome'), @@ -53284,7 +53895,7 @@ function some(collection, predicate, guard) { module.exports = some; -},{"./_arraySome":191,"./_baseIteratee":221,"./_baseSome":231,"./_isIterateeCall":288,"./isArray":350}],382:[function(require,module,exports){ +},{"./_arraySome":194,"./_baseIteratee":224,"./_baseSome":234,"./_isIterateeCall":291,"./isArray":353}],385:[function(require,module,exports){ /** * This method returns a new empty array. * @@ -53309,7 +53920,7 @@ function stubArray() { module.exports = stubArray; -},{}],383:[function(require,module,exports){ +},{}],386:[function(require,module,exports){ /** * This method returns `false`. * @@ -53329,7 +53940,7 @@ function stubFalse() { module.exports = stubFalse; -},{}],384:[function(require,module,exports){ +},{}],387:[function(require,module,exports){ var debounce = require('./debounce'), isObject = require('./isObject'); @@ -53400,7 +54011,7 @@ function throttle(func, wait, options) { module.exports = throttle; -},{"./debounce":336,"./isObject":361}],385:[function(require,module,exports){ +},{"./debounce":339,"./isObject":364}],388:[function(require,module,exports){ var toNumber = require('./toNumber'); /** Used as references for various `Number` constants. */ @@ -53444,7 +54055,7 @@ function toFinite(value) { module.exports = toFinite; -},{"./toNumber":387}],386:[function(require,module,exports){ +},{"./toNumber":390}],389:[function(require,module,exports){ var toFinite = require('./toFinite'); /** @@ -53482,7 +54093,7 @@ function toInteger(value) { module.exports = toInteger; -},{"./toFinite":385}],387:[function(require,module,exports){ +},{"./toFinite":388}],390:[function(require,module,exports){ var isObject = require('./isObject'), isSymbol = require('./isSymbol'); @@ -53550,7 +54161,7 @@ function toNumber(value) { module.exports = toNumber; -},{"./isObject":361,"./isSymbol":364}],388:[function(require,module,exports){ +},{"./isObject":364,"./isSymbol":367}],391:[function(require,module,exports){ var baseToString = require('./_baseToString'); /** @@ -53580,7 +54191,7 @@ function toString(value) { module.exports = toString; -},{"./_baseToString":233}],389:[function(require,module,exports){ +},{"./_baseToString":236}],392:[function(require,module,exports){ var baseFlatten = require('./_baseFlatten'), baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), @@ -53608,7 +54219,7 @@ var union = baseRest(function(arrays) { module.exports = union; -},{"./_baseFlatten":205,"./_baseRest":229,"./_baseUniq":235,"./isArrayLikeObject":352}],390:[function(require,module,exports){ +},{"./_baseFlatten":208,"./_baseRest":232,"./_baseUniq":238,"./isArrayLikeObject":355}],393:[function(require,module,exports){ var baseValues = require('./_baseValues'), keys = require('./keys'); @@ -53644,7 +54255,7 @@ function values(object) { module.exports = values; -},{"./_baseValues":236,"./keys":366}],391:[function(require,module,exports){ +},{"./_baseValues":239,"./keys":369}],394:[function(require,module,exports){ var baseDifference = require('./_baseDifference'), baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'); @@ -53677,7 +54288,7 @@ var without = baseRest(function(array, values) { module.exports = without; -},{"./_baseDifference":201,"./_baseRest":229,"./isArrayLikeObject":352}],392:[function(require,module,exports){ +},{"./_baseDifference":204,"./_baseRest":232,"./isArrayLikeObject":355}],395:[function(require,module,exports){ 'use strict'; var toPosInt = require('es5-ext/number/to-pos-integer') @@ -53727,7 +54338,7 @@ module.exports = function (limit) { }; }; -},{"es5-ext/number/to-pos-integer":117}],393:[function(require,module,exports){ +},{"es5-ext/number/to-pos-integer":120}],396:[function(require,module,exports){ /* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */ // Support for asynchronous functions @@ -53889,7 +54500,7 @@ require("../lib/registered-extensions").async = function (tbi, conf) { }); }; -},{"../lib/registered-extensions":401,"es5-ext/array/from":101,"es5-ext/function/_define-length":106,"es5-ext/object/map":129,"es5-ext/object/mixin":130,"next-tick":415}],394:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"es5-ext/array/from":104,"es5-ext/function/_define-length":109,"es5-ext/object/map":132,"es5-ext/object/mixin":133,"next-tick":418}],397:[function(require,module,exports){ // Call dispose callback on each cache purge "use strict"; @@ -53924,7 +54535,7 @@ extensions.dispose = function (dispose, conf, options) { }); }; -},{"../lib/registered-extensions":401,"es5-ext/object/for-each":122,"es5-ext/object/valid-callable":133}],395:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"es5-ext/object/for-each":125,"es5-ext/object/valid-callable":136}],398:[function(require,module,exports){ /* eslint consistent-this: 0 */ // Timeout cached values @@ -54019,7 +54630,7 @@ extensions.maxAge = function (maxAge, conf, options) { }); }; -},{"../lib/registered-extensions":401,"es5-ext/array/from":101,"es5-ext/object/for-each":122,"is-promise":163,"next-tick":415,"timers-ext/valid-timeout":492}],396:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"es5-ext/array/from":104,"es5-ext/object/for-each":125,"is-promise":166,"next-tick":418,"timers-ext/valid-timeout":493}],399:[function(require,module,exports){ // Limit cache size, LRU (least recently used) algorithm. "use strict"; @@ -54048,7 +54659,7 @@ extensions.max = function (max, conf, options) { conf.on("clear" + postfix, queue.clear); }; -},{"../lib/registered-extensions":401,"es5-ext/number/to-pos-integer":117,"lru-queue":392}],397:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"es5-ext/number/to-pos-integer":120,"lru-queue":395}],400:[function(require,module,exports){ /* eslint max-statements: 0 */ // Support for functions returning promise @@ -54223,7 +54834,7 @@ require("../lib/registered-extensions").promise = function (mode, conf) { }); }; -},{"../lib/registered-extensions":401,"es5-ext/object/map":129,"es5-ext/object/primitive-set":132,"es5-ext/object/validate-stringifiable-value":135,"es5-ext/to-short-string-representation":142,"is-promise":163,"next-tick":415}],398:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"es5-ext/object/map":132,"es5-ext/object/primitive-set":135,"es5-ext/object/validate-stringifiable-value":138,"es5-ext/to-short-string-representation":145,"is-promise":166,"next-tick":418}],401:[function(require,module,exports){ // Reference counter, useful for garbage collector like functionality "use strict"; @@ -54273,7 +54884,7 @@ extensions.refCounter = function (ignore, conf, options) { }); }; -},{"../lib/registered-extensions":401,"d":73}],399:[function(require,module,exports){ +},{"../lib/registered-extensions":404,"d":76}],402:[function(require,module,exports){ "use strict"; var normalizeOpts = require("es5-ext/object/normalize-options") @@ -54309,7 +54920,7 @@ module.exports = function (fn/*, options*/) { return plain(fn, options); }; -},{"./ext/async":393,"./ext/dispose":394,"./ext/max":396,"./ext/max-age":395,"./ext/promise":397,"./ext/ref-counter":398,"./lib/resolve-length":402,"./normalizers/get":408,"./normalizers/get-1":405,"./normalizers/get-fixed":406,"./normalizers/get-primitive-fixed":407,"./normalizers/primitive":409,"./plain":410,"es5-ext/object/normalize-options":131}],400:[function(require,module,exports){ +},{"./ext/async":396,"./ext/dispose":397,"./ext/max":399,"./ext/max-age":398,"./ext/promise":400,"./ext/ref-counter":401,"./lib/resolve-length":405,"./normalizers/get":411,"./normalizers/get-1":408,"./normalizers/get-fixed":409,"./normalizers/get-primitive-fixed":410,"./normalizers/primitive":412,"./plain":413,"es5-ext/object/normalize-options":134}],403:[function(require,module,exports){ /* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */ "use strict"; @@ -54495,10 +55106,10 @@ module.exports = function (original, length, options) { return conf; }; -},{"./resolve-normalize":403,"./resolve-resolve":404,"d":73,"es5-ext/error/custom":105,"es5-ext/function/_define-length":106,"event-emitter":148}],401:[function(require,module,exports){ +},{"./resolve-normalize":406,"./resolve-resolve":407,"d":76,"es5-ext/error/custom":108,"es5-ext/function/_define-length":109,"event-emitter":151}],404:[function(require,module,exports){ "use strict"; -},{}],402:[function(require,module,exports){ +},{}],405:[function(require,module,exports){ "use strict"; var toPosInt = require("es5-ext/number/to-pos-integer"); @@ -54515,7 +55126,7 @@ module.exports = function (optsLength, fnLength, isAsync) { return toPosInt(optsLength); }; -},{"es5-ext/number/to-pos-integer":117}],403:[function(require,module,exports){ +},{"es5-ext/number/to-pos-integer":120}],406:[function(require,module,exports){ "use strict"; var callable = require("es5-ext/object/valid-callable"); @@ -54534,7 +55145,7 @@ module.exports = function (userNormalizer) { return normalizer; }; -},{"es5-ext/object/valid-callable":133}],404:[function(require,module,exports){ +},{"es5-ext/object/valid-callable":136}],407:[function(require,module,exports){ "use strict"; var toArray = require("es5-ext/array/to-array") @@ -54557,7 +55168,7 @@ module.exports = function (resolvers) { return resolveArgs.bind(resolvers); }; -},{"es5-ext/array/to-array":104,"es5-ext/object/is-value":125,"es5-ext/object/valid-callable":133}],405:[function(require,module,exports){ +},{"es5-ext/array/to-array":107,"es5-ext/object/is-value":128,"es5-ext/object/valid-callable":136}],408:[function(require,module,exports){ "use strict"; var indexOf = require("es5-ext/array/#/e-index-of"); @@ -54588,7 +55199,7 @@ module.exports = function () { }; }; -},{"es5-ext/array/#/e-index-of":100}],406:[function(require,module,exports){ +},{"es5-ext/array/#/e-index-of":103}],409:[function(require,module,exports){ "use strict"; var indexOf = require("es5-ext/array/#/e-index-of") @@ -54661,7 +55272,7 @@ module.exports = function (length) { }; }; -},{"es5-ext/array/#/e-index-of":100}],407:[function(require,module,exports){ +},{"es5-ext/array/#/e-index-of":103}],410:[function(require,module,exports){ "use strict"; module.exports = function (length) { @@ -54679,7 +55290,7 @@ module.exports = function (length) { }; }; -},{}],408:[function(require,module,exports){ +},{}],411:[function(require,module,exports){ /* eslint max-statements: 0 */ "use strict"; @@ -54771,7 +55382,7 @@ module.exports = function () { }; }; -},{"es5-ext/array/#/e-index-of":100}],409:[function(require,module,exports){ +},{"es5-ext/array/#/e-index-of":103}],412:[function(require,module,exports){ "use strict"; module.exports = function (args) { @@ -54782,7 +55393,7 @@ module.exports = function (args) { return id; }; -},{}],410:[function(require,module,exports){ +},{}],413:[function(require,module,exports){ "use strict"; var callable = require("es5-ext/object/valid-callable") @@ -54821,7 +55432,7 @@ module.exports = function self (fn /*, options */) { return conf.memoized; }; -},{"./lib/configure-map":400,"./lib/registered-extensions":401,"./lib/resolve-length":402,"es5-ext/object/for-each":122,"es5-ext/object/valid-callable":133}],411:[function(require,module,exports){ +},{"./lib/configure-map":403,"./lib/registered-extensions":404,"./lib/resolve-length":405,"es5-ext/object/for-each":125,"es5-ext/object/valid-callable":136}],414:[function(require,module,exports){ var bn = require('bn.js'); var brorand = require('brorand'); @@ -54936,7 +55547,7 @@ MillerRabin.prototype.getDivisor = function getDivisor(n, k) { return false; }; -},{"bn.js":35,"brorand":36}],412:[function(require,module,exports){ +},{"bn.js":38,"brorand":39}],415:[function(require,module,exports){ module.exports = assert; function assert(val, msg) { @@ -54949,7 +55560,7 @@ assert.equal = function assertEqual(l, r, msg) { throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); }; -},{}],413:[function(require,module,exports){ +},{}],416:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -55009,7 +55620,7 @@ utils.encode = function encode(arr, enc) { return arr; }; -},{}],414:[function(require,module,exports){ +},{}],417:[function(require,module,exports){ //! moment.js //! version : 2.18.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors @@ -59474,7 +60085,7 @@ return hooks; }))); -},{}],415:[function(require,module,exports){ +},{}],418:[function(require,module,exports){ (function (process){ 'use strict'; @@ -59549,7 +60160,7 @@ module.exports = (function () { }()); }).call(this,require('_process')) -},{"_process":425}],416:[function(require,module,exports){ +},{"_process":428}],419:[function(require,module,exports){ module.exports={"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", @@ -59563,7 +60174,7 @@ module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", "2.16.840.1.101.3.4.1.43": "aes-256-ofb", "2.16.840.1.101.3.4.1.44": "aes-256-cfb" } -},{}],417:[function(require,module,exports){ +},{}],420:[function(require,module,exports){ // from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js // Fedor, you are amazing. 'use strict' @@ -59687,7 +60298,7 @@ exports.signature = asn1.define('signature', function () { ) }) -},{"./certificate":418,"asn1.js":19}],418:[function(require,module,exports){ +},{"./certificate":421,"asn1.js":22}],421:[function(require,module,exports){ // from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js // thanks to @Rantanen @@ -59777,7 +60388,7 @@ var X509Certificate = asn.define('X509Certificate', function () { module.exports = X509Certificate -},{"asn1.js":19}],419:[function(require,module,exports){ +},{"asn1.js":22}],422:[function(require,module,exports){ (function (Buffer){ // 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?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m @@ -59811,7 +60422,7 @@ module.exports = function (okey, password) { } }).call(this,require("buffer").Buffer) -},{"browserify-aes":40,"buffer":64,"evp_bytestokey":150}],420:[function(require,module,exports){ +},{"browserify-aes":43,"buffer":67,"evp_bytestokey":153}],423:[function(require,module,exports){ (function (Buffer){ var asn1 = require('./asn1') var aesid = require('./aesid.json') @@ -59921,7 +60532,7 @@ function decrypt (data, password) { } }).call(this,require("buffer").Buffer) -},{"./aesid.json":416,"./asn1":417,"./fixProc":419,"browserify-aes":40,"buffer":64,"pbkdf2":421}],421:[function(require,module,exports){ +},{"./aesid.json":419,"./asn1":420,"./fixProc":422,"browserify-aes":43,"buffer":67,"pbkdf2":424}],424:[function(require,module,exports){ (function (process,Buffer){ var createHmac = require('create-hmac') var checkParameters = require('./precondition') @@ -59993,7 +60604,7 @@ exports.pbkdf2Sync = function (password, salt, iterations, keylen, digest) { } }).call(this,require('_process'),require("buffer").Buffer) -},{"./precondition":422,"_process":425,"buffer":64,"create-hmac":71}],422:[function(require,module,exports){ +},{"./precondition":425,"_process":428,"buffer":67,"create-hmac":74}],425:[function(require,module,exports){ var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs module.exports = function (iterations, keylen) { if (typeof iterations !== 'number') { @@ -60013,7 +60624,7 @@ module.exports = function (iterations, keylen) { } } -},{}],423:[function(require,module,exports){ +},{}],426:[function(require,module,exports){ // Generated by CoffeeScript 1.11.1 (function() { var slice = [].slice, @@ -60644,7 +61255,7 @@ module.exports = function (iterations, keylen) { }).call(this); -},{}],424:[function(require,module,exports){ +},{}],427:[function(require,module,exports){ (function (process){ 'use strict'; @@ -60691,7 +61302,7 @@ function nextTick(fn, arg1, arg2, arg3) { } }).call(this,require('_process')) -},{"_process":425}],425:[function(require,module,exports){ +},{"_process":428}],428:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -60873,13 +61484,13 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],426:[function(require,module,exports){ +},{}],429:[function(require,module,exports){ 'use strict'; module.exports = require('./lib/memoize'); -},{"./lib/memoize":427}],427:[function(require,module,exports){ +},{"./lib/memoize":430}],430:[function(require,module,exports){ 'use strict'; @@ -61064,7 +61675,7 @@ module.exports = function promiseMemoize(fn, options) { return memoizedFn; }; -},{"./resolver":428}],428:[function(require,module,exports){ +},{"./resolver":431}],431:[function(require,module,exports){ 'use strict'; @@ -61128,7 +61739,7 @@ module.exports = function createResolver(how) { throw new Error('promise-memoize: invalid resolve option'); }; -},{}],429:[function(require,module,exports){ +},{}],432:[function(require,module,exports){ exports.publicEncrypt = require('./publicEncrypt'); exports.privateDecrypt = require('./privateDecrypt'); @@ -61139,7 +61750,7 @@ exports.privateEncrypt = function privateEncrypt(key, buf) { exports.publicDecrypt = function publicDecrypt(key, buf) { return exports.privateDecrypt(key, buf, true); }; -},{"./privateDecrypt":431,"./publicEncrypt":432}],430:[function(require,module,exports){ +},{"./privateDecrypt":434,"./publicEncrypt":435}],433:[function(require,module,exports){ (function (Buffer){ var createHash = require('create-hash'); module.exports = function (seed, len) { @@ -61158,7 +61769,7 @@ function i2ops(c) { return out; } }).call(this,require("buffer").Buffer) -},{"buffer":64,"create-hash":68}],431:[function(require,module,exports){ +},{"buffer":67,"create-hash":71}],434:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var mgf = require('./mgf'); @@ -61269,7 +61880,7 @@ function compare(a, b){ return dif; } }).call(this,require("buffer").Buffer) -},{"./mgf":430,"./withPublic":433,"./xor":434,"bn.js":35,"browserify-rsa":56,"buffer":64,"create-hash":68,"parse-asn1":420}],432:[function(require,module,exports){ +},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":38,"browserify-rsa":59,"buffer":67,"create-hash":71,"parse-asn1":423}],435:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var randomBytes = require('randombytes'); @@ -61367,7 +61978,7 @@ function nonZero(len, crypto) { return out; } }).call(this,require("buffer").Buffer) -},{"./mgf":430,"./withPublic":433,"./xor":434,"bn.js":35,"browserify-rsa":56,"buffer":64,"create-hash":68,"parse-asn1":420,"randombytes":445}],433:[function(require,module,exports){ +},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":38,"browserify-rsa":59,"buffer":67,"create-hash":71,"parse-asn1":423,"randombytes":448}],436:[function(require,module,exports){ (function (Buffer){ var bn = require('bn.js'); function withPublic(paddedMsg, key) { @@ -61380,7 +61991,7 @@ function withPublic(paddedMsg, key) { module.exports = withPublic; }).call(this,require("buffer").Buffer) -},{"bn.js":35,"buffer":64}],434:[function(require,module,exports){ +},{"bn.js":38,"buffer":67}],437:[function(require,module,exports){ module.exports = function xor(a, b) { var len = a.length; var i = -1; @@ -61389,11 +62000,11 @@ module.exports = function xor(a, b) { } return a }; -},{}],435:[function(require,module,exports){ +},{}],438:[function(require,module,exports){ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PubNub=t():e.PubNub=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),u=r(a),c=n(46),l=r(c),h=(n(8),{get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}}),f=function(e){function t(e){i(this,t),e.db=h,e.sdkFamily="Web",e.networking=new l.default;var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return window.addEventListener("offline",function(){n.__networkDownDetected()}),window.addEventListener("online",function(){n.__networkUpDetected()}),n}return s(t,e),t}(u.default);t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;nc)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,l=f,u=s,h+=122192928e5;var p=(1e4*(268435455&h)+f)%4294967296;i[r++]=p>>>24&255,i[r++]=p>>>16&255,i[r++]=p>>>8&255,i[r++]=255&p;var g=h/4294967296*1e4&268435455;i[r++]=g>>>8&255,i[r++]=255&g,i[r++]=g>>>24&15|16,i[r++]=g>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var y=e.node||a,v=0;v<6;++v)i[r+v]=y[v];return t?t:o(i)}var i=n(4),o=n(5),s=i(),a=[1|s[0],s[1],s[2],s[3],s[4],s[5]],u=16383&(s[6]<<8|s[7]),c=0,l=0;e.exports=r},function(e,t){(function(t){var n,r=t.crypto||t.msCrypto;if(r&&r.getRandomValues){var i=new Uint8Array(16);n=function(){return r.getRandomValues(i),i}}if(!n){var o=new Array(16);n=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=n}).call(t,function(){return this}())},function(e,t){function n(e,t){var n=t||0,i=r;return i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=n},function(e,t,n){function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[r+a]=s[a];return t||o(s)}var i=n(4),o=n(5);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n>>2]|=(n[i>>>2]>>>24-8*(i%4)&255)<<24-8*((r+i)%4);else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-8*(r%4)&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-4*(r%8);return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-8*(r%4)&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-8*(r%4);return new s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},h=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0);if(t=a*o,i=e.min(4*t,i),t){for(var u=0;ul;){var h;e:{h=c;for(var f=e.sqrt(h),d=2;d<=f;d++)if(!(h%d)){h=!1;break e}h=!0}h&&(8>l&&(s[l]=u(e.pow(c,.5))),a[l]=u(e.pow(c,1/3)),l++),c++}var p=[],r=r.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=0;64>f;f++){if(16>f)p[f]=0|e[t+f];else{var d=p[f-15],g=p[f-2];p[f]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+p[f-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[f-16]}d=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+a[f]+p[f],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),h=l,l=c,c=u,u=s+d|0,s=o,o=i,i=r,r=d+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=e.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(r),t.HmacSHA256=o._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var o=this._oKey=n.clone(),s=this._iKey=n.clone(),a=o.words,u=s.words,c=0;c>>2]>>>24-8*(i%4)&255)<<16|(t[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|t[i+2>>>2]>>>24-8*((i+2)%4)&255,s=0;4>s&&i+.75*s>>6*(3-s)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,i=r.charAt(64);i&&(i=e.indexOf(i),-1!=i&&(n=i));for(var i=[],o=0,s=0;s>>6-2*(s%4);i[o>>>2]|=(a|u)<<24-8*(o%4),o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,i,o,s){return e=e+(t&n|~t&r)+i+s,(e<>>32-o)+t}function r(e,t,n,r,i,o,s){return e=e+(t&r|n&~r)+i+s,(e<>>32-o)+t}function i(e,t,n,r,i,o,s){return e=e+(t^n^r)+i+s,(e<>>32-o)+t}function o(e,t,n,r,i,o,s){return e=e+(n^(t|~r))+i+s,(e<>>32-o)+t}for(var s=n,a=s.lib,u=a.WordArray,c=a.Hasher,a=s.algo,l=[],h=0;64>h;h++)l[h]=4294967296*e.abs(e.sin(h+1))|0;a=a.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var s=0;16>s;s++){var a=n+s,u=e[a];e[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var s=this._hash.words,a=e[n+0],u=e[n+1],c=e[n+2],h=e[n+3],f=e[n+4],d=e[n+5],p=e[n+6],g=e[n+7],y=e[n+8],v=e[n+9],b=e[n+10],_=e[n+11],m=e[n+12],k=e[n+13],P=e[n+14],S=e[n+15],O=s[0],w=s[1],C=s[2],M=s[3],O=t(O,w,C,M,a,7,l[0]),M=t(M,O,w,C,u,12,l[1]),C=t(C,M,O,w,c,17,l[2]),w=t(w,C,M,O,h,22,l[3]),O=t(O,w,C,M,f,7,l[4]),M=t(M,O,w,C,d,12,l[5]),C=t(C,M,O,w,p,17,l[6]),w=t(w,C,M,O,g,22,l[7]),O=t(O,w,C,M,y,7,l[8]),M=t(M,O,w,C,v,12,l[9]),C=t(C,M,O,w,b,17,l[10]),w=t(w,C,M,O,_,22,l[11]),O=t(O,w,C,M,m,7,l[12]),M=t(M,O,w,C,k,12,l[13]),C=t(C,M,O,w,P,17,l[14]),w=t(w,C,M,O,S,22,l[15]),O=r(O,w,C,M,u,5,l[16]),M=r(M,O,w,C,p,9,l[17]),C=r(C,M,O,w,_,14,l[18]),w=r(w,C,M,O,a,20,l[19]),O=r(O,w,C,M,d,5,l[20]),M=r(M,O,w,C,b,9,l[21]),C=r(C,M,O,w,S,14,l[22]),w=r(w,C,M,O,f,20,l[23]),O=r(O,w,C,M,v,5,l[24]),M=r(M,O,w,C,P,9,l[25]),C=r(C,M,O,w,h,14,l[26]),w=r(w,C,M,O,y,20,l[27]),O=r(O,w,C,M,k,5,l[28]),M=r(M,O,w,C,c,9,l[29]),C=r(C,M,O,w,g,14,l[30]),w=r(w,C,M,O,m,20,l[31]),O=i(O,w,C,M,d,4,l[32]),M=i(M,O,w,C,y,11,l[33]),C=i(C,M,O,w,_,16,l[34]),w=i(w,C,M,O,P,23,l[35]),O=i(O,w,C,M,u,4,l[36]),M=i(M,O,w,C,f,11,l[37]),C=i(C,M,O,w,g,16,l[38]),w=i(w,C,M,O,b,23,l[39]),O=i(O,w,C,M,k,4,l[40]),M=i(M,O,w,C,a,11,l[41]),C=i(C,M,O,w,h,16,l[42]),w=i(w,C,M,O,p,23,l[43]),O=i(O,w,C,M,v,4,l[44]),M=i(M,O,w,C,m,11,l[45]),C=i(C,M,O,w,S,16,l[46]),w=i(w,C,M,O,c,23,l[47]),O=o(O,w,C,M,a,6,l[48]),M=o(M,O,w,C,g,10,l[49]),C=o(C,M,O,w,P,15,l[50]),w=o(w,C,M,O,d,21,l[51]),O=o(O,w,C,M,m,6,l[52]),M=o(M,O,w,C,h,10,l[53]),C=o(C,M,O,w,b,15,l[54]),w=o(w,C,M,O,u,21,l[55]),O=o(O,w,C,M,y,6,l[56]),M=o(M,O,w,C,S,10,l[57]),C=o(C,M,O,w,p,15,l[58]),w=o(w,C,M,O,k,21,l[59]),O=o(O,w,C,M,f,6,l[60]),M=o(M,O,w,C,_,10,l[61]),C=o(C,M,O,w,c,15,l[62]),w=o(w,C,M,O,v,21,l[63]);s[0]=s[0]+O|0,s[1]=s[1]+w|0,s[2]=s[2]+C|0,s[3]=s[3]+M|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[(i+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),s.MD5=c._createHelper(a),s.HmacMD5=c._createHmacHelper(a)}(Math),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,t=e.algo,o=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),s=o.words,a=n.keySize,n=n.iterations;s.length>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:f}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?o.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){e=a.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=o.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},p=r.SerializableCipher=i.extend({cfg:i.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,d.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=o.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=o.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:r})}},g=r.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=p.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,p.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],d=[],p=[],g=0;256>g;g++)p[g]=128>g?g<<1:g<<1^283;for(var y=0,v=0,g=0;256>g;g++){var b=v^v<<1^v<<2^v<<3^v<<4,b=b>>>8^255&b^99;i[y]=b,o[b]=y;var _=p[y],m=p[_],k=p[m],P=257*p[b]^16843008*b;s[y]=P<<24|P>>>8,a[y]=P<<16|P>>>16,u[y]=P<<8|P>>>24,c[y]=P,P=16843009*k^65537*m^257*_^16843008*y,l[b]=P<<24|P>>>8,h[b]=P<<16|P>>>16,f[b]=P<<8|P>>>24,d[b]=P,y?(y=_^p[p[p[k^_]]],v^=p[p[v]]):y=v=1}var S=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;o>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=s<<8|s>>>24,s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=S[o/n|0]<<24),r[o]=r[o-n]^s}for(t=this._invKeySchedule=[],n=0;nn||4>=o?s:l[i[s>>>24]]^h[i[s>>>16&255]]^f[i[s>>>8&255]]^d[i[255&s]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[d++],y=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],v=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],f=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[d++],c=g,l=y,h=v;g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],y=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],f=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=f},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){var i=a.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return this._abstractedXDR(i,n,r)}},{key:"GET",value:function(e,t,n){var r=a.default.get(this.getStandardOrigin()+t.url).query(e);return this._abstractedXDR(r,t,n)}},{key:"_abstractedXDR",value:function(e,t,n){var r=this;return this._config.logVerbosity&&(e=e.use(this._attachSuperagentLogger)),this._config.proxy&&(e=e.proxy(this._config.proxy)),this._config.keepAlive&&this._agentKeepAlive&&(e=this._agentKeepAlive(e)),e.timeout(t.timeout).end(function(e,i){var o={};if(o.error=null!==e,o.operation=t.operation,i&&i.status&&(o.statusCode=i.status),e)return o.errorData=e,o.category=r._detectErrorCategory(e),n(o,null);var s=JSON.parse(i.text);return n(o,s)})}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return l.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return l.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return l.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return l.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&"undefined"==typeof e.status)return l.default.PNNetworkIssuesCategory;if(e.timeout)return l.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return l.default.PNBadRequestCategory;if(e.response.forbidden)return l.default.PNAccessDeniedCategory; }return l.default.PNUnknownCategory}},{key:"_attachSuperagentLogger",value:function(e){var t=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console},n=(new Date).getTime(),r=(new Date).toISOString(),i=t();i.log("<<<<<"),i.log("["+r+"]","\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",function(t){var r=(new Date).getTime(),o=r-n,s=(new Date).toISOString();i.log(">>>>>>"),i.log("["+s+" / "+o+"]","\n",e.url,"\n",e.qs,"\n",t.text),i.log("-----")})}}]),e}());t.default=h,e.exports=t.default},function(e,t,n){function r(){}function i(e){if(!v(e))return e;var t=[];for(var n in e)o(t,n,e[n]);return t.join("&")}function o(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o(e,t,n)});else if(v(n))for(var r in n)o(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o=300)&&(r=new Error(t.statusText||"Unsuccessful HTTP response"),r.original=e,r.response=t,r.status=t.status)}catch(e){r=e}r?n.callback(r,t):n.callback(null,t)})}function d(e,t){var n=b("DELETE",e);return t&&n.end(t),n}var p;"undefined"!=typeof window?p=window:"undefined"!=typeof self?p=self:(console.warn("Using browser-only version of superagent in non-browser environment"),p=this);var g=n(13),y=n(14),v=n(15),b=e.exports=n(16).bind(null,f);b.getXHR=function(){if(!(!p.XMLHttpRequest||p.location&&"file:"==p.location.protocol&&p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};b.serializeObject=i,b.parseString=s,b.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},b.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},b.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},h.prototype.get=function(e){return this.header[e.toLowerCase()]},h.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var n=l(t);for(var r in n)this[r]=n[r]},h.prototype._parseBody=function(e){var t=b.parse[this.type];return!t&&u(this.type)&&(t=b.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},h.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},h.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},b.Response=h,g(f.prototype);for(var m in y)f.prototype[m]=y[m];f.prototype.type=function(e){return this.set("Content-Type",b.types[e]||e),this},f.prototype.responseType=function(e){return this._responseType=e,this},f.prototype.accept=function(e){return this.set("Accept",b.types[e]||e),this},f.prototype.auth=function(e,t,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(e+":"+t);this.set("Authorization","Basic "+r);break;case"auto":this.username=e,this.password=t}return this},f.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},f.prototype.attach=function(e,t,n){return this._getFormData().append(e,t,n||t.name),this},f.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},f.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},f.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},f.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},f.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},f.prototype.end=function(e){var t=this,n=this.xhr=b.getXHR(),i=this._timeout,o=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var s=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{n.onprogress=s.bind(null,"download"),n.upload&&(n.upload.onprogress=s.bind(null,"upload"))}catch(e){}if(i&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},i)),this._appendQueryString(),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof o&&!this._isHost(o)){var a=this._header["content-type"],c=this._serializer||b.serialize[a?a.split(";")[0]:""];!c&&u(a)&&(c=b.serialize["application/json"]),c&&(o=c(o))}for(var l in this.header)null!=this.header[l]&&n.setRequestHeader(l,this.header[l]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!=typeof o?o:null),this},b.Request=f,b.get=function(e,t,n){var r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=function(e,t,n){var r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.options=function(e,t,n){var r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=d,b.delete=d,b.patch=function(e,t,n){var r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=function(e,t,n){var r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=function(e,t,n){var r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i=o){var s={};s.category=p.default.PNRequestMessageCountExceededCategory,s.operation=e.operation,this._listenerManager.announceStatus(s)}i.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,i=e.publishMetaData;if(t===r&&(r=null),f.default.endsWith(e.channel,"-pnpres")){var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=r?t:null,o.subscribedChannel=null!=r?r:t,t&&(o.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(o.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),o.action=e.payload.action,o.state=e.payload.data,o.timetoken=i.publishTimetoken,o.occupancy=e.payload.occupancy,o.uuid=e.payload.uuid,o.timestamp=e.payload.timestamp,n._listenerManager.announcePresence(o)}else{var s={};s.channel=null,s.subscription=null,s.actualChannel=null!=r?t:null,s.subscribedChannel=null!=r?r:t,s.channel=t,s.subscription=r,s.timetoken=i.publishTimetoken,s.publisher=e.issuingClientId,n._config.cipherKey?s.message=n._crypto.decrypt(e.payload):s.message=e.payload,n._listenerManager.announceMessage(s)}}),this._region=t.metadata.region,this._timetoken=t.metadata.timetoken,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&(this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+p.default.encodeString(o)+"/leave"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNWhereNowOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+i}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHeartbeatOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+p.default.encodeString(o)+"/heartbeat"}function a(){return!0}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.state,o=void 0===i?{}:i,s=e.config,a={};return r.length>0&&(a["channel-group"]=r.join(",")),a.state=JSON.stringify(o),a.heartbeat=s.getPresenceTimeout(),a}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNGetStateOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r,o=t.channels,s=void 0===o?[]:o,a=s.length>0?s.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+p.default.encodeString(a)+"/uuid/"+i}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,o=n.channelGroups,s=void 0===o?[]:o,a={};return 1===i.length&&0===s.length?a[i[0]]=t.payload:a=t.payload,{channels:a}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSetStateOperation}function o(e,t){var n=e.config,r=t.state,i=t.channels,o=void 0===i?[]:i,s=t.channelGroups,a=void 0===s?[]:s;return r?n.subscribeKey?0===o.length&&0===a.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+p.default.encodeString(o)+"/uuid/"+n.UUID+"/data"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,i=void 0===r?[]:r,o={};return o.state=JSON.stringify(n),i.length>0&&(o["channel-group"]=i.join(",")),o}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHereNowOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=t.channelGroups,s=void 0===o?[]:o,a="/v2/presence/sub-key/"+n.subscribeKey;if(i.length>0||s.length>0){var u=i.length>0?i.join(","):",";a+="/channel/"+p.default.encodeString(u)}return a}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.includeUUIDs,o=void 0===i||i,s=t.includeState,a=void 0!==s&&s,u={};return o||(u.disable_uuids=1),a&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,o=n.channelGroups,s=void 0===o?[]:o,a=n.includeUUIDs,u=void 0===a||a,c=n.includeState,l=void 0!==c&&c,h=function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:n,name:i[0],occupancy:t.occupancy},u&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e},f=function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],i=[];return e.channels[n]={occupants:i,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e},d=void 0;return d=i.length>1||s.length>0||0===s.length&&0===i.length?f():h()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAccessManagerAudit}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e){var t=e.config;return"/v2/auth/audit/sub-key/"+t.subscribeKey}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!1}function c(e,t){var n=t.channel,r=t.channelGroup,i=t.authKeys,o=void 0===i?[]:i,s={};return n&&(s.channel=n),r&&(s["channel-group"]=r),o.length>0&&(s.auth=o.join(",")),s}function l(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAccessManagerGrant}function o(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function s(e){var t=e.config;return"/v2/auth/grant/sub-key/"+t.subscribeKey}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!1}function c(e,t){var n=t.channels,r=void 0===n?[]:n,i=t.channelGroups,o=void 0===i?[]:i,s=t.ttl,a=t.read,u=void 0!==a&&a,c=t.write,l=void 0!==c&&c,h=t.manage,f=void 0!==h&&h,d=t.authKeys,p=void 0===d?[]:d,g={};return g.r=u?"1":"0",g.w=l?"1":"0",g.m=f?"1":"0",r.length>0&&(g.channel=r.join(",")),o.length>0&&(g["channel-group"]=o.join(",")),p.length>0&&(g.auth=p.join(",")),(s||0===s)&&(g.ttl=s),g}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.crypto,r=e.config,i=JSON.stringify(t);return r.cipherKey&&(i=n.encrypt(i),i=JSON.stringify(i)),i}function o(){return v.default.PNPublishOperation}function s(e,t){var n=e.config,r=t.message,i=t.channel;return i?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function a(e,t){var n=t.sendByPost,r=void 0!==n&&n;return r}function u(e,t){var n=e.config,r=t.channel,o=t.message,s=i(e,o);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(s)}function c(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function l(e){var t=e.config;return t.getTransactionTimeout()}function h(){return!0}function f(e,t){var n=t.message;return i(e,n)}function d(e,t){var n=t.meta,r=t.replicate,i=void 0===r||r,o=t.storeInHistory,s=t.ttl,a={};return null!=o&&(o?a.store="1":a.store="0"),s&&(a.ttl=s),i===!1&&(a.norep="true"),n&&"object"===("undefined"==typeof n?"undefined":g(n))&&(a.meta=JSON.stringify(n)),a}function p(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=o,t.validateParams=s,t.usePost=a,t.getURL=u,t.postURL=c,t.getRequestTimeout=l,t.isAuthSupported=h,t.postPayload=f,t.prepareParams=d,t.handleResponse=p;var y=(n(8),n(22)),v=r(y),b=n(23),_=r(b)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function o(){return d.default.PNHistoryOperation}function s(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(e,t){var n=t.channel,r=e.config;return"/v2/history/sub-key/"+r.subscribeKey+"/channel/"+g.default.encodeString(n)}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.reverse,o=t.count,s=void 0===o?100:o,a=t.stringifiedTimeToken,u=void 0!==a&&a,c={include_token:"true"};return c.count=s,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function h(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:i(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=s,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(8),n(22)),d=r(f),p=n(23),g=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function o(){return d.default.PNFetchMessagesOperation}function s(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function a(e,t){var n=t.channels,r=void 0===n?[]:n,i=e.config,o=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+g.default.encodeString(o)}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.count,o={};return i&&(o.max=i),n&&(o.start=n),r&&(o.end=r),o}function h(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var o={};o.channel=r,o.subscription=null,o.timetoken=t.timetoken,o.message=i(e,t.message),n.channels[r].push(o)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=s,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(8),n(22)),d=r(f),p=n(23),g=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSubscribeOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+p.default.encodeString(o)+"/0"}function a(e){var t=e.config;return t.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.channelGroups,i=void 0===r?[]:r,o=t.timetoken,s=t.filterExpression,a=t.region,u={heartbeat:n.getPresenceTimeout()};return i.length>0&&(u["channel-group"]=i.join(",")),s&&s.length>0&&(u["filter-expr"]=s),o&&(u.tt=o),a&&(u.tr=a),u}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(8),n(22)),f=r(h),d=n(23),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return!(!navigator||!navigator.sendBeacon)&&void navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(11),c=r(u),l=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{sendBeaconModule:a}))}return s(t,e),t}(c.default);t.default=l,e.exports=t.default}])}); -},{}],436:[function(require,module,exports){ +},{}],439:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -61930,7 +62541,7 @@ n(22)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],437:[function(require,module,exports){ +},{}],440:[function(require,module,exports){ 'use strict'; var replace = String.prototype.replace; @@ -61950,7 +62561,7 @@ module.exports = { RFC3986: 'RFC3986' }; -},{}],438:[function(require,module,exports){ +},{}],441:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); @@ -61963,7 +62574,7 @@ module.exports = { stringify: stringify }; -},{"./formats":437,"./parse":439,"./stringify":440}],439:[function(require,module,exports){ +},{"./formats":440,"./parse":442,"./stringify":443}],442:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -62132,7 +62743,7 @@ module.exports = function (str, opts) { return utils.compact(obj); }; -},{"./utils":441}],440:[function(require,module,exports){ +},{"./utils":444}],443:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -62341,7 +62952,7 @@ module.exports = function (object, opts) { return keys.join(delimiter); }; -},{"./formats":437,"./utils":441}],441:[function(require,module,exports){ +},{"./formats":440,"./utils":444}],444:[function(require,module,exports){ 'use strict'; var has = Object.prototype.hasOwnProperty; @@ -62525,7 +63136,7 @@ exports.isBuffer = function (obj) { return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; -},{}],442:[function(require,module,exports){ +},{}],445:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -62611,7 +63222,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],443:[function(require,module,exports){ +},{}],446:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -62698,13 +63309,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],444:[function(require,module,exports){ +},{}],447:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":442,"./encode":443}],445:[function(require,module,exports){ +},{"./decode":445,"./encode":446}],448:[function(require,module,exports){ (function (process,global,Buffer){ 'use strict' @@ -62744,9 +63355,9 @@ function randomBytes (size, cb) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"_process":425,"buffer":64}],446:[function(require,module,exports){ +},{"_process":428,"buffer":67}],449:[function(require,module,exports){ module.exports = require("./lib/randomstring"); -},{"./lib/randomstring":448}],447:[function(require,module,exports){ +},{"./lib/randomstring":451}],450:[function(require,module,exports){ var arrayUniq = require('array-uniq'); function Charset() { @@ -62801,7 +63412,7 @@ Charset.prototype.removeDuplicates = function() { } module.exports = exports = Charset; -},{"array-uniq":449}],448:[function(require,module,exports){ +},{"array-uniq":452}],451:[function(require,module,exports){ "use strict"; var crypto = require('crypto'); @@ -62870,7 +63481,7 @@ exports.generate = function(options) { return string; }; -},{"./charset.js":447,"crypto":72}],449:[function(require,module,exports){ +},{"./charset.js":450,"crypto":75}],452:[function(require,module,exports){ (function (global){ 'use strict'; @@ -62934,10 +63545,10 @@ if ('Set' in global) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],450:[function(require,module,exports){ +},{}],453:[function(require,module,exports){ module.exports = require("./lib/_stream_duplex.js") -},{"./lib/_stream_duplex.js":451}],451:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":454}],454:[function(require,module,exports){ // 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 @@ -63013,7 +63624,7 @@ function forEach(xs, f) { f(xs[i], i); } } -},{"./_stream_readable":453,"./_stream_writable":455,"core-util-is":66,"inherits":161,"process-nextick-args":424}],452:[function(require,module,exports){ +},{"./_stream_readable":456,"./_stream_writable":458,"core-util-is":69,"inherits":164,"process-nextick-args":427}],455:[function(require,module,exports){ // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. @@ -63040,7 +63651,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":454,"core-util-is":66,"inherits":161}],453:[function(require,module,exports){ +},{"./_stream_transform":457,"core-util-is":69,"inherits":164}],456:[function(require,module,exports){ (function (process){ 'use strict'; @@ -63984,7 +64595,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process')) -},{"./_stream_duplex":451,"./internal/streams/BufferList":456,"_process":425,"buffer":64,"buffer-shims":62,"core-util-is":66,"events":149,"inherits":161,"isarray":457,"process-nextick-args":424,"string_decoder/":490,"util":37}],454:[function(require,module,exports){ +},{"./_stream_duplex":454,"./internal/streams/BufferList":459,"_process":428,"buffer":67,"buffer-shims":65,"core-util-is":69,"events":152,"inherits":164,"isarray":460,"process-nextick-args":427,"string_decoder/":491,"util":40}],457:[function(require,module,exports){ // 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 @@ -64167,7 +64778,7 @@ function done(stream, er, data) { return stream.push(null); } -},{"./_stream_duplex":451,"core-util-is":66,"inherits":161}],455:[function(require,module,exports){ +},{"./_stream_duplex":454,"core-util-is":69,"inherits":164}],458:[function(require,module,exports){ (function (process){ // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all @@ -64721,7 +65332,7 @@ function CorkedRequest(state) { }; } }).call(this,require('_process')) -},{"./_stream_duplex":451,"_process":425,"buffer":64,"buffer-shims":62,"core-util-is":66,"events":149,"inherits":161,"process-nextick-args":424,"util-deprecate":497}],456:[function(require,module,exports){ +},{"./_stream_duplex":454,"_process":428,"buffer":67,"buffer-shims":65,"core-util-is":69,"events":152,"inherits":164,"process-nextick-args":427,"util-deprecate":497}],459:[function(require,module,exports){ 'use strict'; var Buffer = require('buffer').Buffer; @@ -64786,17 +65397,17 @@ BufferList.prototype.concat = function (n) { } return ret; }; -},{"buffer":64,"buffer-shims":62}],457:[function(require,module,exports){ +},{"buffer":67,"buffer-shims":65}],460:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],458:[function(require,module,exports){ +},{}],461:[function(require,module,exports){ module.exports = require("./lib/_stream_passthrough.js") -},{"./lib/_stream_passthrough.js":452}],459:[function(require,module,exports){ +},{"./lib/_stream_passthrough.js":455}],462:[function(require,module,exports){ (function (process){ var Stream = (function (){ try { @@ -64816,13 +65427,13 @@ if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { } }).call(this,require('_process')) -},{"./lib/_stream_duplex.js":451,"./lib/_stream_passthrough.js":452,"./lib/_stream_readable.js":453,"./lib/_stream_transform.js":454,"./lib/_stream_writable.js":455,"_process":425}],460:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":454,"./lib/_stream_passthrough.js":455,"./lib/_stream_readable.js":456,"./lib/_stream_transform.js":457,"./lib/_stream_writable.js":458,"_process":428}],463:[function(require,module,exports){ module.exports = require("./lib/_stream_transform.js") -},{"./lib/_stream_transform.js":454}],461:[function(require,module,exports){ +},{"./lib/_stream_transform.js":457}],464:[function(require,module,exports){ module.exports = require("./lib/_stream_writable.js") -},{"./lib/_stream_writable.js":455}],462:[function(require,module,exports){ +},{"./lib/_stream_writable.js":458}],465:[function(require,module,exports){ // Generated by CoffeeScript 1.12.4 /* @@ -65066,7 +65677,7 @@ exports.getLastClearTime = function(pubnubKeys, device) { }); }; -},{"./pubnub":463,"./utils":464,"bluebird":34,"events":149,"lodash/assign":331,"lodash/flatten":342}],463:[function(require,module,exports){ +},{"./pubnub":466,"./utils":467,"bluebird":37,"events":152,"lodash/assign":334,"lodash/flatten":345}],466:[function(require,module,exports){ // Generated by CoffeeScript 1.12.4 /* @@ -65157,7 +65768,7 @@ exports.history = function(instance, channel, options) { }); }; -},{"bluebird":34,"lodash/assign":331,"lodash/memoize":371,"pubnub":435}],464:[function(require,module,exports){ +},{"bluebird":37,"lodash/assign":334,"lodash/memoize":374,"pubnub":438}],467:[function(require,module,exports){ // Generated by CoffeeScript 1.12.4 /* @@ -65193,575 +65804,206 @@ getBaseChannel = function(device) { * @function * @protected * - * @param {Object} device - device - * @returns {String} logs channel name - * - * @example - * channel = utils.getChannel('...') - */ - -exports.getChannel = function(device, suffix) { - if (suffix == null) { - suffix = 'logs'; - } - return "device-" + (getBaseChannel(device)) + "-" + suffix; -}; - - -/** - * @summary Get logs and clear logs channel names for the given device - * @function - * @protected - * - * @param {Object} device - device - * @returns {Object} { channel, clearChannel } - * - * @example - * channel = utils.getChannel('...') - */ - -exports.getChannels = function(device) { - return { - channel: exports.getChannel(device), - clearChannel: exports.getChannel(device, 'clear-logs') - }; -}; - - -/** - * @summary Extract messages from PubNub payload - * @function - * @public - * - * @param {*} message - message - * @returns {Object[]} log messages - * - * @example - * messages = utils.extractMessages('foo bar') - */ - -exports.extractMessages = function(message) { - if (isString(message)) { - return [ - { - isSystem: /\[system\]/.test(message), - message: message, - timestamp: null - } - ]; - } else if (isArray(message)) { - return message.map(function(arg) { - var m, s, t; - m = arg.m, t = arg.t, s = arg.s; - return { - message: m, - timestamp: t, - isSystem: Boolean(s) - }; - }); - } else { - return [ - assign({ - isSystem: false, - timestamp: null - }, message) - ]; - } -}; - -},{"lodash/assign":331,"lodash/isArray":350,"lodash/isString":363}],465:[function(require,module,exports){ - -/* -Copyright 2016 Resin.io - -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. - */ - -/** - * @module deviceStatus - */ -var RESIN_CREATION_YEAR, find; - -find = require('lodash/find'); - -RESIN_CREATION_YEAR = 2013; - - -/** - * @summary Map of possible device statuses - * @type {Object} - * @public - * @constant - */ - -exports.status = { - IDLE: 'idle', - CONFIGURING: 'configuring', - UPDATING: 'updating', - OFFLINE: 'offline', - POST_PROVISIONING: 'post-provisioning' -}; - - -/** - * @summary Array of device statuses along with their display names - * @type {Object[]} - * @public - * @constant - */ - -exports.statuses = [ - { - key: exports.status.IDLE, - name: 'Idle' - }, { - key: exports.status.CONFIGURING, - name: 'Configuring' - }, { - key: exports.status.UPDATING, - name: 'Updating' - }, { - key: exports.status.OFFLINE, - name: 'Offline' - }, { - key: exports.status.POST_PROVISIONING, - name: 'Post Provisioning' - } -]; - - -/** - * @summary Get status of a device - * @function - * @public - * - * @param {Object} device - device - * @fulfil {Object} - device status - * @returns {Promise} - * - * @example - * resin = require('resin-sdk') - * deviceStatus = require('resin-device-status') - * - * resin.models.device.get('9174944').then (device) -> - * deviceStatus.getStatus(device).then (status) -> - * console.log(status.key) - * console.log(status.name) - */ - -exports.getStatus = function(device) { - var lastSeenDate; - if (device.provisioning_state === 'Post-Provisioning') { - return find(exports.statuses, { - key: exports.status.POST_PROVISIONING - }); - } - lastSeenDate = new Date(device.last_seen_time); - if (!device.is_online && lastSeenDate.getFullYear() < RESIN_CREATION_YEAR) { - return find(exports.statuses, { - key: exports.status.CONFIGURING - }); - } - if (!device.is_online) { - return find(exports.statuses, { - key: exports.status.OFFLINE - }); - } - if ((device.download_progress != null) && device.status === 'Downloading') { - return find(exports.statuses, { - key: exports.status.UPDATING - }); - } - if (device.provisioning_progress != null) { - return find(exports.statuses, { - key: exports.status.CONFIGURING - }); - } - return find(exports.statuses, { - key: exports.status.IDLE - }); -}; - -},{"lodash/find":340}],466:[function(require,module,exports){ -"use strict"; -/* -Copyright 2016 Resin.io - -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. -*/ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -/** - * @module errors - */ -var TypedError = require("typed-error"); -var ResinError = (function (_super) { - tslib_1.__extends(ResinError, _super); - function ResinError() { - return _super !== null && _super.apply(this, arguments) || this; - } - return ResinError; -}(TypedError)); -exports.ResinError = ResinError; -ResinError.prototype.code = 'ResinError'; -ResinError.prototype.exitCode = 1; -/** - * @summary Resin invalid device type - * @class - * @public - * - * @param {String} type - device type - * @return {Error} error instance - * - * @example - * throw new errors.ResinInvalidDeviceType('raspberry-pi') - */ -var ResinInvalidDeviceType = (function (_super) { - tslib_1.__extends(ResinInvalidDeviceType, _super); - function ResinInvalidDeviceType(type) { - var _this = _super.call(this, "Invalid device type: " + type) || this; - _this.type = type; - return _this; - } - return ResinInvalidDeviceType; -}(ResinError)); -exports.ResinInvalidDeviceType = ResinInvalidDeviceType; -ResinInvalidDeviceType.prototype.code = 'ResinInvalidDeviceType'; -/** - * @summary Resin malformed token - * @class - * @public - * - * @param {String} token - token - * @return {Error} error instance - * - * @example - * throw new errors.ResinMalformedToken('1234') - */ -var ResinMalformedToken = (function (_super) { - tslib_1.__extends(ResinMalformedToken, _super); - function ResinMalformedToken(token) { - var _this = _super.call(this, "Malformed token: " + token) || this; - _this.token = token; - return _this; - } - return ResinMalformedToken; -}(ResinError)); -exports.ResinMalformedToken = ResinMalformedToken; -ResinMalformedToken.prototype.code = 'ResinMalformedToken'; -/** - * @summary The device supervisor is locked - * @class - * @public - * - * @param {String} token - token - * @return {Error} error instance - * - * @example - * throw new errors.ResinSupervisorLockedError() - */ -var ResinSupervisorLockedError = (function (_super) { - tslib_1.__extends(ResinSupervisorLockedError, _super); - function ResinSupervisorLockedError(token) { - var _this = _super.call(this, "Supervisor Locked: " + token) || this; - _this.token = token; - return _this; - } - return ResinSupervisorLockedError; -}(ResinError)); -exports.ResinSupervisorLockedError = ResinSupervisorLockedError; -ResinSupervisorLockedError.prototype.code = 'ResinSupervisorLockedError'; -/** - * @summary Resin expired token - * @class - * @public - * - * @param {String} token - token - * @return {Error} error instance - * - * @example - * throw new errors.ResinExpiredToken('1234') - */ -var ResinExpiredToken = (function (_super) { - tslib_1.__extends(ResinExpiredToken, _super); - function ResinExpiredToken(token) { - var _this = _super.call(this, "The token expired: " + token) || this; - _this.token = token; - return _this; - } - return ResinExpiredToken; -}(ResinError)); -exports.ResinExpiredToken = ResinExpiredToken; -ResinExpiredToken.prototype.code = 'ResinExpiredToken'; -/** - * @summary Resin application not found - * @class - * @public - * - * @param {(String|Number)} application - application name or id - * @return {Error} error instance - * - * @example - * throw new errors.ResinApplicationNotFound('MyApp') - */ -var ResinApplicationNotFound = (function (_super) { - tslib_1.__extends(ResinApplicationNotFound, _super); - function ResinApplicationNotFound(application) { - var _this = _super.call(this, "Application not found: " + application) || this; - _this.application = application; - return _this; - } - return ResinApplicationNotFound; -}(ResinError)); -exports.ResinApplicationNotFound = ResinApplicationNotFound; -ResinApplicationNotFound.prototype.code = 'ResinApplicationNotFound'; -/** - * @summary Resin build not found - * @class - * @public - * - * @param {(Number)} build - build id - * @return {Error} error instance - * - * @example - * throw new errors.ResinBuildNotFound(123) - */ -var ResinBuildNotFound = (function (_super) { - tslib_1.__extends(ResinBuildNotFound, _super); - function ResinBuildNotFound(build) { - var _this = _super.call(this, "Build not found: " + build) || this; - _this.build = build; - return _this; - } - return ResinBuildNotFound; -}(ResinError)); -exports.ResinBuildNotFound = ResinBuildNotFound; -ResinBuildNotFound.prototype.code = 'ResinBuildNotFound'; -/** - * @summary Resin device not found - * @class - * @public - * - * @param {(String|Number)} device - device name or id - * @return {Error} error instance - * - * @example - * throw new errors.ResinDeviceNotFound('MyDevice') - */ -var ResinDeviceNotFound = (function (_super) { - tslib_1.__extends(ResinDeviceNotFound, _super); - function ResinDeviceNotFound(device) { - var _this = _super.call(this, "Device not found: " + device) || this; - _this.device = device; - return _this; - } - return ResinDeviceNotFound; -}(ResinError)); -exports.ResinDeviceNotFound = ResinDeviceNotFound; -ResinDeviceNotFound.prototype.code = 'ResinDeviceNotFound'; -/** - * @summary Resin ambiguous device - * @class - * @public - * - * @param {(String|Number)} device - device name or id - * @return {Error} error instance - * - * @example - * throw new errors.ResinAmbiguousDevice('MyDevice') - */ -var ResinAmbiguousDevice = (function (_super) { - tslib_1.__extends(ResinAmbiguousDevice, _super); - function ResinAmbiguousDevice(device) { - var _this = _super.call(this, "Device is ambiguous: " + device) || this; - _this.device = device; - return _this; - } - return ResinAmbiguousDevice; -}(ResinError)); -exports.ResinAmbiguousDevice = ResinAmbiguousDevice; -ResinAmbiguousDevice.prototype.code = 'ResinAmbiguousDevice'; -/** - * @summary Resin ambiguous application - * @class - * @public - * - * @param {(String|Number)} application - application name or id - * @return {Error} error instance + * @param {Object} device - device + * @returns {String} logs channel name * * @example - * throw new errors.ResinAmbiguousApplication('MyApp') + * channel = utils.getChannel('...') */ -var ResinAmbiguousApplication = (function (_super) { - tslib_1.__extends(ResinAmbiguousApplication, _super); - function ResinAmbiguousApplication(application) { - var _this = _super.call(this, "Application is ambiguous: " + application) || this; - _this.application = application; - return _this; - } - return ResinAmbiguousApplication; -}(ResinError)); -exports.ResinAmbiguousApplication = ResinAmbiguousApplication; -ResinAmbiguousApplication.prototype.code = 'ResinAmbiguousApplication'; + +exports.getChannel = function(device, suffix) { + if (suffix == null) { + suffix = 'logs'; + } + return "device-" + (getBaseChannel(device)) + "-" + suffix; +}; + + /** - * @summary Resin key not found - * @class - * @public + * @summary Get logs and clear logs channel names for the given device + * @function + * @protected * - * @param {(String|Number)} key - key name, id or value - * @return {Error} error instance + * @param {Object} device - device + * @returns {Object} { channel, clearChannel } * * @example - * throw new errors.ResinKeyNotFound('MyKey') + * channel = utils.getChannel('...') */ -var ResinKeyNotFound = (function (_super) { - tslib_1.__extends(ResinKeyNotFound, _super); - function ResinKeyNotFound(key) { - return _super.call(this, "Key not found: " + key) || this; - } - return ResinKeyNotFound; -}(ResinError)); -exports.ResinKeyNotFound = ResinKeyNotFound; -ResinKeyNotFound.prototype.code = 'ResinKeyNotFound'; + +exports.getChannels = function(device) { + return { + channel: exports.getChannel(device), + clearChannel: exports.getChannel(device, 'clear-logs') + }; +}; + + /** - * @summary Resin request error - * @class + * @summary Extract messages from PubNub payload + * @function * @public * - * @param {String} body - response body - * @param {Number} statusCode - http status code - * @param {Object} [requestOptions] - options used to make the request - * @return {Error} error instance + * @param {*} message - message + * @returns {Object[]} log messages * * @example - * throw new errors.ResinRequestError('Unauthorized') + * messages = utils.extractMessages('foo bar') */ -var ResinRequestError = (function (_super) { - tslib_1.__extends(ResinRequestError, _super); - function ResinRequestError(body, statusCode, requestOptions) { - var _this = _super.call(this, "Request error: " + body) || this; - _this.body = body; - _this.statusCode = statusCode; - _this.requestOptions = requestOptions; - return _this; - } - return ResinRequestError; -}(ResinError)); -exports.ResinRequestError = ResinRequestError; -ResinRequestError.prototype.code = 'ResinRequestError'; + +exports.extractMessages = function(message) { + if (isString(message)) { + return [ + { + isSystem: /\[system\]/.test(message), + message: message, + timestamp: null + } + ]; + } else if (isArray(message)) { + return message.map(function(arg) { + var m, s, t; + m = arg.m, t = arg.t, s = arg.s; + return { + message: m, + timestamp: t, + isSystem: Boolean(s) + }; + }); + } else { + return [ + assign({ + isSystem: false, + timestamp: null + }, message) + ]; + } +}; + +},{"lodash/assign":334,"lodash/isArray":353,"lodash/isString":366}],468:[function(require,module,exports){ + +/* +Copyright 2016 Resin.io + +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. + */ + /** - * @summary Resin not logged in - * @class + * @module deviceStatus + */ +var RESIN_CREATION_YEAR, find; + +find = require('lodash/find'); + +RESIN_CREATION_YEAR = 2013; + + +/** + * @summary Map of possible device statuses + * @type {Object} * @public - * - * @return {Error} error instance - * - * @example - * throw new errors.ResinNotLoggedIn() + * @constant */ -var ResinNotLoggedIn = (function (_super) { - tslib_1.__extends(ResinNotLoggedIn, _super); - function ResinNotLoggedIn() { - return _super.call(this, 'You have to log in') || this; - } - return ResinNotLoggedIn; -}(ResinError)); -exports.ResinNotLoggedIn = ResinNotLoggedIn; -ResinNotLoggedIn.prototype.code = 'ResinNotLoggedIn'; + +exports.status = { + IDLE: 'idle', + CONFIGURING: 'configuring', + UPDATING: 'updating', + OFFLINE: 'offline', + POST_PROVISIONING: 'post-provisioning' +}; + + /** - * @summary Resin invalid parameter - * @class + * @summary Array of device statuses along with their display names + * @type {Object[]} + * @public + * @constant + */ + +exports.statuses = [ + { + key: exports.status.IDLE, + name: 'Idle' + }, { + key: exports.status.CONFIGURING, + name: 'Configuring' + }, { + key: exports.status.UPDATING, + name: 'Updating' + }, { + key: exports.status.OFFLINE, + name: 'Offline' + }, { + key: exports.status.POST_PROVISIONING, + name: 'Post Provisioning' + } +]; + + +/** + * @summary Get status of a device + * @function * @public * - * @return {Error} error instance + * @param {Object} device - device + * @fulfil {Object} - device status + * @returns {Promise} * * @example - * const checkId = (id) => { - * if (typeof id !== 'number') { - * throw new errors.ResinInvalidParameterError('id', id) - * } - * } + * resin = require('resin-sdk') + * deviceStatus = require('resin-device-status') + * + * resin.models.device.get('9174944').then (device) -> + * deviceStatus.getStatus(device).then (status) -> + * console.log(status.key) + * console.log(status.name) */ -var ResinInvalidParameterError = (function (_super) { - tslib_1.__extends(ResinInvalidParameterError, _super); - function ResinInvalidParameterError(parameterName, suppliedValue) { - var _this = _super.call(this, "Invalid parameter: " + suppliedValue + " is not a valid value for parameter '" + parameterName + "'") || this; - _this.parameterName = parameterName; - _this.suppliedValue = suppliedValue; - return _this; - } - return ResinInvalidParameterError; -}(ResinError)); -exports.ResinInvalidParameterError = ResinInvalidParameterError; -ResinInvalidParameterError.prototype.code = 'ResinInvalidParameterError'; -},{"tslib":493,"typed-error":467}],467:[function(require,module,exports){ -"use strict"; -var tslib_1 = require("tslib"); -var BaseError = (function () { - function BaseError() { - Error.apply(this, arguments); - } - return BaseError; -}()); -BaseError.prototype = Object.create(Error.prototype); -var getStackTrace; -if (Error.captureStackTrace != null) { - var captureStackTrace_1 = Error.captureStackTrace; - getStackTrace = function (e) { - captureStackTrace_1(e, e.constructor); - }; -} -else { - getStackTrace = function (e, err) { - if (!(err instanceof Error)) { - err = new Error(err); - } - if (err.stack != null) { - e.stack = err.stack; - } - }; -} -var TypedError = (function (_super) { - tslib_1.__extends(TypedError, _super); - function TypedError(err) { - if (err === void 0) { err = ''; } - var _this = _super.call(this) || this; - if (err instanceof Error) { - _this.message = err.message; - } - else { - _this.message = err; - } - _this.name = _this.constructor.name; - getStackTrace(_this, err); - return _this; - } - return TypedError; -}(BaseError)); -module.exports = TypedError; +exports.getStatus = function(device) { + var lastSeenDate; + if (device.provisioning_state === 'Post-Provisioning') { + return find(exports.statuses, { + key: exports.status.POST_PROVISIONING + }); + } + lastSeenDate = new Date(device.last_seen_time); + if (!device.is_online && lastSeenDate.getFullYear() < RESIN_CREATION_YEAR) { + return find(exports.statuses, { + key: exports.status.CONFIGURING + }); + } + if (!device.is_online) { + return find(exports.statuses, { + key: exports.status.OFFLINE + }); + } + if ((device.download_progress != null) && device.status === 'Downloading') { + return find(exports.statuses, { + key: exports.status.UPDATING + }); + } + if (device.provisioning_progress != null) { + return find(exports.statuses, { + key: exports.status.CONFIGURING + }); + } + return find(exports.statuses, { + key: exports.status.IDLE + }); +}; -},{"tslib":493}],468:[function(require,module,exports){ +},{"lodash/find":343}],469:[function(require,module,exports){ // Generated by CoffeeScript 1.12.4 /* @@ -65870,7 +66112,7 @@ getPine = function(arg) { module.exports = getPine; -},{"bluebird":34,"lodash/assign":331,"lodash/defaults":337,"lodash/isArray":350,"lodash/isBoolean":353,"lodash/isDate":355,"lodash/isEmpty":356,"lodash/isNumber":360,"lodash/isObject":361,"lodash/isString":363,"pinejs-client/core":423,"resin-errors":469,"url":495}],469:[function(require,module,exports){ +},{"bluebird":37,"lodash/assign":334,"lodash/defaults":340,"lodash/isArray":353,"lodash/isBoolean":356,"lodash/isDate":358,"lodash/isEmpty":359,"lodash/isNumber":363,"lodash/isObject":364,"lodash/isString":366,"pinejs-client/core":426,"resin-errors":470,"url":495}],470:[function(require,module,exports){ // Generated by CoffeeScript 1.8.0 /* @@ -66219,7 +66461,7 @@ exports.ResinNotLoggedIn = ResinNotLoggedIn = (function(_super) { })(TypedError); -},{"typed-error":494}],470:[function(require,module,exports){ +},{"typed-error":494}],471:[function(require,module,exports){ // Generated by CoffeeScript 1.12.2 /* @@ -66339,7 +66581,7 @@ module.exports = getResinRegisterDevice = function(arg) { }; }; -},{"bluebird":34,"randomstring":446}],471:[function(require,module,exports){ +},{"bluebird":37,"randomstring":449}],472:[function(require,module,exports){ // Generated by CoffeeScript 1.12.6 /* @@ -66462,7 +66704,7 @@ exports.estimate = function(requestAsync) { }; }; -},{"./utils":473,"lodash/noop":373,"progress-stream":undefined,"stream":489,"zlib":undefined}],472:[function(require,module,exports){ +},{"./utils":474,"lodash/noop":376,"progress-stream":undefined,"stream":490,"zlib":undefined}],473:[function(require,module,exports){ // Generated by CoffeeScript 1.12.6 /* @@ -66780,7 +67022,7 @@ module.exports = getRequest = function(arg) { * (or resolve to) a new response, or throw/reject. */ -},{"./progress":471,"./utils":473,"bluebird":34,"lodash/assign":331,"lodash/defaults":337,"lodash/isEmpty":356,"lodash/noop":373,"resin-errors":474,"rindle":undefined,"url":495}],473:[function(require,module,exports){ +},{"./progress":472,"./utils":474,"bluebird":37,"lodash/assign":334,"lodash/defaults":340,"lodash/isEmpty":359,"lodash/noop":376,"resin-errors":475,"rindle":undefined,"url":495}],474:[function(require,module,exports){ // Generated by CoffeeScript 1.12.6 /* @@ -67155,7 +67397,7 @@ exports.onlyIf = function(cond) { }; }; -},{"bluebird":34,"fetch-ponyfill":151,"lodash/assign":331,"lodash/includes":348,"lodash/parseInt":376,"qs":438,"resin-errors":474,"url":495}],474:[function(require,module,exports){ +},{"bluebird":37,"fetch-ponyfill":154,"lodash/assign":334,"lodash/includes":351,"lodash/parseInt":379,"qs":441,"resin-errors":475,"url":495}],475:[function(require,module,exports){ // Generated by CoffeeScript 1.8.0 /* @@ -67535,7 +67777,7 @@ exports.ResinInvalidParameterError = ResinInvalidParameterError = (function(_sup })(TypedError); -},{"typed-error":494}],475:[function(require,module,exports){ +},{"typed-error":494}],476:[function(require,module,exports){ // Generated by CoffeeScript 1.11.1 /* @@ -67636,7 +67878,7 @@ if (typeof window !== "undefined" && window !== null) { }; } -},{"node-localstorage":undefined}],476:[function(require,module,exports){ +},{"node-localstorage":undefined}],477:[function(require,module,exports){ // Generated by CoffeeScript 1.11.1 /* @@ -67789,7 +68031,7 @@ getStorage = function(arg) { module.exports = getStorage; -},{"./local-storage":475,"bluebird":34,"lodash/isString":363}],477:[function(require,module,exports){ +},{"./local-storage":476,"bluebird":37,"lodash/isString":366}],478:[function(require,module,exports){ // Generated by CoffeeScript 1.12.5 /* @@ -68097,9 +68339,9 @@ module.exports = getToken = function(arg) { return exports; }; -},{"bluebird":34,"jwt-decode":166,"resin-errors":478,"resin-settings-storage":476,"url":495}],478:[function(require,module,exports){ -arguments[4][469][0].apply(exports,arguments) -},{"dup":469,"typed-error":494}],479:[function(require,module,exports){ +},{"bluebird":37,"jwt-decode":169,"resin-errors":479,"resin-settings-storage":477,"url":495}],479:[function(require,module,exports){ +arguments[4][470][0].apply(exports,arguments) +},{"dup":470,"typed-error":494}],480:[function(require,module,exports){ (function (Buffer){ /* CryptoJS v3.1.2 @@ -68313,7 +68555,7 @@ function ripemd160 (message) { module.exports = ripemd160 }).call(this,require("buffer").Buffer) -},{"buffer":64}],480:[function(require,module,exports){ +},{"buffer":67}],481:[function(require,module,exports){ (function (process){ exports = module.exports = SemVer; @@ -69520,7 +69762,7 @@ function prerelease(version, loose) { } }).call(this,require('_process')) -},{"_process":425}],481:[function(require,module,exports){ +},{"_process":428}],482:[function(require,module,exports){ (function (Buffer){ // prototype class for hash functions function Hash (blockSize, finalSize) { @@ -69593,7 +69835,7 @@ Hash.prototype._update = function () { module.exports = Hash }).call(this,require("buffer").Buffer) -},{"buffer":64}],482:[function(require,module,exports){ +},{"buffer":67}],483:[function(require,module,exports){ var exports = module.exports = function SHA (algorithm) { algorithm = algorithm.toLowerCase() @@ -69610,7 +69852,7 @@ exports.sha256 = require('./sha256') exports.sha384 = require('./sha384') exports.sha512 = require('./sha512') -},{"./sha":483,"./sha1":484,"./sha224":485,"./sha256":486,"./sha384":487,"./sha512":488}],483:[function(require,module,exports){ +},{"./sha":484,"./sha1":485,"./sha224":486,"./sha256":487,"./sha384":488,"./sha512":489}],484:[function(require,module,exports){ (function (Buffer){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined @@ -69707,7 +69949,7 @@ Sha.prototype._hash = function () { module.exports = Sha }).call(this,require("buffer").Buffer) -},{"./hash":481,"buffer":64,"inherits":161}],484:[function(require,module,exports){ +},{"./hash":482,"buffer":67,"inherits":164}],485:[function(require,module,exports){ (function (Buffer){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined @@ -69809,7 +70051,7 @@ Sha1.prototype._hash = function () { module.exports = Sha1 }).call(this,require("buffer").Buffer) -},{"./hash":481,"buffer":64,"inherits":161}],485:[function(require,module,exports){ +},{"./hash":482,"buffer":67,"inherits":164}],486:[function(require,module,exports){ (function (Buffer){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined @@ -69865,7 +70107,7 @@ Sha224.prototype._hash = function () { module.exports = Sha224 }).call(this,require("buffer").Buffer) -},{"./hash":481,"./sha256":486,"buffer":64,"inherits":161}],486:[function(require,module,exports){ +},{"./hash":482,"./sha256":487,"buffer":67,"inherits":164}],487:[function(require,module,exports){ (function (Buffer){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined @@ -70003,7 +70245,7 @@ Sha256.prototype._hash = function () { module.exports = Sha256 }).call(this,require("buffer").Buffer) -},{"./hash":481,"buffer":64,"inherits":161}],487:[function(require,module,exports){ +},{"./hash":482,"buffer":67,"inherits":164}],488:[function(require,module,exports){ (function (Buffer){ var inherits = require('inherits') var SHA512 = require('./sha512') @@ -70063,7 +70305,7 @@ Sha384.prototype._hash = function () { module.exports = Sha384 }).call(this,require("buffer").Buffer) -},{"./hash":481,"./sha512":488,"buffer":64,"inherits":161}],488:[function(require,module,exports){ +},{"./hash":482,"./sha512":489,"buffer":67,"inherits":164}],489:[function(require,module,exports){ (function (Buffer){ var inherits = require('inherits') var Hash = require('./hash') @@ -70326,7 +70568,7 @@ Sha512.prototype._hash = function () { module.exports = Sha512 }).call(this,require("buffer").Buffer) -},{"./hash":481,"buffer":64,"inherits":161}],489:[function(require,module,exports){ +},{"./hash":482,"buffer":67,"inherits":164}],490:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -70455,7 +70697,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":149,"inherits":161,"readable-stream/duplex.js":450,"readable-stream/passthrough.js":458,"readable-stream/readable.js":459,"readable-stream/transform.js":460,"readable-stream/writable.js":461}],490:[function(require,module,exports){ +},{"events":152,"inherits":164,"readable-stream/duplex.js":453,"readable-stream/passthrough.js":461,"readable-stream/readable.js":462,"readable-stream/transform.js":463,"readable-stream/writable.js":464}],491:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -70678,12 +70920,12 @@ function base64DetectIncompleteChar(buffer) { this.charLength = this.charReceived ? 3 : 0; } -},{"buffer":64}],491:[function(require,module,exports){ +},{"buffer":67}],492:[function(require,module,exports){ 'use strict'; module.exports = 2147483647; -},{}],492:[function(require,module,exports){ +},{}],493:[function(require,module,exports){ 'use strict'; var toPosInt = require('es5-ext/number/to-pos-integer') @@ -70695,220 +70937,7 @@ module.exports = function (value) { return value; }; -},{"./max-timeout":491,"es5-ext/number/to-pos-integer":117}],493:[function(require,module,exports){ -(function (global){ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if (typeof module === "object" && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __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; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - 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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, 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 }; - } - }; - - __exportStar = function (m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - }; - - __values = function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - }; - - __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; - }; - - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; }; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator]; - return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); -}); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],494:[function(require,module,exports){ +},{"./max-timeout":492,"es5-ext/number/to-pos-integer":120}],494:[function(require,module,exports){ // Generated by CoffeeScript 1.7.1 (function() { var __hasProp = {}.hasOwnProperty, @@ -71688,7 +71717,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":496,"punycode":436,"querystring":444}],496:[function(require,module,exports){ +},{"./util":496,"punycode":439,"querystring":447}],496:[function(require,module,exports){ 'use strict'; module.exports = { @@ -71917,5 +71946,5 @@ exports.createContext = Script.createContext = function (context) { return copy; }; -},{"indexof":160}]},{},[13])(13) +},{"indexof":163}]},{},[16])(16) }); \ No newline at end of file diff --git a/build/resin-browser.min.js b/build/resin-browser.min.js index c08df7751..7e6caf503 100644 --- a/build/resin-browser.min.js +++ b/build/resin-browser.min.js @@ -1,25 +1,25 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.resinSdk=e()}}(function(){var define,module,exports;return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[a]={exports:{}};t[a][0].call(f.exports,function(e){var r=t[a][1][e];return i(r?r:e)},f,f.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a1)throw new a.ResinAmbiguousApplication(e)}).get(0)}).tap(S).asCallback(r)},w.getAppWithOwner=function(e,t,r,n){return null==r&&(r={}),n=u(arguments),e=e.toLowerCase(),t=t.toLowerCase(),k.get({resource:"application",options:p({filter:{$eq:[{$tolower:{$:"app_name"}},e]},expand:{user:{$filter:{$eq:[{$tolower:{$:"username"}},t]},$select:"id"}}},r)}).tap(function(r){if(h(r))throw new a.ResinApplicationNotFound(t+"/"+e);if(_(r)>1)throw new a.ResinAmbiguousApplication(t+"/"+e)}).get(0).tap(S).asCallback(n)},w.has=function(e,t){return w.get(e,{select:[]}).return(!0).catch(a.ResinApplicationNotFound,function(){return!1}).asCallback(t)},w.hasAny=function(e){return w.getAll({select:[]}).then(function(e){return!h(e)}).asCallback(e)},w.getById=function(e,t){return k.get({resource:"application",id:e}).tap(function(t){if(null==t)throw new a.ResinApplicationNotFound(e);return S(t)}).asCallback(t)},w.create=function(e,t,r,n){var s,c;return n=u(arguments),c=r?w.get(r,{select:["id"]}):i.resolve(),s=g().getDeviceSlug(t).tap(function(e){if(null==e)throw new a.ResinInvalidDeviceType(t)}),i.all([s,c]).then(function(t){var r,n,i;return r=t[0],i=t[1],n=i?{application:i.id}:{},k.post({resource:"application",body:o({app_name:e,device_type:r},n)})}).asCallback(n)},w.remove=function(e,t){return x(e).then(function(e){return k.delete({resource:"application",id:e})}).catch(v,m(e)).asCallback(t)},w.restart=function(e,t){return x(e).then(function(e){return E.send({method:"POST",url:"/application/"+e+"/restart",baseUrl:f})}).return(void 0).catch(v,m(e)).asCallback(t)},w.generateApiKey=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,E.send({method:"POST",url:"/application/"+t+"/generate-api-key",baseUrl:f})}).get("body").asCallback(t)},w.purge=function(e,t){return E.send({method:"POST",url:"/supervisor/v1/purge",baseUrl:f,body:{appId:e,data:{appId:""+e}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(t)},w.shutdown=function(e,t,r){return null==t&&(t={}),E.send({method:"POST",url:"/supervisor/v1/shutdown",baseUrl:f,body:{appId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(r)},w.reboot=function(e,t,r){return null==t&&(t={}),E.send({method:"POST",url:"/supervisor/v1/reboot",baseUrl:f,body:{appId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(r)},w.getApiKey=w.generateApiKey,w.enableDeviceUrls=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,k.patch({resource:"device",body:{is_web_accessible:!0},options:{filter:{application:t}}})}).asCallback(t)},w.disableDeviceUrls=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,k.patch({resource:"device",body:{is_web_accessible:!1},options:{filter:{application:t}}})}).asCallback(t)},w.grantSupportAccess=function(e,t,r){if(null==t||t<=Date.now())throw new a.ResinInvalidParameterError("expiryTimestamp",t);return x(e).then(function(e){return k.patch({resource:"application",id:e,body:{support_expiry_date:t}})}).catch(v,m(e)).asCallback(r)},w.revokeSupportAccess=function(e,t){return x(e).then(function(e){return k.patch({resource:"application",id:e,body:{support_expiry_date:null}})}).catch(v,m(e)).asCallback(t)},w},t.exports=f},{"../util":18,"../util/device-os-version":15,"./device":8,bluebird:34,"lodash/assign":331,"lodash/filter":339,"lodash/forEach":343,"lodash/isArray":350,"lodash/isEmpty":356,"lodash/once":375,"lodash/size":380,"resin-errors":466}],5:[function(e,t,r){var n;n=function(e,t){var n,i,o;return o=e.request,n=t.apiUrl,i=t.isBrowser,r.getAccount=function(e){return o.send({method:"GET",url:"/user/billing/account",baseUrl:n}).get("body").asCallback(e)},r.getPlan=function(e){return o.send({method:"GET",url:"/user/billing/plan",baseUrl:n}).get("body").asCallback(e)},r.getBillingInfo=function(e){return o.send({method:"GET",url:"/user/billing/info",baseUrl:n}).get("body").asCallback(e)},r.updateBillingInfo=function(e,t){return o.send({method:"POST",url:"/user/billing/info",baseUrl:n,body:e}).get("body").asCallback(t)},r.getInvoices=function(e){return o.send({method:"GET",url:"/user/billing/invoices",baseUrl:n}).get("body").asCallback(e)},r.downloadInvoice=function(e,t){var r;return r="/user/billing/invoices/"+e+"/download",i?o.send({method:"GET",url:r,baseUrl:n,responseFormat:"blob"}).get("body").asCallback(t):o.stream({method:"GET",url:r,baseUrl:n}).asCallback(t)},r},t.exports=n},{}],6:[function(e,t,r){var n,i,o,a,s,u;s=e("lodash/once"),n=e("resin-errors"),u=e("../util"),i=u.findCallback,a=u.mergePineOptions,o=function(t,r){var o,u,c;return c=t.pine,o=s(function(){return e("./application")(t,r)}),u={},u.get=function(e,t,r){return null==t&&(t={}),r=i(arguments),c.get({resource:"build",id:e,options:a({},t)}).tap(function(t){if(null==t)throw new n.ResinBuildNotFound(e)}).asCallback(r)},u.getAllByApplication=function(e,t,r){return null==t&&(t={}),r=i(arguments),o().get(e,{select:"id"}).then(function(e){var r;return r=e.id,c.get({resource:"build",options:a({filter:{application:r},select:["id","created_at","commit_hash","push_timestamp","start_timestamp","end_timestamp","update_timestamp","project_type","source","status","message"],expand:{user:{$select:["id","username"]}},orderby:"created_at desc"},t)})}).asCallback(r)},u},t.exports=o},{"../util":18,"./application":4,"lodash/once":375,"resin-errors":466}],7:[function(e,t,r){var n,i,o,a;o=e("lodash/once"),a=e("lodash/union"),i=e("lodash/map"),n=function(t,r){var n,s,u,c;return c=t.request,n=r.apiUrl,s=o(function(){return e("./device")(t,r)}),u={},u.getAll=function(e){return c.send({method:"GET",url:"/config",baseUrl:n,refreshToken:!1}).get("body").then(function(e){return e.deviceTypes=i(e.deviceTypes,function(e){return"PREVIEW"===e.state&&(e.state="ALPHA",e.name=e.name.replace("(PREVIEW)","(ALPHA)")),"EXPERIMENTAL"===e.state&&(e.state="BETA",e.name=e.name.replace("(EXPERIMENTAL)","(BETA)")),e}),e}).asCallback(e)},u.getPubNubKeys=function(e){return u.getAll().get("pubnub").tap(function(e){if(null==e)throw new Error("No pubnub keys")}).asCallback(e)},u.getMixpanelToken=function(e){return u.getAll().get("mixpanelToken").tap(function(e){if(null==e)throw new Error("No mixpanel token")}).asCallback(e)},u.getDeviceTypes=function(e){return u.getAll().get("deviceTypes").tap(function(e){if(null==e)throw new Error("No device types")}).asCallback(e)},u.getDeviceOptions=function(e,t){return s().getManifestBySlug(e).then(function(e){return null==e.initialization&&(e.initialization={}),a(e.options,e.initialization.options)}).asCallback(t)},u},t.exports=n},{"./device":8,"lodash/map":369,"lodash/once":375,"lodash/union":389}],8:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m,w,x,S,k,E,j,A;j=e("url"),a=e("bluebird"),d=e("lodash/isEmpty"),p=e("lodash/isFinite"),m=e("lodash/once"),A=e("lodash/without"),c=e("lodash/find"),S=e("lodash/some"),h=e("lodash/includes"),v=e("lodash/map"),x=e("semver"),u=e("resin-errors"),s=e("resin-device-status"),w=e("../util"),w.onlyIf,b=w.isId,f=w.findCallback,y=w.mergePineOptions,_=w.notFoundResponse,E=w.treatAsMissingDevice,i=w.LOCKED_STATUS_CODE,k=w.timeSince,g=e("../util/device-os-version").normalizeDeviceOsVersion,o="1.8.0-alpha.0",n=5e4,l=function(t,r){var l,w,M,C,O,T,R,I,P,D,B,N,L;return B=t.pine,L=t.request,w=r.apiUrl,T=r.dashboardUrl,N=e("resin-register-device")({request:L}),O=m(function(){return e("./config")(t,r)}),M=m(function(){return e("./application")(t,r)}),C=e("../auth")(t,r),I={},null==T&&(T=w.replace(/api/,"dashboard")),D=function(e){return a.try(function(){return b(e)?e:I.get(e,{select:"id"}).get("id")})},I.ensureSupervisorCompatibility=R=a.method(function(e,t){if(x.lt(e,t))throw new Error("Incompatible supervisor version: "+e+" - must be >= "+t)}),I.getDashboardUrl=P=function(e){var t,r,n,i;for(null==e&&(e={}),i=["appId","deviceId"],t=0,n=i.length;t1)throw new u.ResinAmbiguousDevice(e)}).get(0)}).then(l).asCallback(r)},I.getByName=function(e,t,r){return null==t&&(t={}),r=f(arguments),I.getAll(y({filter:{name:e}},t)).tap(function(t){if(d(t))throw new u.ResinDeviceNotFound(e)}).asCallback(r)},I.getName=function(e,t){return I.get(e,{select:"name"}).get("name").asCallback(t)},I.getApplicationName=function(e,t){return I.get(e,{select:"application_name"}).get("application_name").asCallback(t)},I.getApplicationInfo=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t,baseUrl:w,body:{deviceId:e.id,appId:t,method:"GET"}})}).get("body").asCallback(t)})},I.has=function(e,t){return I.get(e,{select:[]}).return(!0).catch(u.ResinDeviceNotFound,function(){return!1}).asCallback(t)},I.isOnline=function(e,t){return I.get(e,{select:"is_online"}).get("is_online").asCallback(t)},I.getLocalIPAddresses=function(e,t){return I.get(e,{select:["is_online","ip_address","vpn_address"]}).then(function(t){var r,n,i,o;if(i=t.is_online,r=t.ip_address,o=t.vpn_address,!i)throw new Error("The device is offline: "+e);return n=r.split(" "),A(n,o)}).asCallback(t)},I.remove=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.delete({resource:"device",options:{filter:{uuid:t}}})}).asCallback(t)},I.identify=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/blink",baseUrl:w,body:{uuid:e.uuid}})}).return(void 0).asCallback(t)},I.rename=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{name:t},options:{filter:{uuid:r}}})}).asCallback(r)},I.note=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{note:t},options:{filter:{uuid:r}}})}).asCallback(r)},I.setCustomLocation=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{custom_latitude:String(t.latitude),custom_longitude:String(t.longitude)},options:{filter:{uuid:r}}})}).asCallback(r)},I.unsetCustomLocation=function(e,t){return I.setCustomLocation(e,{latitude:"",longitude:""},t)},I.move=function(e,t,r){return a.props({device:I.get(e,{select:["uuid","device_type"]}),application:M().get(t,{select:["id","device_type"]})}).then(function(e){var r,n;if(r=e.application,n=e.device,n.device_type!==r.device_type)throw new Error("Incompatible application: "+t);return B.patch({resource:"device",body:{application:r.id},options:{filter:{uuid:n.uuid}}})}).asCallback(r)},I.startApplication=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t+"/start",baseUrl:w,body:{deviceId:e.id,appId:t},timeout:n})})}).get("body").get("containerId").asCallback(t)},I.stopApplication=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t+"/stop",baseUrl:w,body:{deviceId:e.id,appId:t},timeout:n})})}).get("body").get("containerId").asCallback(t)},I.restartApplication=function(e,t){return D(e).then(function(e){return L.send({method:"POST",url:"/device/"+e+"/restart",baseUrl:w,timeout:n})}).get("body").catch(_,E(e)).asCallback(t)},I.reboot=function(e,t,r){return null==t&&(t={}),r=f(arguments),D(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/reboot",baseUrl:w,body:{deviceId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).get("body").catch(_,E(e)).asCallback(r)},I.shutdown=function(e,t,r){return null==t&&(t={}),r=f(arguments),I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/shutdown",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).asCallback(r)},I.purge=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/purge",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{appId:e.application[0].id}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).asCallback(t)},I.update=function(e,t,r){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/update",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{force:Boolean(t.force)}}})}).asCallback(r)},I.getDisplayName=function(e,t){return I.getManifestBySlug(e).get("name").catch(function(e){if(!(e instanceof u.ResinInvalidDeviceType))throw e}).asCallback(t)},I.getDeviceSlug=function(e,t){return I.getManifestBySlug(e).get("slug").catch(function(e){if(!(e instanceof u.ResinInvalidDeviceType))throw e}).asCallback(t)},I.getSupportedDeviceTypes=function(e){return O().getDeviceTypes().then(function(e){return v(e,"name")}).asCallback(e)},I.getManifestBySlug=function(e,t){return O().getDeviceTypes().then(function(t){return c(t,function(t){return S([t.name===e,t.slug===e,h(t.aliases,e)])})}).then(function(t){if(null==t)throw new u.ResinInvalidDeviceType(e);return t}).asCallback(t)},I.getManifestByApplication=function(e,t){return M().get(e,{select:"device_type"}).get("device_type").then(I.getManifestBySlug).asCallback(t)},I.generateUniqueKey=N.generateUniqueKey,I.register=function(e,t,r){return a.props({userId:C.getUserId(),apiKey:M().getApiKey(e),application:M().get(e,{select:["id","device_type"]})}).then(function(e){var r,n,i;return i=e.userId,r=e.apiKey,n=e.application,N.register({userId:i,applicationId:n.id,uuid:t,deviceType:n.device_type,provisioningApiKey:r,apiEndpoint:w})}).asCallback(r)},I.generateDeviceKey=function(e,t){return D(e).then(function(e){return L.send({method:"POST",url:"/api-key/device/"+e+"/device-key",baseUrl:w})}).get("body").catch({code:"ResinRequestError",statusCode:500,body:"No device found to associate with the api key"},E(e)).asCallback(t)},I.hasDeviceUrl=function(e,t){return I.get(e,{select:"is_web_accessible"}).get("is_web_accessible").asCallback(t)},I.getDeviceUrl=function(e,t){return I.hasDeviceUrl(e).then(function(t){if(!t)throw new Error("Device is not web accessible: "+e);return O().getAll().get("deviceUrlsBase").then(function(t){return I.get(e,{select:"uuid"}).get("uuid").then(function(e){return"https://"+e+"."+t})})}).asCallback(t)},I.enableDeviceUrl=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.patch({resource:"device",body:{is_web_accessible:!0},options:{filter:{uuid:t}}})}).asCallback(t)},I.disableDeviceUrl=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.patch({resource:"device",body:{is_web_accessible:!1},options:{filter:{uuid:t}}})}).asCallback(t)},I.enableTcpPing=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/tcp-ping",baseUrl:w,data:{deviceId:e.id,appId:e.application[0].id}})}).get("body").asCallback(t)},I.disableTcpPing=function(e,t){return I.get(e).then(function(e){return L.send({method:"DELETE",url:"/supervisor/v1/tcp-ping",baseUrl:w,data:{deviceId:e.id,appId:e.application[0].id}})}).get("body").asCallback(t)},I.ping=function(e,t){return I.get(e).then(function(e){return L.send({method:"GET",url:"/supervisor/ping",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id}})}).asCallback(t)},I.getStatus=function(e,t){return a.try(function(){return s.getStatus(e).key}).asCallback(t)},I.grantSupportAccess=function(e,t,r){if(null==t||t<=Date.now())throw new u.ResinInvalidParameterError("expiryTimestamp",t);return I.get(e,{select:"id"}).then(function(e){var r;return r=e.id,B.patch({resource:"device",id:r,body:{support_expiry_date:t}})}).asCallback(r)},I.revokeSupportAccess=function(e,t){return I.get(e,{select:"id"}).then(function(e){var t;return t=e.id,B.patch({resource:"device",id:t,body:{support_expiry_date:null}})}).asCallback(t)},I.lastOnline=function(e){var t;return t=e.last_connectivity_event,t?e.is_online?"Currently online (for "+k(t,!1)+")":k(t):"Connecting..."},I},t.exports=l},{"../auth":2,"../util":18,"../util/device-os-version":15,"./application":4,"./config":7,bluebird:34,"lodash/find":340,"lodash/includes":348,"lodash/isEmpty":356,"lodash/isFinite":357,"lodash/map":369,"lodash/once":375,"lodash/some":381,"lodash/without":391,"resin-device-status":465,"resin-errors":466,"resin-register-device":470,semver:480,url:495}],9:[function(e,t,r){var n,i,o,a;n=e("bluebird"),i=e("resin-errors"),a=e("lodash/once"),o=function(t,r){var o,s,u,c,f,l;return l=t.pine,s=a(function(){return e("./device")(t,r)}),o=a(function(){return e("./application")(t,r)}),u={},f=function(e){return null!=/^[a-zA-Z_]+[a-zA-Z0-9_]*$/.exec(e)},u.getAllByApplication=function(e,t){return o().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"environment_variable",options:{filter:{application:t},orderby:"name asc"}})}).asCallback(t)},u.create=function(e,t,r,a){return n.try(function(){if(!f(t))throw new i.ResinInvalidParameterError("envVarName",t);return o().get(e,{select:"id"}).then(function(e){var n;return n=e.id,l.post({resource:"environment_variable",body:{name:t,value:String(r),application:n}})})}).asCallback(a)},u.update=function(e,t,r){return l.patch({resource:"environment_variable",id:e,body:{value:t}}).asCallback(r)},u.remove=function(e,t){return l.delete({resource:"environment_variable",id:e}).asCallback(t)},u.isSystemVariable=function(e){return/^RESIN_|^RESIN$|^USER$/.test(e.name)},c=function(e){return null!=e.env_var_name&&(e.name=e.env_var_name,delete e.env_var_name),e},u.device={},u.device.getAll=function(e,t){return s().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"device_environment_variable",options:{filter:{device:t},expand:"device",orderby:"env_var_name asc"}})}).map(c).asCallback(t)},u.device.getAllByApplication=function(e,t){return o().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"device_environment_variable",options:{filter:{device:{$any:{$alias:"d",$expr:{d:{application:t}}}}},expand:"device",orderby:"env_var_name asc"}})}).map(c).asCallback(t)},u.device.create=function(e,t,r,o){return n.try(function(){if(!f(t))throw new i.ResinInvalidParameterError("envVarName",t);return s().get(e,{select:"id"}).then(function(e){var n;return n=e.id,l.post({resource:"device_environment_variable",body:{device:n,env_var_name:t,value:String(r)}})}).then(c)}).asCallback(o)},u.device.update=function(e,t,r){return l.patch({resource:"device_environment_variable",id:e,body:{value:t}}).then(c).asCallback(r)},u.device.remove=function(e,t){return l.delete({resource:"device_environment_variable",id:e}).asCallback(t)},u},t.exports=o},{"./application":4,"./device":8,bluebird:34,"lodash/once":375,"resin-errors":466}],10:[function(e,t,r){var n,i;n=e("lodash/mapValues"),i={application:e("./application"),device:e("./device"),key:e("./key"),environmentVariables:e("./environment-variables"),os:e("./os"),config:e("./config"),build:e("./build"),billing:e("./billing")},t.exports=function(e,t){return n(i,function(r){return r(e,t)})}},{"./application":4,"./billing":5,"./build":6,"./config":7,"./device":8,"./environment-variables":9,"./key":11,"./os":12,"lodash/mapValues":370}],11:[function(e,t,r){var n,i,o,a,s,u,c;n=e("bluebird"),s=e("lodash/isEmpty"),i=e("resin-errors"),c=e("../util"),o=c.findCallback,u=c.mergePineOptions,a=function(t,r){var a,c,f;return f=t.pine,a=e("../auth")(t,r),c={},c.getAll=function(e,t){return null==e&&(e={}),t=o(arguments),f.get({resource:"user__has__public_key",options:u({},e)}).asCallback(t)},c.get=function(e,t){return f.get({resource:"user__has__public_key",id:e}).tap(function(t){if(s(t))throw new i.ResinKeyNotFound(e)}).asCallback(t)},c.remove=function(e,t){return f.delete({resource:"user__has__public_key",id:e}).asCallback(t)},c.create=function(e,t,r){return n.try(function(){return t=t.trim(),a.getUserId().then(function(r){return f.post({resource:"user__has__public_key",body:{title:e,public_key:t,user:r}})})}).asCallback(r)},c},t.exports=a},{"../auth":2,"../util":18,bluebird:34,"lodash/isEmpty":356,"resin-errors":466}],12:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g;e("bluebird"),v=e("lodash/reject"),h=e("lodash/once"),e("lodash/partition"),y=e("semver"),i=e("lodash"),a=e("resin-errors"),b=e("../util"),d=b.onlyIf,u=b.getImgMakerHelper,s=b.findCallback,l=b.notFoundResponse,g=b.treatAsMissingApplication,o=b.deviceTypes,p=b.osVersionRCompare,f=b.isDevelopmentVersion,n=/v?\d+\.\d+\.\d+(\.rev\d+)?((\-|\+).+)?/,c=function(t,r){var c,b,_,m,w,x,S,k,E,j,A,M,C,O,T,R;return T=t.request,c=r.apiUrl,M=r.isBrowser,j=r.imageMakerUrl,A=u(j,T),_=h(function(){return e("./config")(t,r)}),b=h(function(){return e("./application")(t,r)}),S=h(function(){return _().getDeviceTypes()}),C=function(e){return S().then(function(t){return!!o.findBySlug(t,e)})},k=A.buildApiRequester({buildUrl:function(e){var t,r;return t=e.deviceType,r=e.version,"/size_estimate?deviceType="+t+"&version="+r},postProcess:function(e){var t;return t=e.body,t.size}}),E=A.buildApiRequester({buildUrl:function(e){return"/image/"+e.deviceType+"/versions"},postProcess:function(e){var t,r,n,i,o;return i=e.body,o=i.versions,t=i.latest,o.sort(p),r=v(o,function(e){return y.prerelease(e)||f(e)}),n=(null!=r?r[0]:void 0)||null,{versions:o,recommended:n,latest:t,default:n||t}}}),O=function(e){var t;if(!e)throw new Error("Invalid version: "+e);if("latest"===e)return e;if(t="v"===e[0]?e.substring(1):e,!n.test(t))throw new Error("Invalid semver version: "+e);return t},m=function(e,t){return"/image/"+e+"/?version="+encodeURIComponent(t)},w={},x=function(e){return null!=e?null!=e?e.replace(/\.rev(\d+)/,"+FIXED-rev$1"):void 0:e},R=function(e){return null!=e?e.replace(/\+FIXED-rev(\d+)/,".rev$1"):e},w._getMaxSatisfyingVersion=function(e,t){var r,n;return"default"===e||"latest"===e||"recommended"===e?t[e]:(n=t.versions.map(x),r=y.maxSatisfying(n,x(e)),R(r))},w.getDownloadSize=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(r){if(!r)throw new a.ResinInvalidDeviceType("No such device type");return k(e,t)}).asCallback(r)},w.getSupportedVersions=function(e,t){return t=s(arguments),C(e).then(function(t){if(!t)throw new a.ResinInvalidDeviceType("No such device type");return E(e)}).asCallback(t)},w.getMaxSatisfyingVersion=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(t){if(!t)throw new a.ResinInvalidDeviceType("No such device type");return w.getSupportedVersions(e)}).then(function(e){return w._getMaxSatisfyingVersion(t,e)}).asCallback(r)},w.getLastModified=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(e){if(!e)throw new a.ResinInvalidDeviceType("No such device type");return O(t)}).then(function(t){return A.request({method:"HEAD",url:m(e,t)})}).catch(l,function(){throw new Error("No such version for the device type")}).then(function(e){return new Date(e.headers.get("last-modified"))}).asCallback(r)},w.download=d(!M)(function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(e){if(!e)throw new a.ResinInvalidDeviceType("No such device type");return O(t)}).then(function(t){return A.stream({url:m(e,t)})}).catch(l,function(){throw new Error("No such version for the device type")}).asCallback(r)}),w.getConfig=function(e,t,r){var n;return null==t&&(t={}),r=s(arguments),n={network:"ethernet"},i.defaults(t,n),b()._getId(e).then(function(e){return T.send({method:"POST",url:"/download-config",baseUrl:c,body:i.assign(t,{appId:e})})}).get("body").catch(l,g(e)).asCallback(r)},w},t.exports=c},{"../util":18,"./application":4,"./config":7,bluebird:34,lodash:368,"lodash/once":375,"lodash/partition":377,"lodash/reject":379,"resin-errors":466,semver:480}],13:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b;a=e("lodash/assign"),d=e("lodash/mapValues"),s=e("lodash/defaults"),f=e("resin-request"),h=e("resin-token"),c=e("resin-pine"),u=e("resin-errors"),p=e("./util").notImplemented,o="RESIN_SDK_SHARED_OPTIONS",i="RESIN_SDK_HAS_USED_SHARED_OPTIONS",n="RESIN_SDK_HAS_SET_SHARED_OPTIONS",b={models:e("./models"),auth:e("./auth"),logs:e("./logs"),settings:e("./settings")},l=function(t){var r,n,i,o,l,v;return null==t&&(t={}),s(t,{apiUrl:"https://api.resin.io/",imageMakerUrl:"https://img.resin.io/",apiVersion:"v2",isBrowser:"undefined"!=typeof window&&null!==window}),t.isBrowser?l={get:p,getAll:p}:(l=e("resin-settings-client"),s(t,{dataDirectory:l.get("dataDirectory")})),v=h(t),i=f(a({},t,{token:v})),n=c(a({},t,{token:v,request:i})),r={settings:l,request:i,token:v,pine:n},o=d(b,function(e){return e(r,t)}),Object.defineProperty(o,"interceptors",{get:function(){return i.interceptors},set:function(e){return i.interceptors=e}}),o.request=i,o.token=v,o.pine=n,o.errors=u,o},l.setSharedOptions=function(e){var t;return t="undefined"!=typeof window&&null!==window?window:GLOBAL,t[i]&&console.error("Shared SDK options have already been used. You may have a race condition in your code."),t[n]&&console.error("Shared SDK options have already been set. You may have a race condition in your code."),t[o]=e,t[n]=!0},l.fromSharedOptions=function(){var e,t;return e="undefined"!=typeof window&&null!==window?window:GLOBAL,t=e[o],e[i]=!0,l(t)},t.exports=l},{"./auth":2,"./logs":3,"./models":10,"./settings":14,"./util":18,"lodash/assign":331,"lodash/defaults":337,"lodash/mapValues":370,"resin-errors":466,"resin-pine":468,"resin-request":472,"resin-settings-client":void 0,"resin-token":477}],14:[function(e,t,r){var n,i -;n=e("bluebird"),i=function(e,t){var i;return i=e.settings,{},r.get=function(e,t){return n.try(function(){return i.get(e)}).asCallback(t)},r.getAll=function(e){return n.try(function(){return i.getAll()}).asCallback(e)},r},t.exports=i},{bluebird:34}],15:[function(e,t,r){var n,i;n=e("lodash/isEmpty"),i=e(".").isProvisioned,r.normalizeDeviceOsVersion=function(e){null!=e.os_version&&n(e.os_version)&&i(e)&&(e.os_version="Resin OS 1.0.0-pre")}},{".":18,"lodash/isEmpty":356}],16:[function(e,t,r){var n,i,o,a,s=[].indexOf||function(e){for(var t=0,r=this.length;t=0},n=function(e){return function(t){return t.slug===e||a(t.aliases,e)}},r.findBySlug=o=function(e,t){return i(e,n(t))},r.normalizeDeviceType=function(e,t){var r;return null!=(r=o(e,t))?r.slug:void 0}},{}],17:[function(e,t,r){var n,i,o,a,s,u;a=e("lodash/assign"),u=e("promise-memoize"),o="1",i="/api/v"+o,n=6e5,s=function(e,t){var r,o,s;return o={},r=function(t){var r;return r=t.url,r=""+i+r,a({method:"GET"},t,{url:r,baseUrl:e,refreshToken:!1})},o.request=s=function(e){return t.send(r(e))},o.stream=function(e){return t.stream(r(e))},o.buildApiRequester=function(e){var t,r,i,o,a,c,f,l,h;return f=null!=e?e:{},t=f.buildUrl,c=null!=(l=f.postProcess)?l:function(e){return e},a=null!=(h=f.onError)?h:function(e){throw e},i=f.maxAge,r=function(e,r){return s({url:t({deviceType:encodeURIComponent(e),version:encodeURIComponent(r)})}).then(c).catch(a)},void 0===i?i=n:null===i&&(i=void 0),o=u(r,{maxAge:i}),function(e,t){return null==t&&(t="latest"),o(e,t)}},o},t.exports=s},{"lodash/assign":331,"promise-memoize":426}],18:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m,w,x,S={}.hasOwnProperty;a=e("resin-errors"),w=e("semver"),n=e("lodash/cloneDeep"),s=e("lodash/fromPairs"),c=e("lodash/includes"),f=e("lodash/isArray"),l=e("lodash/isEmpty"),h=e("lodash/isFunction"),d=e("lodash/isNumber"),p=e("lodash/isString"),x=e("lodash/throttle"),b=e("memoizee"),y=e("moment"),r.deviceTypes=e("./device-types"),r.getImgMakerHelper=e("./img-maker"),r.notImplemented=g=function(){throw new Error("The method is not implemented.")},r.onlyIf=function(e){return function(t){return e?t:g}},r.now=_=x(function(){return y()},1e3,{leading:!0}),r.dateToMoment=o=b(function(e){return y(e)},{max:1e3,primitive:!0}),r.timeSince=function(e,t){var r,n;return null==t&&(t=!0),r=o(e),n=_(),y.min(n,r).from(n,!t)},r.isId=d,r.LOCKED_STATUS_CODE=423,r.findCallback=function(e){var t;return t=e[e.length-1],h(t)?t:null},r.notFoundResponse={code:"ResinRequestError",statusCode:404},r.treatAsMissingApplication=function(e){return function(t){var r;throw r=new a.ResinApplicationNotFound(e),r.stack=t.stack,r}},r.treatAsMissingDevice=function(e){return function(t){var r;throw r=new a.ResinDeviceNotFound(e),r.stack=t.stack,r}},m=function(e){return e.replace(/(\.[0-9]+)\.rev/,"$1+rev")},r.osVersionRCompare=function(e,t){var n,i,o,a,s;return e=m(e),t=m(t),0!==(s=w.rcompare(e,t))?s:(o=u(e),a=u(t),o!==a?a-o:(n=r.isDevelopmentVersion(e),i=r.isDevelopmentVersion(t),n!==i?n-i:e.localeCompare(t)))},r.isDevelopmentVersion=function(e){return/(\.|\+|-)dev/.test(e)},r.isProvisioned=function(e){return!l(e.supervisor_version)&&!l(e.last_connectivity_event)},u=function(e){var t;return t=w.parse(e).build.map(function(e){var t;return null!=(t=/rev(\d+)/.exec(e))?t[1]:void 0}).filter(function(e){return null!=e})[0],null!=t?parseInt(t,10):0},r.mergePineOptions=function(e,t){var r,i,o;if(!t)return e;i=n(e);for(r in t)if(S.call(t,r))switch(o=t[r],r){case"select":null!=o&&(f(o)||(o=[o]),c(o,"id")||o.unshift("id")),i[r]=o;break;case"orderby":case"top":case"skip":i[r]=o;break;case"filter":e.filter?i.filter={$and:[e.filter,o]}:i.filter=o;break;case"expand":i.expand=v(e.expand,o);break;default:throw new Error("Unknown pine option: "+r)}return i},v=function(e,t){var r,n,o;if(null==e)return t;e=i(e),t=i(t);for(r in t)S.call(t,r)&&(o=t[r],n=e[r]||(e[r]={}),o.$select&&(n.$select=o.$select),o.$expand&&(n.$expand=v(n.$expand,o.$expand)));return e},i=function(e){var t,r,i,o;if(null==e)return{};if(p(e))return o={},o[""+e]={},o;if(f(e))return s(e.map(function(e){return[e,{}]}));for(t in e)if(S.call(e,t)&&(r=e[t],i=Object.keys(r).filter(function(e){return"$select"!==e&&"$expand"!==e}),i.length>0))throw new Error("Unknown pine expand options: "+i);return n(e)}},{"./device-types":16,"./img-maker":17,"lodash/cloneDeep":334,"lodash/fromPairs":344,"lodash/includes":348,"lodash/isArray":350,"lodash/isEmpty":356,"lodash/isFunction":358,"lodash/isNumber":360,"lodash/isString":363,"lodash/throttle":384,memoizee:399,moment:414,"resin-errors":466,semver:480}],19:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":20,"./asn1/base":22,"./asn1/constants":26,"./asn1/decoders":28,"./asn1/encoders":31,"bn.js":35}],20:[function(e,t,r){function n(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var i=e("../asn1"),o=e("inherits");r.define=function(e,t){return new n(e,t)},n.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return o(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},n.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},n.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},n.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},n.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":19,inherits:161,vm:498}],21:[function(e,t,r){function n(e,t){if(a.call(this,t),!s.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function i(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof i||(e=new i(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var o=e("inherits"),a=e("../base").Reporter,s=e("buffer").Buffer;o(n,a),r.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},n.prototype.restore=function(e){var t=new n(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,a.prototype.restore.call(this,e.reporter),t},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},n.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},n.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=i,i.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":22,buffer:64,inherits:161}],22:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":21,"./node":23,"./reporter":24}],23:[function(e,t,r){function n(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var i=e("../base").Reporter,o=e("../base").EncoderBuffer,a=e("../base").DecoderBuffer,s=e("minimalistic-assert"),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u),f=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=n;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];n.prototype.clone=function(){var e=this._baseState,t={};l.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},n.prototype._wrap=function(){var e=this._baseState;c.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},n.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},n.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0),t[e[r]]=r}),t}))},f.forEach(function(e){n.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),u.forEach(function(e){n.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}}),n.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},n.prototype.optional=function(){return this._baseState.optional=!0,this},n.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},n.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},n.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},n.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},n.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},n.prototype.any=function(){return this._baseState.any=!0,this},n.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},n.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},n.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n=r.default,i=!0,o=null;if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){var s=null;if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(i=this._peekTag(e,s,r.any),e.isError(i))return i}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),i=!0}catch(e){i=!1}e.restore(u)}}var c;if(r.obj&&i&&(c=e.enterObject()),i){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)var u=e.save();var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?n=e.raw(u):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),n=r.any?n:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(n);n=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&i&&(n=e.leaveObject(c)),null===r.key||null===n&&i!==!0?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,n),n},n.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},n.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},n.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},n.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},n.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},n.prototype._encodeValue=function(e,t,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new i);var o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}var a=null,s=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)a=this._getUse(n.contains,r)._encode(e,t),s=!0;else if(n.children)a=n.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},u))}else null!==n.use?o=this._getUse(n.use,r)._encode(e,t):(a=this._encodePrimitive(n.tag,e),s=!0);var o;if(!n.any&&null===n.choice){var c=null!==n.implicit?n.implicit:n.tag,f=null===n.implicit?"universal":"context";null===c?null===n.use&&t.error("Tag could be ommited only for .use()"):null===n.use&&(o=this._encodeComposite(c,s,f,a))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},n.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},n.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},n.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},n.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":22,"minimalistic-assert":412}],24:[function(e,t,r){function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}var o=e("inherits");r.Reporter=n,n.prototype.isError=function(e){return e instanceof i},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof i;if(t=n?e:new i(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},o(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:161}],25:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":26}],26:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0),t[e[r]]=r}),t},n.der=e("./der")},{"./der":25}],27:[function(e,t,r){function n(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new i,this.tree._init(e.body)}function i(e){c.Node.call(this,"der",e)}function o(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=l.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:l.tag[r]}}function a(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=l.tagClassByName[r||"universal"]<<6)}var s=e("inherits"),u=e("buffer").Buffer,c=e("../../asn1"),f=c.base,l=c.constants.der;t.exports=n,n.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(i,f.Node),i.prototype._encodeComposite=function(e,t,r,n){var i=a(e,t,r,this.reporter);if(n.length<128){var o=new u(2);return o[0]=i,o[1]=n.length,this._createEncoderBuffer([o,n])}for(var s=1,c=n.length;c>=256;c>>=8)s++;var o=new u(2+s);o[0]=i,o[1]=128|s;for(var c=1+s,f=n.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,n])},i.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new u(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0;n=128;o>>=7)i++}for(var a=new u(i),s=a.length-1,n=e.length-1;n>=0;n--){var o=e[n];for(a[s--]=127&o;(o>>=7)>0;)a[s--]=128|127&o}return this._createEncoderBuffer(a)},i.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[o(n.getFullYear()),o(n.getUTCMonth()+1),o(n.getUTCDate()),o(n.getUTCHours()),o(n.getUTCMinutes()),o(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[o(n.getFullYear()%100),o(n.getUTCMonth()+1),o(n.getUTCDate()),o(n.getUTCHours()),o(n.getUTCMinutes()),o(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!u.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new u(r)}if(u.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new u(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,o=e;o>=256;o>>=8)n++;for(var i=new Array(n),o=i.length-1;o>=0;o--)i[o]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new u(i))},i.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},i.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},i.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,a,s,u=e.length;a=n(e),s=new l(3*u/4-a),i=a>0?u-4:u;var c=0;for(t=0,r=0;t>16&255,s[c++]=o>>8&255,s[c++]=255&o;return 2===a?(o=f[e.charCodeAt(t)]<<2|f[e.charCodeAt(t+1)]>>4,s[c++]=255&o):1===a&&(o=f[e.charCodeAt(t)]<<10|f[e.charCodeAt(t+1)]<<4|f[e.charCodeAt(t+2)]>>2,s[c++]=o>>8&255,s[c++]=255&o),s}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,r){for(var n,i=[],o=t;ou?u:a+16383));return 1===n?(t=e[r-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=u;for(var c=[],f=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),n=e.shift();t.call(r,n)}else t._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),f=new e(t);f._propagateFrom(this,1);var l=this._target();if(f._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:f,target:l,bindingPromise:c};l._then(t,a,void 0,f,h),c._then(s,u,void 0,f,h),f._setOnCancel(c)}else f._resolveCallback(l);return f},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=this._bitField&-2097153},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(e){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=e("./promise")();o.noConflict=n,t.exports=o},{"./promise":22}],5:[function(e,t,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){function r(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+s.classString(e)+" has no method '"+s.toString(r)+"'";throw new t.TypeError(i)}return n}function n(e){return r(e,this.pop()).apply(e,this)}function i(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),u=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(n,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,r="number"==typeof e;if(r)t=o;else if(u){var n=a(e);t=null!==n?n:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r=0)return o[e]}var i=!1,o=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=o.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=r,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,u=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=u,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(e,t){return{promise:t}}function o(){return!1}function a(e,t,r){var n=this;try{e(t,r,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+F.toString(e));n._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?F.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function u(){return this._onCancelField}function c(e){this._onCancelField=e}function f(){this._cancellationParent=void 0,this._onCancelField=void 0}function l(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function d(){var e=this._boundTo;return void 0!==e&&e instanceof r?e.isFulfilled()?e.value():void 0:e}function p(){this._trace=new R(this._peekContext())}function b(e,t){if(U(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=k(e);F.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),F.notEnumerableProp(e,"__stackCleaned__",!0)}}}function v(e,t,r,n,i){if(void 0===e&&null!==t&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),u=x(s),c=u.length-1;c>=0;--c){var f=u[c];if(!q.test(f)){var l=f.match(K);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0)for(var h=u[0],c=0;c0&&(a="\n"+s[c-1]);break}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(d,!0,t)}}function y(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),g(r)}function g(e,t,n){if(ae.warnings){var i,o=new L(e);if(t)n._attachExtraTrace(o);else if(ae.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}te("warning",o)||E(o,"",!0)}}function _(e,t){for(var r=0;r=0;--s)if(n[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(t[i]!==u)break;t.pop(),i--}t=n}}function x(e){for(var t=[],r=0;r0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function k(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?S(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:x(t)}}function E(e,t,r){if("undefined"!=typeof console){var n;if(F.isObject(e)){n=t+G(e.stack,e)}else n=t+String(e);"function"==typeof D?D(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function j(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){N.throwLater(e)}"unhandledRejection"===e?te(e,r,n)||i||E(r,"Unhandled rejection "):te(e,n)}function A(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():F.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+M(t)+">, no stack trace)"}function M(e){return e.length<41?e:e.substr(0,38)+"..."}function C(){return"function"==typeof oe}function O(e){var t=e.match(ie);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function T(e,t){if(C()){for(var r,n,i=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,u=0;u=s||(ne=function(e){if(z.test(e))return!0;var t=O(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}}function R(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);oe(this,R),t>32&&this.uncycle()}var I,P,D,B=r._getDomain,N=r._async,L=t("./errors").Warning,F=t("./util"),U=F.canAttachTrace,z=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,K=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,G=null,V=!1,Y=!(0==F.env("BLUEBIRD_DEBUG")),W=!(0==F.env("BLUEBIRD_WARNINGS")||!Y&&!F.env("BLUEBIRD_WARNINGS")),$=!(0==F.env("BLUEBIRD_LONG_STACK_TRACES")||!Y&&!F.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=F.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!F.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),N.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",I,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",P,e,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(e,t,r){return g(e,t,r||this)},r.onPossiblyUnhandledRejection=function(e){var t=B();P="function"==typeof e?null===t?e:F.domainBind(t,e):void 0},r.onUnhandledRejectionHandled=function(e){var t=B();I="function"==typeof e?null===t?e:F.domainBind(t,e):void 0};var Z=function(){};r.longStackTraces=function(){if(N.haveItemsQueued()&&!ae.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ae.longStackTraces&&C()){var e=r.prototype._captureStackTrace,t=r.prototype._attachExtraTrace;ae.longStackTraces=!0,Z=function(){if(N.haveItemsQueued()&&!ae.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=e,r.prototype._attachExtraTrace=t,n.deactivateLongStackTraces(),N.enableTrampoline(),ae.longStackTraces=!1},r.prototype._captureStackTrace=p,r.prototype._attachExtraTrace=b,n.activateLongStackTraces(),N.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return ae.longStackTraces&&C()};var J=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return F.global.dispatchEvent(e),function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!F.global.dispatchEvent(r)}}if("function"==typeof Event){var e=new Event("CustomEvent");return F.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,!F.global.dispatchEvent(r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),F.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!F.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),Q=function(){return F.isNode?function(){return e.emit.apply(e,arguments)}:F.global?function(e){var t="on"+e.toLowerCase(),r=F.global[t];return!!r&&(r.apply(F.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),ee={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:i},te=function(e){var t=!1;try{t=Q.apply(null,arguments)}catch(e){N.throwLater(e),t=!0}var r=!1;try{r=J(e,ee[e].apply(null,arguments))}catch(e){N.throwLater(e),r=!0}return r||t};r.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?r.longStackTraces():!e.longStackTraces&&r.hasLongStackTraces()&&Z()),"warnings"in e){var t=e.warnings;ae.warnings=!!t,X=ae.warnings,F.isObject(t)&&"wForgottenReturn"in t&&(X=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ae.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=f,r.prototype._propagateFrom=l,r.prototype._onCancel=u,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,re=l,ae.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!ae.monitoring?(ae.monitoring=!0,r.prototype._fireEvent=te):!e.monitoring&&ae.monitoring&&(ae.monitoring=!1,r.prototype._fireEvent=o)),r},r.prototype._fireEvent=o,r.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(e){},r.prototype._attachCancellationCallback=function(e){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(e,t){};var re=h,ne=function(){return!1},ie=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;F.inherits(R,Error),n.CapturedTrace=R,R.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;e=this._length=n;for(var n=e-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var u=n>0?t[n-1]:this;s=0;--f)t[f]._length=c,c++;return}}}},R.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=k(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(x(i.stack.split("\n"))),i=i._parent;w(n),m(n),F.notEnumerableProp(e,"stack",_(r,n)),F.notEnumerableProp(e,"__stackCleaned__",!0)}};var oe=function(){var e=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():A(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=/^\s*at\s*/,G=e;var t=Error.captureStackTrace;return ne=function(e){return z.test(e)},function(e,r){Error.stackTraceLimit+=6,t(e,r),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,G=e,V=!0,function(e){e.stack=(new Error).stack};var n;try{throw new Error}catch(e){n="stack"in e}return"stack"in r||!n||"number"!=typeof Error.stackTraceLimit?(G=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?A(t):t.toString()},null):(H=/^\s*at\s*/,G=e,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(D=function(e){console.warn(e)},F.isNode&&e.stderr.isTTY?D=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:F.isNode||"string"!=typeof(new Error).stack||(D=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ae={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return $&&r.longStackTraces(),{longStackTraces:function(){return ae.longStackTraces},warnings:function(){return ae.warnings},cancellation:function(){return ae.cancellation},monitoring:function(){return ae.monitoring},propagateFromFunction:function(){return re},boundValueFunction:function(){return d},checkForgottenReturns:v,setBounds:T,warn:g,deprecated:y,CapturedTrace:R,fireDomEvent:J,fireGlobalEvent:Q}}},{"./errors":12,"./util":36}],10:[function(e,t,r){"use strict";t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){function r(){return o(this)}function n(e,r){return i(e,r,t,t)}var i=e.reduce,o=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(r,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,n){return i(e,n,t,0)._then(r,void 0,void 0,e,void 0)},e.mapSeries=n}},{}],12:[function(e,t,r){"use strict";function n(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return f(r,Error),r}function i(e){if(!(this instanceof i))return new i(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=e("./es5"),u=s.freeze,c=e("./util"),f=c.inherits,l=c.notEnumerableProp,h=n("Warning","warning"),d=n("CancellationError","cancellation error"),p=n("TimeoutError","timeout error"),b=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function u(e){if(!a(this,e))return h.e=e,h}function c(e){var i=this.promise,c=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?c.call(i._boundValue()):c.call(i._boundValue(),e);if(f===n)return f;if(void 0!==f){i._setReturnedNonUndefined();var d=r(f,i);if(d instanceof t){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new l("late cancellation observer");return i._attachExtraTrace(p),h.e=p,h}d.isPending()&&d._attachCancellationCallback(new o(this))}return d._then(s,u,void 0,this,void 0)}}}return i.isRejected()?(a(this),h.e=e,h):(a(this),e)}var f=e("./util"),l=t.CancellationError,h=f.errorObj,d=e("./catch_filter")(n);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,c,c)},t.prototype.tap=function(e){return this._passThrough(e,1,c)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,c);var n,i=new Array(r-1),o=0;for(n=0;n0&&"function"==typeof arguments[t]){e=arguments[t];var n}var i=[].slice.call(arguments);e&&i.pop();var n=new r(i).promise();return void 0!==e?n.spread(e):n}}},{"./util":36}],18:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function s(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=c();this._callback=null===i?t:f.domainBind(i,t),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function u(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+f.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+f.classString(i))) -;if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+f.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,r,a,o).promise()}var c=t._getDomain,f=e("./util"),l=f.tryCatch,h=f.errorObj,d=t._async;f.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var c=this._promise,f=this._callback,d=c._boundValue();c._pushContext();var p=l(f).call(d,e,r,o),b=c._popContext();if(a.checkForgottenReturns(p,b,null!==s?"Promise.filter":"Promise.map",c),p===h)return this._reject(p.e),!0;var v=i(p,this._promise);if(v instanceof t){v=v._target();var y=v._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,(r+1)*-1),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);p=v._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],f=arguments[2];u=a.isArray(c)?s(e).apply(f,c):s(e).call(f,c)}else u=s(e)();var l=n._popContext();return o.checkForgottenReturns(u,l,"Promise.try",n),n._resolveFromSyncValue(u),n},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){"use strict";function n(e){return e instanceof Error&&f.getPrototypeOf(e)===Error.prototype}function i(e){var t;if(n(e)){t=new c(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var r=f.keys(e),i=0;i1){var r,n=new Array(t-1),i=0;for(r=0;r0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(r+=", "+p.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?h("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},o.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},o.getNewLibraryCopy=r.exports,o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(w);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(e)(T(t,r));return n===R&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new E(e).promise()},o.cast=function(e){var t=k(e);return t instanceof o||(t=new o(w),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(w);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new _("expecting a function but got "+p.classString(e));return y.setScheduler(e)},o.prototype._then=function(e,t,r,n,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),f=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=c();if(0!=(50397184&f)){var h,d,b=u._settlePromiseCtx;0!=(33554432&f)?(d=u._rejectionHandler0,h=e):0!=(16777216&f)?(d=u._fulfillmentHandler0,h=t,u._unsetRejectionIsUnhandled()):(b=u._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),u._attachExtraTrace(d),h=t),y.invoke(b,u,{handler:null===l?h:"function"==typeof h&&p.domainBind(l,h),promise:s,receiver:n,value:d})}else u._addCallbacks(e,t,s,n,l);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(e){this._bitField=this._bitField&-65536|65535&e},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){y.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==d)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=d),this._addCallbacks(t,r,n,i,null)},o.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=d),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:p.domainBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this[a+1]=null===i?t:p.domainBind(i,t))}return this._setLength(o+1),o},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(f(),!1);var r=k(e,this);if(!(r instanceof o))return this._fulfill(e);t&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(f());var i=n._bitField;if(0==(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var r=f();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():y.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return y.fatalError(e,p.isNode);(65535&t)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(e,t){for(var r=1;r0){if(0!=(16842752&e)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return M.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",f),t("./method")(o,w,k,h,M),t("./bind")(o,w,k,M),t("./cancel")(o,E,h,M),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,E,k,w,y,c),o.Promise=o,o.version="3.5.0",t("./map.js")(o,E,h,k,w,M),t("./call_get.js")(o),t("./using.js")(o,h,k,A,w,M),t("./timers.js")(o,w,M),t("./generators.js")(o,h,w,k,n,M),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,E,k,h),t("./race.js")(o,w,k,h),t("./reduce.js")(o,E,h,k,w,M),t("./settle.js")(o,E,M),t("./some.js")(o,E,h),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),M.setBounds(v.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function s(e){var n=this._promise=new t(r);e instanceof t&&n._propagateFrom(e,3),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=e("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,o){var s=n(this._values,this._promise);if(s instanceof t){s=s._target();var c=s._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=u.asArray(s))){var f=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(f,!1)}if(0===s.length)return void(o===-5?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){"use strict";function n(e,t,r,n,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var r=new o;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},i.prototype._promiseRejected=function(e,t){var r=new o;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){"use strict";t.exports=function(t,r,n){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(e),o=r.promise();return r.setHowMany(t),r.init(),o}var a=e("./util"),s=e("./errors").RangeError,u=e("./errors").AggregateError,c=a.isArray,f={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=c(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(f),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new u,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){ -return this.length()-this._rejected()},i.prototype._getRangeError=function(e){return new s("Input array must contain at least "+this._howMany+" items but contains only "+e+" items")},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(e,t,r){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){"use strict";t.exports=function(t,r){function n(e,n){if(f(e)){if(e instanceof t)return e;var i=o(e);if(i===c){n&&n._pushContext();var u=t.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(a(e)){var u=new t(r);return e._then(u._fulfill,u._reject,void 0,u,null),u}return s(e,i,n)}}return e}function i(e){return e.then}function o(e){try{return i(e)}catch(e){return c.e=e,c}}function a(e){try{return l.call(e,"_promise0")}catch(e){return!1}}function s(e,n,i){function o(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,l,!0),s=null)}var s=new t(r),f=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var l=!0,h=u.tryCatch(n).call(e,o,a);return l=!1,s&&h===c&&(s._rejectCallback(h.e,!0,!0),s=null),f}var u=e("./util"),c=u.errorObj,f=u.isObject,l={}.hasOwnProperty;return n}},{"./util":36}],34:[function(e,t,r){"use strict";t.exports=function(t,r,n){function i(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(e){return f(+this).thenReturn(e)},f=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(c,null,null,e,void 0),n.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(r),s=setTimeout(function(){a._fulfill()},+e),n.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return f(e,this)};var l=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new u("operation timed out"):new u(t),s.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};t.prototype.timeout=function(e,t){e=+e;var r,s,u=new i(setTimeout(function(){r.isPending()&&l(r,t,s)},e));return n.cancellation()?(s=this.then(),r=s._then(o,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function s(e){setTimeout(function(){throw e},0)}function u(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function c(e,r){function i(){if(a>=c)return f._fulfill();var o=u(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(i,s,null,null,null)}i()}var a=0,c=e.length,f=new t(o);return i(),f}function f(e,t,r){this._data=e,this._promise=t,this._context=r}function l(e,t,r){this.constructor$(e,t,r)}function h(e){return f.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function d(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),b=e("./errors").TypeError,v=e("./util").inherits,y=p.errorObj,g=p.tryCatch,_={};f.prototype.data=function(){return this._data},f.prototype.promise=function(){return this._promise},f.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():_},f.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==_?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},f.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},v(l,f),l.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},d.prototype._resultCancelled=function(){for(var e=this.length,r=0;r0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new l(e,this,i());throw new b}}},{"./errors":12,"./util":36}],36:[function(t,r,i){"use strict";function o(){try{var e=T;return T=null,e.apply(this,arguments)}catch(e){return O.e=e,O}}function a(e){return T=e,o}function s(e){return null==e||e===!0||e===!1||"string"==typeof e||"number"==typeof e}function u(e){return"function"==typeof e||"object"==typeof e&&null!==e}function c(e){return s(e)?new Error(g(e)):e}function f(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=D.test(e+"")&&M.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function b(e){function t(){}t.prototype=e;for(var r=8;r--;)new t;return e}function v(e){return B.test(e)}function y(e,t,r){for(var n=new Array(e),i=0;i10||t[0]>0}(),q.isNode&&q.toFastProperties(e);try{throw new Error}catch(e){q.lastLineError=e}r.exports=q},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:425}],35:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}function u(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}function c(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;i=0|e.words[p],o=0|t.words[d],a=i*o+l,f+=a/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}function f(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0,i+=a>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function l(e,t,r){return(new h).mulp(e,t,r)}function h(e,t){this.x=e,this.y=t}function d(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){g.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var m;try{m=e("buffer").Buffer}catch(e){}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,u=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,r=0!==o||a!==this.length-1?w[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=x[e],f=S[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var h=l.modn(f).toString(e);l=l.idivn(f),r=l.isZero()?h+r:w[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==m),this.toArrayLike(m,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,v=0|a[2],y=8191&v,g=v>>>13,_=0|a[3],m=8191&_,w=_>>>13,x=0|a[4],S=8191&x,k=x>>>13,E=0|a[5],j=8191&E,A=E>>>13,M=0|a[6],C=8191&M,O=M>>>13,T=0|a[7],R=8191&T,I=T>>>13,P=0|a[8],D=8191&P,B=P>>>13,N=0|a[9],L=8191&N,F=N>>>13,U=0|s[0],z=8191&U,q=U>>>13,K=0|s[1],H=8191&K,G=K>>>13,V=0|s[2],Y=8191&V,W=V>>>13,$=0|s[3],X=8191&$,Z=$>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(l,z),i=Math.imul(l,q),i=i+Math.imul(h,z)|0,o=Math.imul(h,q);var ve=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,z),i=Math.imul(p,q),i=i+Math.imul(b,z)|0,o=Math.imul(b,q),n=n+Math.imul(l,H)|0,i=i+Math.imul(l,G)|0,i=i+Math.imul(h,H)|0,o=o+Math.imul(h,G)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=Math.imul(y,q),i=i+Math.imul(g,z)|0,o=Math.imul(g,q),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(l,Y)|0,i=i+Math.imul(l,W)|0,i=i+Math.imul(h,Y)|0,o=o+Math.imul(h,W)|0;var ge=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(m,z),i=Math.imul(m,q),i=i+Math.imul(w,z)|0,o=Math.imul(w,q),n=n+Math.imul(y,H)|0,i=i+Math.imul(y,G)|0,i=i+Math.imul(g,H)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(l,X)|0,i=i+Math.imul(l,Z)|0,i=i+Math.imul(h,X)|0,o=o+Math.imul(h,Z)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(S,z),i=Math.imul(S,q),i=i+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(m,H)|0,i=i+Math.imul(m,G)|0,i=i+Math.imul(w,H)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Y)|0,i=i+Math.imul(y,W)|0,i=i+Math.imul(g,Y)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(l,Q)|0,i=i+Math.imul(l,ee)|0,i=i+Math.imul(h,Q)|0,o=o+Math.imul(h,ee)|0;var me=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(j,z),i=Math.imul(j,q),i=i+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(S,H)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(k,H)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(m,Y)|0,i=i+Math.imul(m,W)|0,i=i+Math.imul(w,Y)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,i=i+Math.imul(y,Z)|0,i=i+Math.imul(g,X)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(l,re)|0,i=i+Math.imul(l,ne)|0,i=i+Math.imul(h,re)|0,o=o+Math.imul(h,ne)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,z),i=Math.imul(C,q),i=i+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(j,H)|0,i=i+Math.imul(j,G)|0,i=i+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,W)|0,i=i+Math.imul(k,Y)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(m,X)|0,i=i+Math.imul(m,Z)|0,i=i+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,Q)|0,i=i+Math.imul(y,ee)|0,i=i+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(l,oe)|0,i=i+Math.imul(l,ae)|0,i=i+Math.imul(h,oe)|0,o=o+Math.imul(h,ae)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(R,z),i=Math.imul(R,q),i=i+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(C,H)|0,i=i+Math.imul(C,G)|0,i=i+Math.imul(O,H)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(j,Y)|0,i=i+Math.imul(j,W)|0,i=i+Math.imul(A,Y)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,i=i+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(m,Q)|0,i=i+Math.imul(m,ee)|0,i=i+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=i+Math.imul(y,ne)|0,i=i+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=i+Math.imul(p,ae)|0,i=i+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(l,ue)|0,i=i+Math.imul(l,ce)|0,i=i+Math.imul(h,ue)|0,o=o+Math.imul(h,ce)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),i=Math.imul(D,q),i=i+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(R,H)|0,i=i+Math.imul(R,G)|0,i=i+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(C,Y)|0,i=i+Math.imul(C,W)|0,i=i+Math.imul(O,Y)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(j,X)|0,i=i+Math.imul(j,Z)|0,i=i+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,i=i+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0,i=i+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=i+Math.imul(y,ae)|0,i=i+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(l,le)|0,i=i+Math.imul(l,he)|0,i=i+Math.imul(h,le)|0,o=o+Math.imul(h,he)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=Math.imul(L,q),i=i+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(D,H)|0,i=i+Math.imul(D,G)|0,i=i+Math.imul(B,H)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(R,Y)|0,i=i+Math.imul(R,W)|0,i=i+Math.imul(I,Y)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(C,X)|0,i=i+Math.imul(C,Z)|0,i=i+Math.imul(O,X)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(j,Q)|0,i=i+Math.imul(j,ee)|0,i=i+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,i=i+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(m,oe)|0,i=i+Math.imul(m,ae)|0,i=i+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(y,ue)|0,i=i+Math.imul(y,ce)|0,i=i+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=i+Math.imul(p,he)|0,i=i+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0,n=n+Math.imul(l,pe)|0,i=i+Math.imul(l,be)|0,i=i+Math.imul(h,pe)|0,o=o+Math.imul(h,be)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,H),i=Math.imul(L,G),i=i+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(D,Y)|0,i=i+Math.imul(D,W)|0,i=i+Math.imul(B,Y)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,i=i+Math.imul(I,X)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,Q)|0,i=i+Math.imul(C,ee)|0,i=i+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(j,re)|0,i=i+Math.imul(j,ne)|0,i=i+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(S,oe)|0,i=i+Math.imul(S,ae)|0,i=i+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(m,ue)|0,i=i+Math.imul(m,ce)|0,i=i+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(y,le)|0,i=i+Math.imul(y,he)|0,i=i+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,be)|0,i=i+Math.imul(b,pe)|0,o=o+Math.imul(b,be)|0;var je=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(L,Y),i=Math.imul(L,W),i=i+Math.imul(F,Y)|0,o=Math.imul(F,W),n=n+Math.imul(D,X)|0,i=i+Math.imul(D,Z)|0, -i=i+Math.imul(B,X)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(R,Q)|0,i=i+Math.imul(R,ee)|0,i=i+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,i=i+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(j,oe)|0,i=i+Math.imul(j,ae)|0,i=i+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(S,ue)|0,i=i+Math.imul(S,ce)|0,i=i+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(m,le)|0,i=i+Math.imul(m,he)|0,i=i+Math.imul(w,le)|0,o=o+Math.imul(w,he)|0,n=n+Math.imul(y,pe)|0,i=i+Math.imul(y,be)|0,i=i+Math.imul(g,pe)|0,o=o+Math.imul(g,be)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,X),i=Math.imul(L,Z),i=i+Math.imul(F,X)|0,o=Math.imul(F,Z),n=n+Math.imul(D,Q)|0,i=i+Math.imul(D,ee)|0,i=i+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,i=i+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=i+Math.imul(C,ae)|0,i=i+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(j,ue)|0,i=i+Math.imul(j,ce)|0,i=i+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(S,le)|0,i=i+Math.imul(S,he)|0,i=i+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0,n=n+Math.imul(m,pe)|0,i=i+Math.imul(m,be)|0,i=i+Math.imul(w,pe)|0,o=o+Math.imul(w,be)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,Q),i=Math.imul(L,ee),i=i+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=i+Math.imul(D,ne)|0,i=i+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=i+Math.imul(R,ae)|0,i=i+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=i+Math.imul(C,ce)|0,i=i+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(j,le)|0,i=i+Math.imul(j,he)|0,i=i+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0,n=n+Math.imul(S,pe)|0,i=i+Math.imul(S,be)|0,i=i+Math.imul(k,pe)|0,o=o+Math.imul(k,be)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,re),i=Math.imul(L,ne),i=i+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=i+Math.imul(D,ae)|0,i=i+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=i+Math.imul(R,ce)|0,i=i+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=i+Math.imul(C,he)|0,i=i+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0,n=n+Math.imul(j,pe)|0,i=i+Math.imul(j,be)|0,i=i+Math.imul(A,pe)|0,o=o+Math.imul(A,be)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,oe),i=Math.imul(L,ae),i=i+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(D,ue)|0,i=i+Math.imul(D,ce)|0,i=i+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(R,le)|0,i=i+Math.imul(R,he)|0,i=i+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0,n=n+Math.imul(C,pe)|0,i=i+Math.imul(C,be)|0,i=i+Math.imul(O,pe)|0,o=o+Math.imul(O,be)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,ue),i=Math.imul(L,ce),i=i+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(D,le)|0,i=i+Math.imul(D,he)|0,i=i+Math.imul(B,le)|0,o=o+Math.imul(B,he)|0,n=n+Math.imul(R,pe)|0,i=i+Math.imul(R,be)|0,i=i+Math.imul(I,pe)|0,o=o+Math.imul(I,be)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,le),i=Math.imul(L,he),i=i+Math.imul(F,le)|0,o=Math.imul(F,he),n=n+Math.imul(D,pe)|0,i=i+Math.imul(D,be)|0,i=i+Math.imul(B,pe)|0,o=o+Math.imul(B,be)|0;var Ie=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,pe),i=Math.imul(L,be),i=i+Math.imul(F,pe)|0,o=Math.imul(F,be);var Pe=(c+n|0)+((8191&i)<<13)|0;return c=(o+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,u[0]=ve,u[1]=ye,u[2]=ge,u[3]=_e,u[4]=me,u[5]=we,u[6]=xe,u[7]=Se,u[8]=ke,u[9]=Ee,u[10]=je,u[11]=Ae,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Te,u[16]=Re,u[17]=Ie,u[18]=Pe,0!==c&&(u[19]=c,r.length++),r};Math.imul||(k=c),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?k(this,e,t):r<63?c(this,e,t):r<1024?f(this,e,t):l(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},h.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=u(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i;i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){s=new o(null),s.length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,a,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a)):(r.isub(t),a.isub(i))}var h;return h=0===t.cmpn(1)?i:a,h.cmpn(0)<0&&h.iadd(e),h},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return this.cmpn(e)===-1},o.prototype.lt=function(e){return this.cmp(e)===-1},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new g(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var E={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},d.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},d.prototype.split=function(e,t){e.iushrn(this.n,0,t)},d.prototype.imulK=function(e){return e.imul(this.k)},i(p,d),p.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function e(t){if(E[t])return E[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return E[t]=e,e},g.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},g.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},g.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},g.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},g.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},g.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},g.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},g.prototype.isqr=function(e){return this.imul(e,e.clone())},g.prototype.sqr=function(e){return this.mul(e,e)},g.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},g.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},g.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},i(_,g),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],36:[function(e,t,r){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;rs||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function n(e){for(;0>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,o=e[i],a=e[o],s=e[a],n=257*e[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*a^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^e[e[e[s^o]]],u^=e[e[u]]);return!0};var u=new i;a.blockSize=16,a.prototype.blockSize=a.blockSize,a.keySize=32,a.prototype.keySize=a.keySize,a.prototype._doReset=function(){var e,t,r,n,i,o;for(r=this._key,t=r.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=u.RCON[n/t|0]<<24):t>6&&n%t==4&&(o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]),this._keySchedule[n-t]^o);for(this._invKeySchedule=[],e=0;e>>24]]^u.INV_SUB_MIX[1][u.SBOX[o>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[o>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&o]];return!0},a.prototype.encryptBlock=function(t){t=o(new e(t));var r=this._doCryptBlock(t,this._keySchedule,u.SUB_MIX,u.SBOX),n=new e(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},a.prototype.decryptBlock=function(t){t=o(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var n=this._doCryptBlock(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX),i=new e(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},a.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},a.prototype._doCryptBlock=function(e,r,n,i){var o,a,s,u,c,f,l,h,d;a=e[0]^r[0],s=e[1]^r[1],u=e[2]^r[2],c=e[3]^r[3],o=4;for(var p=1;p>>24]^n[1][s>>>16&255]^n[2][u>>>8&255]^n[3][255&c]^r[o++],l=n[0][s>>>24]^n[1][u>>>16&255]^n[2][c>>>8&255]^n[3][255&a]^r[o++],h=n[0][u>>>24]^n[1][c>>>16&255]^n[2][a>>>8&255]^n[3][255&s]^r[o++],d=n[0][c>>>24]^n[1][a>>>16&255]^n[2][s>>>8&255]^n[3][255&u]^r[o++],a=f,s=l,u=h,c=d;return f=(i[a>>>24]<<24|i[s>>>16&255]<<16|i[u>>>8&255]<<8|i[255&c])^r[o++],l=(i[s>>>24]<<24|i[u>>>16&255]<<16|i[c>>>8&255]<<8|i[255&a])^r[o++],h=(i[u>>>24]<<24|i[c>>>16&255]<<16|i[a>>>8&255]<<8|i[255&s])^r[o++],d=(i[c>>>24]<<24|i[a>>>16&255]<<16|i[s>>>8&255]<<8|i[255&u])^r[o++],[t(f),t(l),t(h),t(d)]},r.AES=a}).call(this,e("buffer").Buffer)},{buffer:64}],39:[function(e,t,r){(function(r){function n(e,t,i,s){if(!(this instanceof n))return new n(e,t,i);a.call(this),this._finID=r.concat([i,new r([0,0,0,1])]),i=r.concat([i,new r([0,0,0,2])]),this._cipher=new o.AES(t),this._prev=new r(i.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=s,this._alen=0,this._len=0,i.copy(this._prev),this._mode=e;var c=new r(4);c.fill(0),this._ghash=new u(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}function i(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=-1;++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=s,r.createDecipheriv=a}).call(this,e("buffer").Buffer)},{"./aes":38,"./authCipher":39, -"./modes":44,"./modes/cbc":45,"./modes/cfb":46,"./modes/cfb1":47,"./modes/cfb8":48,"./modes/ctr":49,"./modes/ecb":50,"./modes/ofb":51,"./streamCipher":52,buffer:64,"cipher-base":65,evp_bytestokey:150,inherits:161}],42:[function(e,t,r){(function(t){function n(e,r,o){if(!(this instanceof n))return new n(e,r,o);u.call(this),this._cache=new i,this._cipher=new s.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function i(){if(!(this instanceof i))return new i;this.cache=new t("")}function o(e,r,i){var o=f[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof r&&(r=new t(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new h(p[o.mode],r,i):"auth"===o.type?new d(p[o.mode],r,i):new n(p[o.mode],r,i)}function a(e,t){var r=f[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=l(t,!1,r.key,r.iv);return o(e,n.key,n.iv)}var s=e("./aes"),u=e("cipher-base"),c=e("inherits"),f=e("./modes"),l=e("evp_bytestokey"),h=e("./streamCipher"),d=e("./authCipher");c(n,u),n.prototype._update=function(e){this._cache.add(e);for(var r,n,i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++nu||e<0?(t=Math.abs(e)%u,e<0?u-t:t):e}function a(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var s=new e(16);s.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t0;e--)o[e]=o[e]>>>1|(1&o[e-1])<<31;o[0]=o[0]>>>1,r&&(o[0]=o[0]^225<<24)}this.state=i(s)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,s],16)),this.ghash(i([0,t,0,r])),this.state};var u=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:64}],44:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],45:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;return e._prev=t,n(e._cipher.decryptBlock(t),r)}},{"buffer-xor":63}],46:[function(e,t,r){(function(t){function n(e,r,n){var o=r.length,a=i(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,n?r:a]),a}var i=e("buffer-xor");r.encrypt=function(e,r,i){for(var o,a=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){a=t.concat([a,n(e,r,i)]);break}o=e._cache.length,a=t.concat([a,n(e,r.slice(0,o),i)]),r=r.slice(o)}return a}}).call(this,e("buffer").Buffer)},{buffer:64,"buffer-xor":63}],47:[function(e,t,r){(function(e){function t(e,t,r){for(var i,o,a,s=-1,u=0;++s<8;)i=e._cipher.encryptBlock(e._prev),o=t&1<<7-s?128:0,a=i[0]^o,u+=(128&a)>>s%8,e._prev=n(e._prev,r?o:a);return u}function n(t,r){var n=t.length,i=-1,o=new e(t.length);for(t=e.concat([t,new e([r])]);++i>7;return o}r.encrypt=function(r,n,i){for(var o=n.length,a=new e(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new a(s(t));return r}var a=e("bn.js"),s=e("randombytes");t.exports=i,i.getr=o}).call(this,e("buffer").Buffer)},{"bn.js":35,buffer:64,randombytes:445}],57:[function(e,t,r){(function(e){"use strict";r["RSA-SHA224"]=r.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new e("302d300d06096086480165030402040500041c","hex")},r["RSA-SHA256"]=r.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new e("3031300d060960864801650304020105000420","hex")},r["RSA-SHA384"]=r.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new e("3041300d060960864801650304020205000430","hex")},r["RSA-SHA512"]=r.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new e("3051300d060960864801650304020305000440","hex")},r["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new e("3021300906052b0e03021a05000414","hex")},r["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new e("","hex")},r.DSA=r["DSA-SHA1"]=r["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new e("","hex")},r["DSA-SHA224"]=r["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new e("","hex")},r["DSA-SHA256"]=r["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new e("","hex")},r["DSA-SHA384"]=r["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new e("","hex")},r["DSA-SHA512"]=r["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new e("","hex")},r["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new e("","hex")},r["RSA-RIPEMD160"]=r.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new e("3021300906052b2403020105000414","hex")},r["RSA-MD5"]=r.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new e("3020300c06082a864886f70d020505000410","hex")}}).call(this,e("buffer").Buffer)},{buffer:64}],58:[function(e,t,r){(function(r){function n(e){l.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=u(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){l.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=u(t.hash),this._tag=t.id,this._signType=t.sign}function o(e){return new n(e)}function a(e){return new i(e)}var s=e("./algos"),u=e("create-hash"),c=e("inherits"),f=e("./sign"),l=e("stream"),h=e("./verify"),d={};Object.keys(s).forEach(function(e){d[e]=d[e.toLowerCase()]=s[e]}),c(n,l.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=f(r.concat([this._tag,n]),e,this._hashType,this._signType);return t?i.toString(t):i},c(i,l.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return h(t,r.concat([this._tag,i]),e,this._signType)},t.exports={Sign:o,Verify:a,createSign:o,createVerify:a}}).call(this,e("buffer").Buffer)},{"./algos":57,"./sign":60,"./verify":61,buffer:64,"create-hash":68,inherits:161,stream:489}],59:[function(e,t,r){"use strict";r["1.3.132.0.10"]="secp256k1",r["1.3.132.0.33"]="p224",r["1.2.840.10045.3.1.1"]="p192",r["1.2.840.10045.3.1.7"]="p256",r["1.3.132.0.34"]="p384",r["1.3.132.0.35"]="p521"},{}],60:[function(e,t,r){(function(r){function n(e,t,r,n){var a=v(t);if(a.curve){if("ecdsa"!==n)throw new Error("wrong private key type");return i(e,a)}if("dsa"===a.type){if("dsa"!==n)throw new Error("wrong private key type");return o(e,a,r)}if("rsa"!==n)throw new Error("wrong private key type");for(var s=a.modulus.byteLength(),u=[0,1];e.length+u.length+10&&r.ishrn(n),r}function c(e,t){e=u(e,t),e=e.mod(t);var n=new r(e.toArray());if(n.length=t)throw new Error("invalid sig")}var s=e("./curves"),u=e("elliptic"),c=e("parse-asn1"),f=e("bn.js"),l=u.ec;t.exports=n}).call(this,e("buffer").Buffer)},{"./curves":59,"bn.js":35,buffer:64,elliptic:84,"parse-asn1":420}],62:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,o=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var n=r,o=t;void 0===o&&(n=void 0,o=0);var s=new i(e);if("string"==typeof o)for(var u=new i(o,n),c=u.length,f=-1;++fa)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r;if(1===arguments.length)return new i(e);void 0===o&&(o=0);var a=n;if(void 0===a&&(a=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+a))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new o(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:64}],63:[function(e,t,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o$)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return o(e,t,r)}function o(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?l(e,t,r):"string"==typeof e?c(e,t):h(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function s(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|d(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|b(e,t),o=n(r),a=o.write(e,t);return a!==r&&(o=o.slice(0,a)),o}function f(e){for(var t=e.length<0?0:0|d(e.length),r=n(t),i=0;i=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|e}function p(e){return+e!=e&&(e=0),i.alloc(+e)}function b(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}var c;if(i){var f=-1;for(c=r;cs&&(r=s-u),c=r;c>=0;c--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,f,l;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128==(192&u)&&(l=(31&o)<<6|63&u)>127&&(a=l);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:u=e[i+1],c=e[i+2],f=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return M(n)}function M(e){var t=e.length;if(t<=X)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(e,t,r,n,52,8),r+8}function L(e){if(e=F(e).replace(Z,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function H(e){return Y.toByteArray(L(e))}function G(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e){return e!==e}var Y=e("base64-js"),W=e("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var $=2147483647;r.kMaxLength=$,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return o(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return s(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&e._isBuffer===!0},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1 -;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var a=o-n,s=r-t,u=Math.min(a,s),c=this.slice(n,o),f=e.slice(t,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},i.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),W.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),W.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),W.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),W.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,f=271733878,l=0;l>16)+(t>>16)+(r>>16)<<16|65535&r}function f(e,t){return e<>>32-t}var l=e("./helpers");t.exports=function(e){return l.hash(e,n,16)}},{"./helpers":69}],71:[function(e,t,r){(function(r){"use strict";function n(e,t){a.call(this),e=e.toLowerCase(),"string"==typeof t&&(t=new r(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=i(e).update(t).digest():t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},n.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=u.r28shl(r,a),n=u.r28shl(n,a),u.pc2(r,n,e.keys,i)}},i.prototype._update=function(e,t,r,n){var i=this._desState,o=u.readUInt32BE(e,t),a=u.readUInt32BE(e,t+4);u.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],u.writeUInt32BE(r,o,n),u.writeUInt32BE(r,a,n+4)},i.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=d}u.rip(a,o,n,i)},i.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],f=e.keys[s+1];u.expand(o,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=u.substitute(c,f),h=u.permute(l),d=o;o=(a^h)>>>0,a=d}u.rip(o,a,n,i)}},{"../des":74,inherits:161,"minimalistic-assert":412}],78:[function(e,t,r){"use strict";function n(e,t){o.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[c.create({type:"encrypt",key:r}),c.create({type:"decrypt",key:n}),c.create({type:"encrypt",key:i})]:[c.create({type:"decrypt",key:i}),c.create({type:"encrypt",key:n}),c.create({type:"decrypt",key:r})]}function i(e){u.call(this,e);var t=new n(this.type,this.options.key);this._edeState=t}var o=e("minimalistic-assert"),a=e("inherits"),s=e("../des"),u=s.Cipher,c=s.DES;a(i,u),t.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},i.prototype._pad=c.prototype._pad,i.prototype._unpad=c.prototype._unpad},{"../des":74,inherits:161,"minimalistic-assert":412}],79:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(var a=6;a>=0;a-=2){for(var s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(var s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(var a=4;a<8;a++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var a=1;a<=3;a++){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(var u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(var o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){var o=e>>>18-6*n&63,a=i[64*n+o];r<<=4,r|=a}for(var n=0;n<4;n++){var o=t>>>18-6*n&63,a=i[256+64*n+o];r<<=4,r|=a}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(h),r.testn(1)||r.iadd(d),t.cmp(d)){if(!t.cmp(p))for(;r.mod(b).cmp(v);)r.iadd(g)}else for(;r.mod(c).cmp(y);)r.iadd(g);if(n=r.shrn(1),i(n)&&i(r)&&o(n)&&o(r)&&l.test(n)&&l.test(r))return r}}var s=e("randombytes");t.exports=a,a.simpleSieve=i,a.fermatTest=o;var u=e("bn.js"),c=new u(24),f=e("miller-rabin"),l=new f,h=new u(1),d=new u(2),p=new u(5),b=(new u(16),new u(8),new u(10)),v=new u(3),y=(new u(7),new u(11)),g=new u(4),_=(new u(12),null)},{"bn.js":35,"miller-rabin":411,randombytes:445}], -83:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],84:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":99,"./elliptic/curve":87,"./elliptic/curves":90,"./elliptic/ec":91,"./elliptic/eddsa":94,"./elliptic/utils":98,brorand:36}],85:[function(e,t,r){"use strict";function n(e,t){this.type=e,this.p=new o(t.p,16),this.red=t.prime?o.red(t.prime):o.mont(this.p),this.zero=new o(0).toRed(this.red),this.one=new o(1).toRed(this.red),this.two=new o(2).toRed(this.red),this.n=t.n&&new o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var o=e("bn.js"),a=e("../../elliptic"),s=a.utils,u=s.getNAF,c=s.getJSF,f=s.assert;t.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(e,t){f(e.precomputed);var r=e._getDoubles(),n=u(t,1),i=(1<=a;t--)s=(s<<1)+n[t];o.push(s)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(var a=0;a=0;s--){for(var t=0;s>=0&&0===o[s];s--)t++;if(s>=0&&t++,a=a.dblp(t),s<0)break;var c=o[s];f(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},n.prototype._wnafMulAdd=function(e,t,r,n,i){for(var o=this._wnafT1,a=this._wnafT2,s=this._wnafT3,f=0,l=0;l=1;l-=2){var p=l-1,b=l;if(1===o[p]&&1===o[b]){var v=[t[p],null,null,t[b]];0===t[p].y.cmp(t[b].y)?(v[1]=t[p].add(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg())):0===t[p].y.cmp(t[b].y.redNeg())?(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].add(t[b].neg())):(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=c(r[p],r[b]);f=Math.max(g[0].length,f),s[p]=new Array(f),s[b]=new Array(f);for(var _=0;_=0;l--){for(var k=0;l>=0;){for(var E=!0,_=0;_=0&&k++,x=x.dblp(k),l<0)break;for(var _=0;_0?h=a[_][j-1>>1]:j<0&&(h=a[_][-j-1>>1].neg()),x="affine"===h.type?x.mixedAdd(h):x.add(h))}}for(var l=0;l=Math.ceil((e.bitLength()+1)/t.step)},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},i.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=this.curve._mulA(i),s=a.redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),t=s.redMul(a.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),c=s.redSub(u).redISub(u);e=n.redSub(i).redISub(o).redMul(c),t=s.redMul(a.redSub(o)),r=s.redMul(c)}}else{var a=i.redAdd(o),u=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=a.redSub(u).redSub(u);e=this.curve._mulC(n.redISub(a)).redMul(c),t=this.curve._mulC(a).redMul(i.redISub(o)),r=a.redMul(c)}return this.curve.point(e,t,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},i.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},i.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":84,"../curve":87,"bn.js":35,inherits:161}],87:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":85,"./edwards":86,"./mont":88,"./short":89}],88:[function(e,t,r){"use strict";function n(e){u.call(this,"mont",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,r){u.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(t,16),this.z=new a(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var o=e("../curve"),a=e("bn.js"),s=e("inherits"),u=o.base,c=e("../../elliptic"),f=c.utils;s(n,u),t.exports=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},s(i,u.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},n.prototype.point=function(e,t){return new i(this,e,t)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),o=t.redMul(n),a=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,a)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),a=o.redMul(r),s=i.redMul(n),u=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(u,c)},i.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":84,"../curve":87,"bn.js":35,inherits:161}],89:[function(e,t,r){"use strict";function n(e){f.call(this,"short",e),this.a=new u(e.a,16).toRed(this.red),this.b=new u(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new u(t,16),this.y=new u(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new u(0)):(this.x=new u(t,16),this.y=new u(r,16),this.z=new u(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var a=e("../curve"),s=e("../../elliptic"),u=e("bn.js"),c=e("inherits"),f=a.base,l=s.utils.assert;c(n,f),t.exports=n,n.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new u(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=n[0].cmp(n[1])<0?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new u(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],l(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new u(e.a,16),b:new u(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:o}}},n.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:u.mont(e),r=new u(2).toRed(t).redInvm(),n=r.redNeg(),i=new u(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},n.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,a,s,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new u(1),b=new u(0),v=new u(0),y=new u(1),g=0;0!==h.cmpn(0);){var _=d.div(h);c=d.sub(_.mul(h)),f=v.sub(_.mul(p));var m=y.sub(_.mul(b));if(!n&&c.cmp(l)<0)t=s.neg(),r=p,n=c.neg(),i=f;else if(n&&2==++g)break;s=c,d=h,h=c,v=p,p=f,y=b,b=m}o=c.neg(),a=f;var w=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},n.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},n.prototype.pointFromX=function(e,t){e=new u(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new u(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(o,f.BasePoint),n.prototype.jpoint=function(e,t,r){return new o(this,e,t,r)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":84,"../curve":87,"bn.js":35,inherits:161}],90:[function(e,t,r){"use strict";function n(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:r}),r}})}var o=r,a=e("hash.js"),s=e("../elliptic"),u=s.utils.assert;o.PresetCurve=n,i("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:a.sha384,gRed:!1,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"]}),i("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:a.sha512,gRed:!1,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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var c;try{c=e("./precomputed/secp256k1")}catch(e){c=void 0}i("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},{"../elliptic":84,"./precomputed/secp256k1":97,"hash.js":152}],91:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);"string"==typeof e&&(u(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var i=e("bn.js"),o=e("hmac-drbg"),a=e("../../elliptic"),s=a.utils,u=s.assert,c=e("./key"),f=e("./signature");t.exports=n,n.prototype.keyPair=function(e){return new c(this,e)},n.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(n)>0))return s.iaddn(1),this.keyFromPrivate(s)}},n.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},n.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new o({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;!0;h++){var d=n.k?n.k(h):new i(c.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=d.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(y=y.umod(this.n),0!==y.cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new f({r:v,s:y,recoveryParam:g})}}}}}},n.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n),t=new f(t,"hex");var o=t.r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick){var l=this.g.mulAdd(u,r.getPublic(),c);return!l.isInfinity()&&0===l.getX().umod(this.n).cmp(o)}var l=this.g.jmulAdd(u,r.getPublic(),c);return!l.isInfinity()&&l.eqXToP(o)},n.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,n);var o=this.n,a=new i(e),s=t.r,c=t.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),b=c.mul(d).umod(o);return this.g.mulAdd(p,s,b)},n.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new f(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":84,"./key":92,"./signature":93,"bn.js":35,"hmac-drbg":158}],92:[function(e,t,r){"use strict";function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=e("bn.js"),o=e("../../elliptic"),a=o.utils,s=a.assert;t.exports=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},n.prototype.derive=function(e){return e.mul(this.priv).getX()},n.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},n.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},n.prototype.inspect=function(){return""}},{"../../elliptic":84,"bn.js":35}],93:[function(e,t,r){"use strict";function n(e,t){if(e instanceof n)return e;this._importDER(e,t)||(l(e.r&&e.s,"Signature without r or s"),this.r=new u(e.r,16),this.s=new u(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function i(){this.place=0}function o(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var u=e("bn.js"),c=e("../../elliptic"),f=c.utils,l=f.assert;t.exports=n,n.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new i;if(48!==e[r.place++])return!1;if(o(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var n=o(e,r),a=e.slice(r.place,n+r.place);if(r.place+=n,2!==e[r.place++])return!1;var s=o(e,r);if(e.length!==s+r.place)return!1;var c=e.slice(r.place,s+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new u(a),this.s=new u(c),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=a(t),r=a(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];s(n,t.length),n=n.concat(t),n.push(2),s(n,r.length);var i=n.concat(r),o=[48];return s(o,i.length),o=o.concat(i),f.encode(o,e)}},{"../../elliptic":84,"bn.js":35}],94:[function(e,t,r){"use strict";function n(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof n))return new n(e);var e=o.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=e("hash.js"),o=e("../../elliptic"),a=o.utils,s=a.assert,u=a.parseBytes,c=e("./key"),f=e("./signature");t.exports=n,n.prototype.sign=function(e,t){e=u(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},n.prototype.verify=function(e,t,r){e=u(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},n.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var o=e.andln(3)+n&3,a=t.andln(3)+i&3;3===o&&(o=-1),3===a&&(a=-1);var s;if(0==(1&o))s=0;else{var u=e.andln(7)+n&7;s=3!==u&&5!==u||2!==a?o:-o}r[0].push(s);var c;if(0==(1&a))c=0;else{var u=t.andln(7)+i&7;c=3!==u&&5!==u||2!==o?a:-a}r[1].push(c),2*n===s+1&&(n=1-n),2*i===c+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function o(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function a(e){return"string"==typeof e?u.toArray(e,"hex"):e}function s(e){return new c(e,"hex","le")}var u=r,c=e("bn.js"),f=e("minimalistic-assert"),l=e("minimalistic-crypto-utils");u.assert=f,u.toArray=l.toArray,u.zero2=l.zero2,u.toHex=l.toHex,u.encode=l.encode,u.getNAF=n,u.getJSF=i,u.cachedProperty=o,u.parseBytes=a,u.intFromLE=s},{"bn.js":35,"minimalistic-assert":412,"minimalistic-crypto-utils":413}],99:[function(e,t,r){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],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",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","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":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},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"}}},{}],100:[function(e,t,r){"use strict";var n=e("../../number/is-nan"),i=e("../../number/to-pos-integer"),o=e("../../object/valid-value"),a=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,u=Math.abs,c=Math.floor;t.exports=function(e){var t,r,f,l;if(!n(e))return a.apply(this,arguments);for(r=i(o(this).length),f=arguments[1],f=isNaN(f)?0:f>=0?c(f):i(this.length)-c(u(f)),t=f;t=55296&&g<=56319&&(x+=e[++r]),x=S?h.call(S,k,x,b):x,t?(d.value=x,p(v,b,d)):v[b]=x,++b;y=b}if(void 0===y)for(y=a(e.length),t&&(v=new t(y)),r=0;r0?1:-1}},{}],113:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Number.isNaN:e("./shim")},{"./is-implemented":114,"./shim":115}],114:[function(e,t,r){"use strict";t.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},{}],115:[function(e,t,r){"use strict";t.exports=function(e){return e!==e}},{}],116:[function(e,t,r){"use strict";var n=e("../math/sign"),i=Math.abs,o=Math.floor;t.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?n(e)*o(i(e)):e)}},{"../math/sign":110}],117:[function(e,t,r){"use strict";var n=e("./to-integer"),i=Math.max;t.exports=function(e){return i(0,n(e))}},{"./to-integer":116}],118:[function(e,t,r){"use strict";var n=e("./valid-callable"),i=e("./valid-value"),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(r,c){var f,l=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),f=s(r),h&&f.sort("function"==typeof h?o.call(h,r):void 0),"function"!=typeof e&&(e=f[e]),a.call(e,f,function(e,n){return u.call(r,e)?a.call(c,l,r[e],e,r,n):t})}}},{"./valid-callable":133,"./valid-value":134}],119:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":120,"./shim":121}],120:[function(e,t,r){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],121:[function(e,t,r){"use strict";var n=e("../keys"),i=e("../valid-value"),o=Math.max;t.exports=function(e,t){var r,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},a=1;a"}}},{"./object/is-callable":123}],138:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?String.prototype.contains:e("./shim")},{"./is-implemented":139,"./shim":140}],139:[function(e,t,r){"use strict";var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&(n.contains("dwa")===!0&&n.contains("foo")===!1)}},{}],140:[function(e,t,r){"use strict";var n=String.prototype.indexOf;t.exports=function(e){return n.call(this,e,arguments[1])>-1}},{}],141:[function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||n.call(e)===i)||!1}},{}],142:[function(e,t,r){"use strict";var n=e("./safe-to-string");t.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(/[\n\r\u2028\u2029]/g,function(e){return JSON.stringify(e).slice(1,-1)})}},{"./safe-to-string":137}],143:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Symbol:e("./polyfill")},{"./is-implemented":144,"./polyfill":146}],144:[function(e,t,r){"use strict";var n={object:!0,symbol:!0};t.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return!!n[typeof Symbol.iterator]&&(!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag])}},{}],145:[function(e,t,r){"use strict";t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},{}],146:[function(e,t,r){"use strict";var n,i,o,a,s=e("d"),u=e("./validate-symbol"),c=Object.create,f=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,d=c(null);if("function"==typeof Symbol){n=Symbol;try{String(n()),a=!0}catch(e){}}var p=function(){var e=c(null);return function(t){for(var r,n,i=0;e[t+(i||"")];)++i;return t+=i||"",e[t]=!0,r="@@"+t,l(h,r,s.gs(null,function(e){n||(n=!0,l(this,r,s(e)),n=!1)})),r}}();o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},t.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return a?n(t):(r=c(o.prototype),t=void 0===t?"":String(t),f(r,{__description__:s("",t),__name__:s("",p(t))}))},f(i,{for:s(function(e){return d[e]?d[e]:d[e]=i(String(e))}),keyFor:s(function(e){var t;u(e);for(t in d)if(d[t]===e)return t}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),f(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),f(i.prototype,{toString:s(function(){return"Symbol ("+u(this).__description__+")"}),valueOf:s(function(){return u(this)})}),l(i.prototype,i.toPrimitive,s("",function(){var e=u(this) -;return"symbol"==typeof e?e:e.toString()})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},{"./validate-symbol":147,d:73}],147:[function(e,t,r){"use strict";var n=e("./is-symbol");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},{"./is-symbol":145}],148:[function(e,t,r){"use strict";var n,i,o,a,s,u,c,f=e("d"),l=e("es5-ext/object/valid-callable"),h=Function.prototype.apply,d=Function.prototype.call,p=Object.create,b=Object.defineProperty,v=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var r;return l(t),y.call(this,"__ee__")?r=this.__ee__:(r=g.value=p(null),b(this,"__ee__",g),g.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},i=function(e,t){var r,i;return l(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),h.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var r,n,i,o;if(l(t),!y.call(this,"__ee__"))return this;if(r=this.__ee__,!r[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},a=function(e){var t,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),t=1;t0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],150:[function(e,t,r){(function(r){function n(e,t,n,o){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),n/=8,o=o||0;for(var a,s,u=0,c=0,f=new r(n),l=new r(o),h=0,d=[];;){if(h++>0&&d.push(a),d.push(e),t&&d.push(t),a=i(r.concat(d)),d=[],s=0,n>0)for(;;){if(0===n)break;if(s===a.length)break;f[u++]=a[s],n--,s++}if(o>0&&s!==a.length)for(;;){if(0===o)break;if(s===a.length)break;l[c++]=a[s],o--,s++}if(0===n&&0===o)break}for(s=0;s-1?t:e}function b(e,t){t=t||{};var r=t.body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new a(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new a(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function y(e){var t=new a;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var _={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(_.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=function(e){return e&&DataView.prototype.isPrototypeOf(e)},x=ArrayBuffer.isView||function(e){return e&&m.indexOf(Object.prototype.toString.call(e))>-1};a.prototype.append=function(e,r){e=t(e),r=i(r);var n=this.map[e];this.map[e]=n?n+","+r:r},a.prototype.delete=function(e){delete this.map[t(e)]},a.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},a.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},a.prototype.set=function(e,r){this.map[t(e)]=i(r)},a.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},a.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),o(e)},a.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},a.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),o(e)},_.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},d.call(b.prototype),d.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];g.redirect=function(e,t){if(k.indexOf(t)===-1)throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=a,e.Request=b,e.Response=g,e.fetch=function(e,t){return new r(function(r,i){var o=new b(e,t),a=new n;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:y(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL"),r(new g("response"in a?a.response:a.responseText,e))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&_.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}(void 0!==e?e:this),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response}}()}"function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof r?t.exports=n:e.fetchPonyfill=n}("undefined"==typeof self?this:self)},{}],152:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":153,"./hash/hmac":154,"./hash/ripemd":155,"./hash/sha":156,"./hash/utils":157}],153:[function(e,t,r){function n(){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}var i=e("../hash"),o=i.utils,a=o.assert;r.BlockHash=n,n.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t>>3}function p(e){return T(e,17)^T(e,19)^e>>>10}function b(e,t,r,n){return 0===e?u(t,r,n):1===e||3===e?f(t,r,n):2===e?c(t,r,n):void 0}function v(e,t,r,n,i,o){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function y(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function g(e,t,r,n,i,o){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function m(e,t){var r=B(e,t,28),n=B(t,e,2),i=B(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function w(e,t){var r=N(e,t,28),n=N(t,e,2),i=N(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function x(e,t){var r=B(e,t,14),n=B(e,t,18),i=B(t,e,9),o=r^n^i;return o<0&&(o+=4294967296),o}function S(e,t){var r=N(e,t,14),n=N(e,t,18),i=N(t,e,9),o=r^n^i;return o<0&&(o+=4294967296),o}function k(e,t){var r=B(e,t,1),n=B(e,t,8),i=L(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function E(e,t){var r=N(e,t,1),n=N(e,t,8),i=F(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function j(e,t){var r=B(e,t,19),n=B(t,e,29),i=L(e,t,6),o=r^n^i;return o<0&&(o+=4294967296),o}function A(e,t){var r=N(e,t,19),n=N(t,e,29),i=F(e,t,6),o=r^n^i;return o<0&&(o+=4294967296),o}var M=e("../hash"),C=M.utils,O=C.assert,T=C.rotr32,R=C.rotl32,I=C.sum32,P=C.sum32_4,D=C.sum32_5,B=C.rotr64_hi,N=C.rotr64_lo,L=C.shr64_hi,F=C.shr64_lo,U=C.sum64,z=C.sum64_hi,q=C.sum64_lo,K=C.sum64_4_hi,H=C.sum64_4_lo,G=C.sum64_5_hi,V=C.sum64_5_lo,Y=M.common.BlockHash,W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],X=[1518500249,1859775393,2400959708,3395469782];C.inherits(n,Y),r.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(var n=0;n>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e,t){for(var r="",n=0;n>>0}return o}function f(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function l(e,t){return e>>>t|e<<32-t}function h(e,t){return e<>>32-t}function d(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function b(e,t,r,n){return e+t+r+n>>>0}function v(e,t,r,n,i){return e+t+r+n+i>>>0}function y(e,t){if(!e)throw new Error(t||"Assertion failed")}function g(e,t,r,n){var i=e[t],o=e[t+1],a=n+o>>>0,s=(a>>0,e[t+1]=a}function _(e,t,r,n){return(t+n>>>0>>0}function m(e,t,r,n){return t+n>>>0}function w(e,t,r,n,i,o,a,s){var u=0,c=t;return c=c+n>>>0,u+=c>>0,u+=c>>0,u+=c>>0}function x(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function S(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return l=l+n>>>0,f+=l>>0,f+=l>>0,f+=l>>0,f+=l>>0}function k(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0}function E(e,t,r){return(t<<32-r|e>>>r)>>>0}function j(e,t,r){return(e<<32-r|t>>>r)>>>0}function A(e,t,r){return e>>>r}function M(e,t,r){return(e<<32-r|t>>>r)>>>0}var C=r,O=e("inherits");C.toArray=n,C.toHex=i,C.htonl=o,C.toHex32=a,C.zero2=s,C.zero8=u,C.join32=c,C.split32=f,C.rotr32=l,C.rotl32=h,C.sum32=d,C.sum32_3=p,C.sum32_4=b,C.sum32_5=v,C.assert=y,C.inherits=O,r.sum64=g,r.sum64_hi=_,r.sum64_lo=m,r.sum64_4_hi=w,r.sum64_4_lo=x,r.sum64_5_hi=S,r.sum64_5_lo=k,r.rotr64_hi=E,r.rotr64_lo=j,r.shr64_hi=A,r.shr64_lo=M},{inherits:161}],158:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),i=o.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var i=e("hash.js"),o=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");t.exports=n,n.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},n.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=o.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8); -e[r+d-p]|=128*b}},{}],160:[function(e,t,r){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r>(-2*a&6)):0)i=o.indexOf(i);return u}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||i},{}],165:[function(e,t,r){function n(e){return decodeURIComponent(i(e).replace(/(.)/g,function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}var i=e("./atob");t.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return n(t)}catch(e){return i(t)}}},{"./atob":164}],166:[function(e,t,r){"use strict";function n(e){this.message=e}var i=e("./base64_url_decode");n.prototype=new Error,n.prototype.name="InvalidTokenError",t.exports=function(e,t){if("string"!=typeof e)throw new n("Invalid token specified");t=t||{};var r=t.header===!0?0:1;try{return JSON.parse(i(e.split(".")[r]))}catch(e){throw new n("Invalid token specified: "+e.message)}},t.exports.InvalidTokenError=n},{"./base64_url_decode":165}],167:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),o=n(i,"DataView");t.exports=o},{"./_getNative":269,"./_root":314}],168:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":212}],186:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n=f&&(h=c,d=!1,t=new i(t));e:for(;++l0&&r(f)?t>1?n(f,t-1,r,a,s):i(s,f):a||(s[s.length]=f)}return s}var i=e("./_arrayPush"),o=e("./_isFlattenable");t.exports=n},{"./_arrayPush":189,"./_isFlattenable":286}],206:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":256}],207:[function(e,t,r){function n(e,t){return e&&i(e,t,o)}var i=e("./_baseFor"),o=e("./keys");t.exports=n},{"./_baseFor":206,"./keys":366}],208:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r=f){var v=t?null:u(e);if(v)return c(v);d=!1,l=s,b=new i}else b=t?[]:p;e:for(;++n1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1?s[u?t[c]:c]:void 0}}var i=e("./_baseIteratee"),o=e("./isArrayLike"),a=e("./keys");t.exports=n},{"./_baseIteratee":221,"./isArrayLike":351,"./keys":366}],258:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),o=e("./_setToArray"),a=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":173,"./_setToArray":317,"./noop":373}],259:[function(e,t,r){function n(e,t,r,n){return void 0===e||i(e,o[r])&&!a.call(n,r)?t:e}var i=e("./eq"),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},{"./eq":338}],260:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":269}],261:[function(e,t,r){function n(e,t,r,n,c,f){var l=r&s,h=e.length,d=t.length;if(h!=d&&!(l&&d>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var b=-1,v=!0,y=r&u?new i:void 0;for(f.set(e,t),f.set(t,e);++b-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":194}],298:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":194}],299:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}var i=e("./_Hash"),o=e("./_ListCache"),a=e("./_Map");t.exports=n},{"./_Hash":168,"./_ListCache":169,"./_Map":170}],300:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":267}],301:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":267}],302:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":267}],303:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":267}],304:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],305:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],306:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===o&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),o=500;t.exports=n},{"./memoize":371}],307:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":269}],308:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":312}],309:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],310:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&n.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=u},{"./_freeGlobal":264}],311:[function(e,t,r){function n(e){return o.call(e)}var i=Object.prototype,o=i.toString;t.exports=n},{}],312:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],313:[function(e,t,r){function n(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,s=o(n.length-t,0),u=Array(s);++a0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;t.exports=n},{}],320:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":169}],321:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],322:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],323:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],324:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!o||n.length0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var i=e("./toInteger"),o="Expected a function";t.exports=n},{"./toInteger":386}],334:[function(e,t,r){function n(e){return i(e,o|a)}var i=e("./_baseClone"),o=1,a=4;t.exports=n},{"./_baseClone":199}],335:[function(e,t,r){function n(e){return function(){return e}}t.exports=n},{}],336:[function(e,t,r){function n(e,t,r){function n(t){var r=g,n=_;return g=_=void 0,k=t,w=e.apply(n,r)}function f(e){return k=e,x=setTimeout(d,t),E?n(e):w}function l(e){var r=e-S,n=e-k,i=t-r;return j?c(i,m-n):i}function h(e){var r=e-S,n=e-k;return void 0===S||r>=t||r<0||j&&n>=m}function d(){var e=o();if(h(e))return p(e);x=setTimeout(d,l(e))}function p(e){return x=void 0,A&&g?n(e):(g=_=void 0,w)}function b(){void 0!==x&&clearTimeout(x),k=0,g=S=_=x=void 0}function v(){return void 0===x?w:p(o())}function y(){var e=o(),r=h(e);if(g=arguments,_=this,S=e,r){if(void 0===x)return f(S);if(j)return x=setTimeout(d,t),n(S)}return void 0===x&&(x=setTimeout(d,t)),w}var g,_,m,w,x,S,k=0,E=!1,j=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return t=a(t)||0,i(r)&&(E=!!r.leading,j="maxWait"in r,m=j?u(a(r.maxWait)||0,t):m,A="trailing"in r?!!r.trailing:A),y.cancel=b,y.flush=v,y}var i=e("./isObject"),o=e("./now"),a=e("./toNumber"),s="Expected a function",u=Math.max,c=Math.min;t.exports=n},{"./isObject":361,"./now":374,"./toNumber":387}],337:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),o=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),s=o(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=s},{"./_apply":181,"./_baseRest":229,"./_customDefaultsAssignIn":259,"./assignInWith":332}],338:[function(e,t,r){function n(e,t){return e===t||e!==e&&t!==t}t.exports=n},{}],339:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,a(t,3))}var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),s=e("./isArray");t.exports=n},{"./_arrayFilter":184,"./_baseFilter":203,"./_baseIteratee":221,"./isArray":350}],340:[function(e,t,r){var n=e("./_createFind"),i=e("./findIndex"),o=n(i);t.exports=o},{"./_createFind":257,"./findIndex":341}],341:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=s(n+u,0)),i(e,o(t,3),u)}var i=e("./_baseFindIndex"),o=e("./_baseIteratee"),a=e("./toInteger"),s=Math.max;t.exports=n},{"./_baseFindIndex":204,"./_baseIteratee":221,"./toInteger":386}],342:[function(e,t,r){function n(e){return(null==e?0:e.length)?i(e,1):[]}var i=e("./_baseFlatten");t.exports=n},{"./_baseFlatten":205}],343:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,a(t))}var i=e("./_arrayEach"),o=e("./_baseEach"),a=e("./_castFunction"),s=e("./isArray");t.exports=n},{"./_arrayEach":183,"./_baseEach":202,"./_castFunction":238,"./isArray":350}],344:[function(e,t,r){function n(e){for(var t=-1,r=null==e?0:e.length,n={};++t-1:!!f&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),o=e("./isArrayLike"),a=e("./isString"),s=e("./toInteger"),u=e("./values"),c=Math.max;t.exports=n},{"./_baseIndexOf":212,"./isArrayLike":351,"./isString":363,"./toInteger":386,"./values":390}],349:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":213,"./isObjectLike":362}],350:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],351:[function(e,t,r){function n(e){return null!=e&&o(e.length)&&!i(e)}var i=e("./isFunction"),o=e("./isLength");t.exports=n},{"./isFunction":358,"./isLength":359}],352:[function(e,t,r){function n(e){return o(e)&&i(e)}var i=e("./isArrayLike"),o=e("./isObjectLike");t.exports=n},{"./isArrayLike":351,"./isObjectLike":362}],353:[function(e,t,r){function n(e){return e===!0||e===!1||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Boolean]";t.exports=n},{"./_baseGetTag":210,"./isObjectLike":362}],354:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),o="object"==typeof r&&r&&!r.nodeType&&r,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||i;t.exports=f},{"./_root":314,"./stubFalse":383}],355:[function(e,t,r){var n=e("./_baseIsDate"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isDate,s=a?i(a):n;t.exports=s},{"./_baseIsDate":214,"./_baseUnary":234,"./_nodeUtil":310}],356:[function(e,t,r){function n(e){if(null==e)return!0;if(u(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||a(e)))return!e.length;var t=o(e);if(t==h||t==d)return!e.size;if(f(e))return!i(e).length;for(var r in e)if(b.call(e,r))return!1;return!0}var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArguments"),s=e("./isArray"),u=e("./isArrayLike"),c=e("./isBuffer"),f=e("./_isPrototype"),l=e("./isTypedArray"),h="[object Map]",d="[object Set]",p=Object.prototype,b=p.hasOwnProperty;t.exports=n},{"./_baseKeys":222,"./_getTag":274,"./_isPrototype":292,"./isArguments":349,"./isArray":350,"./isArrayLike":351,"./isBuffer":354,"./isTypedArray":365}],357:[function(e,t,r){function n(e){return"number"==typeof e&&o(e)}var i=e("./_root"),o=i.isFinite;t.exports=n},{"./_root":314}],358:[function(e,t,r){function n(e){if(!o(e))return!1;var t=i(e);return t==s||t==u||t==a||t==c}var i=e("./_baseGetTag"),o=e("./isObject"),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=n},{"./_baseGetTag":210,"./isObject":361}],359:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],360:[function(e,t,r){function n(e){return"number"==typeof e||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Number]";t.exports=n},{"./_baseGetTag":210,"./isObjectLike":362}],361:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],362:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],363:[function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&i(e)==s}var i=e("./_baseGetTag"),o=e("./isArray"),a=e("./isObjectLike"),s="[object String]";t.exports=n},{"./_baseGetTag":210,"./isArray":350,"./isObjectLike":362}],364:[function(e,t,r){function n(e){return"symbol"==typeof e||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Symbol]";t.exports=n},{"./_baseGetTag":210,"./isObjectLike":362}],365:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},{"./_baseIsTypedArray":220,"./_baseUnary":234,"./_nodeUtil":310}],366:[function(e,t,r){function n(e){return a(e)?i(e):o(e)}var i=e("./_arrayLikeKeys"),o=e("./_baseKeys"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":187,"./_baseKeys":222,"./isArrayLike":351}],367:[function(e,t,r){function n(e){return a(e)?i(e,!0):o(e)}var i=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":187,"./_baseKeysIn":223,"./isArrayLike":351}],368:[function(e,t,r){(function(e){(function(){function n(e,t){return e.set(t[0],t[1]),e}function i(e,t){return e.add(t),e}function o(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function a(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function h(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function N(e,t){for(var r=e.length;r--&&x(t,e[r],0)>-1;);return r}function L(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function F(e){return"\\"+_r[e]}function U(e,t){return null==e?re:e[t]}function z(e){return fr.test(e)}function q(e){return lr.test(e)}function K(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function H(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function G(e,t){return function(r){return e(t(r))}}function V(e,t){for(var r=-1,n=e.length,i=0,o=[];++r>>1,Ne=[["ary",we],["bind",pe],["bindKey",be],["curry",ye],["curryRight",ge],["flip",Se],["partial",_e],["partialRight",me],["rearg",xe]],Le="[object Arguments]",Fe="[object Array]",Ue="[object AsyncFunction]",ze="[object Boolean]",qe="[object Date]",Ke="[object DOMException]",He="[object Error]",Ge="[object Function]",Ve="[object GeneratorFunction]",Ye="[object Map]",We="[object Number]",$e="[object Null]",Xe="[object Object]",Ze="[object Proxy]",Je="[object RegExp]",Qe="[object Set]",et="[object String]",tt="[object Symbol]",rt="[object Undefined]",nt="[object WeakMap]",it="[object WeakSet]",ot="[object ArrayBuffer]",at="[object DataView]",st="[object Float32Array]",ut="[object Float64Array]",ct="[object Int8Array]",ft="[object Int16Array]",lt="[object Int32Array]",ht="[object Uint8Array]",dt="[object Uint8ClampedArray]",pt="[object Uint16Array]",bt="[object Uint32Array]",vt=/\b__p \+= '';/g,yt=/\b(__p \+=) '' \+/g,gt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,mt=/[&<>"']/g,wt=RegExp(_t.source),xt=RegExp(mt.source),St=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Et=/^\w*$/,jt=/^\./,At=/[\\^$.*+?()[\]{}|]/g,Mt=RegExp(At.source),Ct=/^\s+|\s+$/g,Ot=/^\s+/,Tt=/\s+$/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,It=/\{\n\/\* \[wrapped with (.+)\] \*/,Pt=/,? & /,Dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Lt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Ut=/^\[object .+?Constructor\]$/,zt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Gt=/['\n\r\u2028\u2029\\]/g,Vt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Yt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Wt="["+Vt+"]",$t="[a-z\\xdf-\\xf6\\xf8-\\xff]",Xt="[^\\ud800-\\udfff"+Yt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Zt="\\ud83c[\\udffb-\\udfff]",Jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Qt="[\\ud800-\\udbff][\\udc00-\\udfff]",er="[A-Z\\xc0-\\xd6\\xd8-\\xde]",tr="(?:"+Wt+"|"+Zt+")?",rr="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Jt,Qt].join("|")+")[\\ufe0e\\ufe0f]?"+tr+")*",nr="[\\ufe0e\\ufe0f]?"+tr+rr,ir="(?:"+["[\\u2700-\\u27bf]",Jt,Qt].join("|")+")"+nr,or="(?:"+["[^\\ud800-\\udfff]"+Wt+"?",Wt,Jt,Qt,"[\\ud800-\\udfff]"].join("|")+")",ar=RegExp("['’]","g"),sr=RegExp(Wt,"g"),ur=RegExp(Zt+"(?="+Zt+")|"+or+nr,"g"),cr=RegExp([er+"?"+$t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+["["+Yt+"]",er,"$"].join("|")+")","(?:"+er+"|"+Xt+")+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+["["+Yt+"]",er+"(?:"+$t+"|"+Xt+")","$"].join("|")+")",er+"?(?:"+$t+"|"+Xt+")+(?:['’](?:d|ll|m|re|s|t|ve))?",er+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",ir].join("|"),"g"),fr=RegExp("[\\u200d\\ud800-\\udfff"+Vt+"\\ufe0e\\ufe0f]"),lr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],dr=-1,pr={};pr[st]=pr[ut]=pr[ct]=pr[ft]=pr[lt]=pr[ht]=pr[dt]=pr[pt]=pr[bt]=!0,pr[Le]=pr[Fe]=pr[ot]=pr[ze]=pr[at]=pr[qe]=pr[He]=pr[Ge]=pr[Ye]=pr[We]=pr[Xe]=pr[Je]=pr[Qe]=pr[et]=pr[nt]=!1;var br={};br[Le]=br[Fe]=br[ot]=br[at]=br[ze]=br[qe]=br[st]=br[ut]=br[ct]=br[ft]=br[lt]=br[Ye]=br[We]=br[Xe]=br[Je]=br[Qe]=br[et]=br[tt]=br[ht]=br[dt]=br[pt]=br[bt]=!0,br[He]=br[Ge]=br[nt]=!1;var vr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},yr={"&":"&","<":"<",">":">",'"':""","'":"'"},gr={"&":"&","<":"<",">":">",""":'"',"'":"'"},_r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mr=parseFloat,wr=parseInt,xr="object"==typeof e&&e&&e.Object===Object&&e,Sr="object"==typeof self&&self&&self.Object===Object&&self,kr=xr||Sr||Function("return this")(),Er="object"==typeof r&&r&&!r.nodeType&&r,jr=Er&&"object"==typeof t&&t&&!t.nodeType&&t,Ar=jr&&jr.exports===Er,Mr=Ar&&xr.process,Cr=function(){try{return Mr&&Mr.binding&&Mr.binding("util")}catch(e){}}(),Or=Cr&&Cr.isArrayBuffer,Tr=Cr&&Cr.isDate,Rr=Cr&&Cr.isMap,Ir=Cr&&Cr.isRegExp,Pr=Cr&&Cr.isSet,Dr=Cr&&Cr.isTypedArray,Br=j("length"),Nr=A(vr),Lr=A(yr),Fr=A(gr),Ur=function e(t){function r(e){if(tu(e)&&!dh(e)&&!(e instanceof $)){if(e instanceof A)return e;if(df.call(e,"__wrapped__"))return Jo(e)}return new A(e)}function g(){}function A(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=re}function $(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Pe,this.__views__=[]}function Q(){var e=new $(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e}function ee(){if(this.__filtered__){var e=new $(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Dt(){var e=this.__wrapped__.value(),t=this.__dir__,r=dh(e),n=t<0,i=r?e.length:0,o=So(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,f=this.__iteratees__,l=f.length,h=0,d=Kf(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&h-1}function nr(e,t){var r=this.__data__,n=Gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ir(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Jr(e,t,r,n,i,o){var a,u=t&ce,c=t&fe,f=t≤if(r&&(a=i?r(e,n,i,o):r(e)),a!==re)return a;if(!eu(e))return e;var l=dh(e);if(l){if(a=jo(e),!u)return Ii(e,a)}else{var h=Sl(e),d=h==Ge||h==Ve;if(bh(e))return wi(e,u);if(h==Xe||h==Le||d&&!i){if(a=c||d?{}:Ao(e),!u)return c?Bi(e,Wr(a,e)):Di(e,Yr(a,e))}else{if(!br[h])return i?e:{};a=Mo(e,h,Jr,u)}}o||(o=new _r);var p=o.get(e);if(p)return p;o.set(e,a);var b=f?c?bo:po:c?Nu:Bu,v=l?re:b(e);return s(v||e,function(n,i){v&&(i=n,n=e[i]),Hr(a,i,Jr(n,t,r,i,e,o))}),a}function Qr(e){var t=Bu(e);return function(r){return en(r,e,t)}}function en(e,t,r){var n=r.length;if(null==e)return!n;for(e=nf(e);n--;){var i=r[n],o=t[i],a=e[i];if(a===re&&!(i in e)||!o(a))return!1}return!0}function tn(e,t,r){if("function"!=typeof e)throw new sf(oe);return jl(function(){e.apply(re,r)},t)}function rn(e,t,r,n){var i=-1,o=l,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=d(t,I(r))),n?(o=h,a=!1):t.length>=ne&&(o=D,a=!1,t=new vr(t));e:for(;++ii?0:i+r),n=n===re||n>i?i:gu(n),n<0&&(n+=i),n=r>n?0:_u(n);r0&&r(s)?t>1?un(s,t-1,r,n,i):p(i,s):n||(i[i.length]=s)}return i}function cn(e,t){return e&&dl(e,t,Bu)}function fn(e,t){return e&&pl(e,t,Bu)}function ln(e,t){return f(t,function(t){return Zs(e[t])})}function hn(e,t){t=_i(t,e);for(var r=0,n=t.length;null!=e&&rt}function vn(e,t){return null!=e&&df.call(e,t)}function yn(e,t){return null!=e&&t in nf(e)}function gn(e,t,r){return e>=Kf(t,r)&&e=120&&f.length>=120)?new vr(a&&f):re}f=e[0];var p=-1,b=s[0];e:for(;++p-1;)s!==e&&Af.call(s,u,1),Af.call(e,u,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;To(i)?Af.call(e,i,1):li(e,i)}}return e}function $n(e,t){return e+Bf(Vf()*(t-e+1))}function Xn(e,t,r,n){for(var i=-1,o=qf(Df((t-e)/(r||1)),0),a=Jc(o);o--;)a[n?o:++i]=e,e+=r;return a}function Zn(e,t){var r="";if(!e||t<1||t>Te)return r;do{t%2&&(r+=e),(t=Bf(t/2))&&(e+=e)}while(t);return r}function Jn(e,t){return Al(Ko(e,t,jc),e+"")}function Qn(e){return Br($u(e))}function ei(e,t){var r=$u(e);return Wo(r,Zr(t,0,r.length))}function ti(e,t,r,n){if(!eu(e))return e;t=_i(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Jc(i);++n>>1,a=e[o];null!==a&&!hu(a)&&(r?a<=t:a=ne){var c=t?null:_l(e);if(c)return Y(c);a=!1,i=D,u=new vr}else u=t?[]:s;e:for(;++n=n?e:ni(e,t,r)}function wi(e,t){if(t)return e.slice();var r=e.length,n=Sf?Sf(r):new e.constructor(r);return e.copy(n),n}function xi(e){var t=new e.constructor(e.byteLength);return new xf(t).set(new xf(e)),t}function Si(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function ki(e,t,r){return b(t?r(H(e),ce):H(e),n,new e.constructor)}function Ei(e){var t=new e.constructor(e.source,Nt.exec(e));return t.lastIndex=e.lastIndex,t}function ji(e,t,r){return b(t?r(Y(e),ce):Y(e),i,new e.constructor)}function Ai(e){return ul?nf(ul.call(e)):{}}function Mi(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var r=e!==re,n=null===e,i=e===e,o=hu(e),a=t!==re,s=null===t,u=t===t,c=hu(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!i)return 1;if(!n&&!o&&!c&&e=s)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}function Ti(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,u=t.length,c=qf(o-a,0),f=Jc(u+c),l=!n;++s1?r[i-1]:re,a=i>2?r[2]:re;for(o=e.length>3&&"function"==typeof o?(i--,o):re,a&&Ro(r[0],r[1],a)&&(o=i<3?re:o,i=1),t=nf(t);++n-1?i[o?t[a]:a]:re}}function Yi(e){return ho(function(t){var r=t.length,n=r,i=A.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new sf(oe);if(i&&!a&&"wrapper"==vo(o))var a=new A([],!0)}for(n=a?n:r;++n1&&g.reverse(),l&&us))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var f=-1,l=!0,h=r&de?new vr:re;for(o.set(e,t),o.set(t,e);++f1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Rt,"{\n/* [wrapped with "+t+"] */\n")}function Oo(e){return dh(e)||hh(e)||!!(Mf&&e&&e[Mf])}function To(e,t){return!!(t=null==t?Te:t)&&("number"==typeof e||qt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=je)return arguments[0]}else t=0;return e.apply(re,arguments)}}function Wo(e,t){var r=-1,n=e.length,i=n-1;for(t=t===re?n:t;++r=this.__values__.length;return{done:e,value:e?re:this.__values__[this.__index__++]}}function Ja(){return this}function Qa(e){for(var t,r=this;r instanceof g;){var n=Jo(r);n.__index__=0,n.__values__=re,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t}function es(){var e=this.__wrapped__;if(e instanceof $){var t=e;return this.__actions__.length&&(t=new $(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ka],thisArg:re}),new A(t,this.__chain__)}return this.thru(ka)}function ts(){return pi(this.__wrapped__,this.__actions__)}function rs(e,t,r){var n=dh(e)?c:nn;return r&&Ro(e,t,r)&&(t=re),n(e,go(t,3))}function ns(e,t){return(dh(e)?f:sn)(e,go(t,3))}function is(e,t){return un(fs(e,t),1)}function os(e,t){return un(fs(e,t),Oe)}function as(e,t,r){return r=r===re?1:gu(r),un(fs(e,t),r)}function ss(e,t){return(dh(e)?s:ll)(e,go(t,3))}function us(e,t){return(dh(e)?u:hl)(e,go(t,3))}function cs(e,t,r,n){e=qs(e)?e:$u(e),r=r&&!n?gu(r):0;var i=e.length;return r<0&&(r=qf(i+r,0)),lu(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&x(e,t,r)>-1}function fs(e,t){return(dh(e)?d:Nn)(e,go(t,3))}function ls(e,t,r,n){return null==e?[]:(dh(t)||(t=null==t?[]:[t]),r=n?re:r,dh(r)||(r=null==r?[]:[r]),Kn(e,t,r))}function hs(e,t,r){var n=dh(e)?b:M,i=arguments.length<3;return n(e,go(t,4),r,i,ll)}function ds(e,t,r){var n=dh(e)?v:M,i=arguments.length<3;return n(e,go(t,4),r,i,hl)}function ps(e,t){return(dh(e)?f:sn)(e,Ms(go(t,3)))}function bs(e){return(dh(e)?Br:Qn)(e)}function vs(e,t,r){return t=(r?Ro(e,t,r):t===re)?1:gu(t),(dh(e)?zr:ei)(e,t)}function ys(e){return(dh(e)?qr:ri)(e)}function gs(e){if(null==e)return 0;if(qs(e))return lu(e)?Z(e):e.length;var t=Sl(e);return t==Ye||t==Qe?e.size:Pn(e).length}function _s(e,t,r){var n=dh(e)?y:ii;return r&&Ro(e,t,r)&&(t=re),n(e,go(t,3))}function ms(e,t){if("function"!=typeof t)throw new sf(oe);return e=gu(e),function(){if(--e<1)return t.apply(this,arguments)}}function ws(e,t,r){return t=r?re:t,t=e&&null==t?e.length:t,oo(e,we,re,re,re,re,t)}function xs(e,t){var r;if("function"!=typeof t)throw new sf(oe);return e=gu(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=re),r}}function Ss(e,t,r){t=r?re:t;var n=oo(e,ye,re,re,re,re,re,t);return n.placeholder=Ss.placeholder,n}function ks(e,t,r){t=r?re:t;var n=oo(e,ge,re,re,re,re,re,t);return n.placeholder=ks.placeholder,n}function Es(e,t,r){function n(t){var r=h,n=d;return h=d=re,g=t,b=e.apply(n,r)}function i(e){return g=e,v=jl(s,t),_?n(e):b}function o(e){var r=e-y,n=e-g,i=t-r;return m?Kf(i,p-n):i}function a(e){var r=e-y,n=e-g;return y===re||r>=t||r<0||m&&n>=p}function s(){var e=th();if(a(e))return u(e);v=jl(s,o(e))}function u(e){return v=re,w&&h?n(e):(h=d=re,b)}function c(){v!==re&&gl(v),g=0,h=y=d=v=re}function f(){return v===re?b:u(th())}function l(){var e=th(),r=a(e);if(h=arguments,d=this,y=e,r){if(v===re)return i(y);if(m)return v=jl(s,t),n(y)}return v===re&&(v=jl(s,t)),b}var h,d,p,b,v,y,g=0,_=!1,m=!1,w=!0;if("function"!=typeof e)throw new sf(oe);return t=mu(t)||0,eu(r)&&(_=!!r.leading,m="maxWait"in r,p=m?qf(mu(r.maxWait)||0,t):p,w="trailing"in r?!!r.trailing:w),l.cancel=c,l.flush=f,l}function js(e){return oo(e,Se)}function As(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new sf(oe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(As.Cache||ir),r}function Ms(e){if("function"!=typeof e)throw new sf(oe);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Cs(e){return xs(2,e)}function Os(e,t){if("function"!=typeof e)throw new sf(oe);return t=t===re?t:gu(t),Jn(e,t)}function Ts(e,t){if("function"!=typeof e)throw new sf(oe);return t=null==t?0:qf(gu(t),0),Jn(function(r){var n=r[t],i=mi(r,0,t);return n&&p(i,n),o(e,this,i)})}function Rs(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new sf(oe);return eu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Es(e,t,{leading:n,maxWait:t,trailing:i})}function Is(e){return ws(e,1)}function Ps(e,t){return sh(gi(t),e)}function Ds(){if(!arguments.length)return[];var e=arguments[0];return dh(e)?e:[e]}function Bs(e){return Jr(e,le)}function Ns(e,t){return t="function"==typeof t?t:re,Jr(e,le,t)}function Ls(e){return Jr(e,ce|le)}function Fs(e,t){return t="function"==typeof t?t:re,Jr(e,ce|le,t)}function Us(e,t){return null==t||en(e,t,Bu(t))}function zs(e,t){return e===t||e!==e&&t!==t}function qs(e){return null!=e&&Qs(e.length)&&!Zs(e)}function Ks(e){return tu(e)&&qs(e)}function Hs(e){return e===!0||e===!1||tu(e)&&pn(e)==ze}function Gs(e){return tu(e)&&1===e.nodeType&&!cu(e)}function Vs(e){if(null==e)return!0;if(qs(e)&&(dh(e)||"string"==typeof e||"function"==typeof e.splice||bh(e)||mh(e)||hh(e)))return!e.length;var t=Sl(e);if(t==Ye||t==Qe)return!e.size;if(No(e))return!Pn(e).length;for(var r in e)if(df.call(e,r))return!1;return!0}function Ys(e,t){return En(e,t)}function Ws(e,t,r){r="function"==typeof r?r:re;var n=r?r(e,t):re;return n===re?En(e,t,re,r):!!n}function $s(e){if(!tu(e))return!1;var t=pn(e);return t==He||t==Ke||"string"==typeof e.message&&"string"==typeof e.name&&!cu(e)}function Xs(e){return"number"==typeof e&&Ff(e)}function Zs(e){if(!eu(e))return!1;var t=pn(e);return t==Ge||t==Ve||t==Ue||t==Ze}function Js(e){return"number"==typeof e&&e==gu(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Te}function eu(e){var t=typeof e -;return null!=e&&("object"==t||"function"==t)}function tu(e){return null!=e&&"object"==typeof e}function ru(e,t){return e===t||Mn(e,t,mo(t))}function nu(e,t,r){return r="function"==typeof r?r:re,Mn(e,t,mo(t),r)}function iu(e){return uu(e)&&e!=+e}function ou(e){if(kl(e))throw new ef(ie);return Cn(e)}function au(e){return null===e}function su(e){return null==e}function uu(e){return"number"==typeof e||tu(e)&&pn(e)==We}function cu(e){if(!tu(e)||pn(e)!=Xe)return!1;var t=kf(e);if(null===t)return!0;var r=df.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&hf.call(r)==yf}function fu(e){return Js(e)&&e>=-Te&&e<=Te}function lu(e){return"string"==typeof e||!dh(e)&&tu(e)&&pn(e)==et}function hu(e){return"symbol"==typeof e||tu(e)&&pn(e)==tt}function du(e){return e===re}function pu(e){return tu(e)&&Sl(e)==nt}function bu(e){return tu(e)&&pn(e)==it}function vu(e){if(!e)return[];if(qs(e))return lu(e)?J(e):Ii(e);if(Cf&&e[Cf])return K(e[Cf]());var t=Sl(e);return(t==Ye?H:t==Qe?Y:$u)(e)}function yu(e){if(!e)return 0===e?e:0;if((e=mu(e))===Oe||e===-Oe){return(e<0?-1:1)*Re}return e===e?e:0}function gu(e){var t=yu(e),r=t%1;return t===t?r?t-r:t:0}function _u(e){return e?Zr(gu(e),0,Pe):0}function mu(e){if("number"==typeof e)return e;if(hu(e))return Ie;if(eu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ct,"");var r=Ft.test(e);return r||zt.test(e)?wr(e.slice(2),r?2:8):Lt.test(e)?Ie:+e}function wu(e){return Pi(e,Nu(e))}function xu(e){return e?Zr(gu(e),-Te,Te):0===e?e:0}function Su(e){return null==e?"":ci(e)}function ku(e,t){var r=fl(e);return null==t?r:Yr(r,t)}function Eu(e,t){return m(e,go(t,3),cn)}function ju(e,t){return m(e,go(t,3),fn)}function Au(e,t){return null==e?e:dl(e,go(t,3),Nu)}function Mu(e,t){return null==e?e:pl(e,go(t,3),Nu)}function Cu(e,t){return e&&cn(e,go(t,3))}function Ou(e,t){return e&&fn(e,go(t,3))}function Tu(e){return null==e?[]:ln(e,Bu(e))}function Ru(e){return null==e?[]:ln(e,Nu(e))}function Iu(e,t,r){var n=null==e?re:hn(e,t);return n===re?r:n}function Pu(e,t){return null!=e&&Eo(e,t,vn)}function Du(e,t){return null!=e&&Eo(e,t,yn)}function Bu(e){return qs(e)?Cr(e):Pn(e)}function Nu(e){return qs(e)?Cr(e,!0):Dn(e)}function Lu(e,t){var r={};return t=go(t,3),cn(e,function(e,n,i){$r(r,t(e,n,i),e)}),r}function Fu(e,t){var r={};return t=go(t,3),cn(e,function(e,n,i){$r(r,n,t(e,n,i))}),r}function Uu(e,t){return zu(e,Ms(go(t)))}function zu(e,t){if(null==e)return{};var r=d(bo(e),function(e){return[e]});return t=go(t),Gn(e,r,function(e,r){return t(e,r[0])})}function qu(e,t,r){t=_i(t,e);var n=-1,i=t.length;for(i||(i=1,e=re);++nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=Vf();return Kf(e+i*(t-e+mr("1e-"+((i+"").length-1))),t)}return $n(e,t)}function ec(e){return Vh(Su(e).toLowerCase())}function tc(e){return(e=Su(e))&&e.replace(Kt,Nr).replace(sr,"")}function rc(e,t,r){e=Su(e),t=ci(t);var n=e.length;r=r===re?n:Zr(gu(r),0,n);var i=r;return(r-=t.length)>=0&&e.slice(r,i)==t}function nc(e){return e=Su(e),e&&xt.test(e)?e.replace(mt,Lr):e}function ic(e){return e=Su(e),e&&Mt.test(e)?e.replace(At,"\\$&"):e}function oc(e,t,r){e=Su(e),t=gu(t);var n=t?Z(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ji(Bf(i),r)+e+Ji(Df(i),r)}function ac(e,t,r){e=Su(e),t=gu(t);var n=t?Z(e):0;return t&&n>>0)?(e=Su(e),e&&("string"==typeof t||null!=t&&!gh(t))&&!(t=ci(t))&&z(e)?mi(J(e),0,r):e.split(t,r)):[]}function hc(e,t,r){return e=Su(e),r=null==r?0:Zr(gu(r),0,e.length),t=ci(t),e.slice(r,r+t.length)==t}function dc(e,t,n){var i=r.templateSettings;n&&Ro(e,t,n)&&(t=re),e=Su(e),t=Eh({},t,i,ao);var o,a,s=Eh({},t.imports,i.imports,ao),u=Bu(s),c=P(s,u),f=0,l=t.interpolate||Ht,h="__p += '",d=of((t.escape||Ht).source+"|"+l.source+"|"+(l===St?Bt:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++dr+"]")+"\n";e.replace(d,function(t,r,n,i,s,u){return n||(n=i),h+=e.slice(f,u).replace(Gt,F),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=u+t.length,t}),h+="';\n";var b=t.variable;b||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(vt,""):h).replace(yt,"$1").replace(gt,"$1;"),h="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Yh(function(){return tf(u,p+"return "+h).apply(re,c)});if(v.source=h,$s(v))throw v;return v}function pc(e){return Su(e).toLowerCase()}function bc(e){return Su(e).toUpperCase()}function vc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Ct,"");if(!e||!(t=ci(t)))return e;var n=J(e),i=J(t);return mi(n,B(n,i),N(n,i)+1).join("")}function yc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Tt,"");if(!e||!(t=ci(t)))return e;var n=J(e);return mi(n,0,N(n,J(t))+1).join("")}function gc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Ot,"");if(!e||!(t=ci(t)))return e;var n=J(e);return mi(n,B(n,J(t))).join("")}function _c(e,t){var r=ke,n=Ee;if(eu(t)){var i="separator"in t?t.separator:i;r="length"in t?gu(t.length):r,n="omission"in t?ci(t.omission):n}e=Su(e);var o=e.length;if(z(e)){var a=J(e);o=a.length}if(r>=o)return e;var s=r-Z(n);if(s<1)return n;var u=a?mi(a,0,s).join(""):e.slice(0,s);if(i===re)return u+n;if(a&&(s+=u.length-s),gh(i)){if(e.slice(s).search(i)){var c,f=u;for(i.global||(i=of(i.source,Su(Nt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var l=c.index;u=u.slice(0,l===re?s:l)}}else if(e.indexOf(ci(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+n}function mc(e){return e=Su(e),e&&wt.test(e)?e.replace(_t,Fr):e}function wc(e,t,r){return e=Su(e),t=r?re:t,t===re?q(e)?te(e):_(e):e.match(t)||[]}function xc(e){var t=null==e?0:e.length,r=go();return e=t?d(e,function(e){if("function"!=typeof e[1])throw new sf(oe);return[r(e[0]),e[1]]}):[],Jn(function(r){for(var n=-1;++nTe)return[];var r=Pe,n=Kf(e,Pe);t=go(t),e-=Pe;for(var i=T(n,t);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:St,variable:"",imports:{_:r}},r.prototype=g.prototype,r.prototype.constructor=r,A.prototype=fl(g.prototype),A.prototype.constructor=A,$.prototype=fl(g.prototype),$.prototype.constructor=$,Vt.prototype.clear=Yt,Vt.prototype.delete=Wt,Vt.prototype.get=$t,Vt.prototype.has=Xt,Vt.prototype.set=Zt,Jt.prototype.clear=Qt,Jt.prototype.delete=er,Jt.prototype.get=tr,Jt.prototype.has=rr,Jt.prototype.set=nr,ir.prototype.clear=or,ir.prototype.delete=ur,ir.prototype.get=cr,ir.prototype.has=fr,ir.prototype.set=lr,vr.prototype.add=vr.prototype.push=yr,vr.prototype.has=gr,_r.prototype.clear=xr,_r.prototype.delete=Sr,_r.prototype.get=Er,_r.prototype.has=jr,_r.prototype.set=Mr;var ll=Fi(cn),hl=Fi(fn,!0),dl=Ui(),pl=Ui(!0),bl=el?function(e,t){return el.set(e,t),e}:jc,vl=Tf?function(e,t){return Tf(e,"toString",{configurable:!0,enumerable:!1,value:kc(t),writable:!0})}:jc,yl=Jn,gl=Rf||function(e){return kr.clearTimeout(e)},_l=Zf&&1/Y(new Zf([,-0]))[1]==Oe?function(e){return new Zf(e)}:Rc,ml=el?function(e){return el.get(e)}:Rc,wl=Nf?function(e){return null==e?[]:(e=nf(e),f(Nf(e),function(t){return jf.call(e,t)}))}:Bc,xl=Nf?function(e){for(var t=[];e;)p(t,wl(e)),e=kf(e);return t}:Bc,Sl=pn;(Wf&&Sl(new Wf(new ArrayBuffer(1)))!=at||$f&&Sl(new $f)!=Ye||Xf&&"[object Promise]"!=Sl(Xf.resolve())||Zf&&Sl(new Zf)!=Qe||Jf&&Sl(new Jf)!=nt)&&(Sl=function(e){var t=pn(e),r=t==Xe?e.constructor:re,n=r?Xo(r):"";if(n)switch(n){case rl:return at;case nl:return Ye;case il:return"[object Promise]";case ol:return Qe;case al:return nt}return t});var kl=lf?Zs:Nc,El=Yo(bl),jl=Pf||function(e,t){return kr.setTimeout(e,t)},Al=Yo(vl),Ml=function(e){var t=As(e,function(e){return r.size===se&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return jt.test(e)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,r,n,i){t.push(n?i.replace(/\\(\\)?/g,"$1"):r||e)}),t}),Cl=Jn(function(e,t){return Ks(e)?rn(e,un(t,1,Ks,!0)):[]}),Ol=Jn(function(e,t){var r=ya(t);return Ks(r)&&(r=re),Ks(e)?rn(e,un(t,1,Ks,!0),go(r,2)):[]}),Tl=Jn(function(e,t){var r=ya(t);return Ks(r)&&(r=re),Ks(e)?rn(e,un(t,1,Ks,!0),re,r):[]}),Rl=Jn(function(e){var t=d(e,yi);return t.length&&t[0]===e[0]?_n(t):[]}),Il=Jn(function(e){var t=ya(e),r=d(e,yi);return t===ya(r)?t=re:r.pop(),r.length&&r[0]===e[0]?_n(r,go(t,2)):[]}),Pl=Jn(function(e){var t=ya(e),r=d(e,yi);return t="function"==typeof t?t:re,t&&r.pop(),r.length&&r[0]===e[0]?_n(r,re,t):[]}),Dl=Jn(ma),Bl=ho(function(e,t){var r=null==e?0:e.length,n=Xr(e,t);return Wn(e,d(t,function(e){return To(e,r)?+e:e}).sort(Ci)),n}),Nl=Jn(function(e){return fi(un(e,1,Ks,!0))}),Ll=Jn(function(e){var t=ya(e);return Ks(t)&&(t=re),fi(un(e,1,Ks,!0),go(t,2))}),Fl=Jn(function(e){var t=ya(e);return t="function"==typeof t?t:re,fi(un(e,1,Ks,!0),re,t)}),Ul=Jn(function(e,t){return Ks(e)?rn(e,t):[]}),zl=Jn(function(e){return bi(f(e,Ks))}),ql=Jn(function(e){var t=ya(e);return Ks(t)&&(t=re),bi(f(e,Ks),go(t,2))}),Kl=Jn(function(e){var t=ya(e);return t="function"==typeof t?t:re,bi(f(e,Ks),re,t)}),Hl=Jn(qa),Gl=Jn(function(e){var t=e.length,r=t>1?e[t-1]:re;return r="function"==typeof r?(e.pop(),r):re,Ka(e,r)}),Vl=ho(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return Xr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof $&&To(r)?(n=n.slice(r,+r+(t?1:0)),n.__actions__.push({func:Wa,args:[i],thisArg:re}),new A(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(re),e})):this.thru(i)}),Yl=Ni(function(e,t,r){df.call(e,r)?++e[r]:$r(e,r,1)}),Wl=Vi(sa),$l=Vi(ua),Xl=Ni(function(e,t,r){df.call(e,r)?e[r].push(t):$r(e,r,[t])}),Zl=Jn(function(e,t,r){var n=-1,i="function"==typeof t,a=qs(e)?Jc(e.length):[];return ll(e,function(e){a[++n]=i?o(t,e,r):wn(e,t,r)}),a}),Jl=Ni(function(e,t,r){$r(e,r,t)}),Ql=Ni(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),eh=Jn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ro(e,t[0],t[1])?t=[]:r>2&&Ro(t[0],t[1],t[2])&&(t=[t[0]]),Kn(e,un(t,1),[])}),th=If||function(){return kr.Date.now()},rh=Jn(function(e,t,r){var n=pe;if(r.length){var i=V(r,yo(rh));n|=_e}return oo(e,n,t,r,i)}),nh=Jn(function(e,t,r){var n=pe|be;if(r.length){var i=V(r,yo(nh));n|=_e}return oo(t,n,e,r,i)}),ih=Jn(function(e,t){return tn(e,1,t)}),oh=Jn(function(e,t,r){return tn(e,mu(t)||0,r)});As.Cache=ir;var ah=yl(function(e,t){t=1==t.length&&dh(t[0])?d(t[0],I(go())):d(un(t,1),I(go()));var r=t.length;return Jn(function(n){for(var i=-1,a=Kf(n.length,r);++i=t}),hh=xn(function(){return arguments}())?xn:function(e){return tu(e)&&df.call(e,"callee")&&!jf.call(e,"callee")},dh=Jc.isArray,ph=Or?I(Or):Sn,bh=Lf||Nc,vh=Tr?I(Tr):kn,yh=Rr?I(Rr):An,gh=Ir?I(Ir):On,_h=Pr?I(Pr):Tn,mh=Dr?I(Dr):Rn,wh=to(Bn),xh=to(function(e,t){return e<=t}),Sh=Li(function(e,t){if(No(t)||qs(t))return void Pi(t,Bu(t),e);for(var r in t)df.call(t,r)&&Hr(e,r,t[r])}),kh=Li(function(e,t){Pi(t,Nu(t),e)}),Eh=Li(function(e,t,r,n){Pi(t,Nu(t),e,n)}),jh=Li(function(e,t,r,n){Pi(t,Bu(t),e,n)}),Ah=ho(Xr),Mh=Jn(function(e){return e.push(re,ao),o(Eh,re,e)}),Ch=Jn(function(e){return e.push(re,so),o(Ph,re,e)}),Oh=$i(function(e,t,r){e[t]=r},kc(jc)),Th=$i(function(e,t,r){df.call(e,t)?e[t].push(r):e[t]=[r]},go),Rh=Jn(wn),Ih=Li(function(e,t,r){Un(e,t,r)}),Ph=Li(function(e,t,r,n){Un(e,t,r,n)}),Dh=ho(function(e,t){var r={};if(null==e)return r;var n=!1;t=d(t,function(t){return t=_i(t,e),n||(n=t.length>1),t}),Pi(e,bo(e),r),n&&(r=Jr(r,ce|fe|le,uo));for(var i=t.length;i--;)li(r,t[i]);return r}),Bh=ho(function(e,t){return null==e?{}:Hn(e,t)}),Nh=io(Bu),Lh=io(Nu),Fh=Ki(function(e,t,r){return t=t.toLowerCase(),e+(r?ec(t):t)}),Uh=Ki(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),zh=Ki(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),qh=qi("toLowerCase"),Kh=Ki(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),Hh=Ki(function(e,t,r){return e+(r?" ":"")+Vh(t)}),Gh=Ki(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Vh=qi("toUpperCase"),Yh=Jn(function(e,t){try{return o(e,re,t)}catch(e){return $s(e)?e:new ef(e)}}),Wh=ho(function(e,t){return s(t,function(t){t=$o(t),$r(e,t,rh(e[t],e))}),e}),$h=Yi(),Xh=Yi(!0),Zh=Jn(function(e,t){return function(r){return wn(r,e,t)}}),Jh=Jn(function(e,t){return function(r){return wn(e,r,t)}}),Qh=Zi(d),ed=Zi(c),td=Zi(y),rd=eo(),nd=eo(!0),id=Xi(function(e,t){return e+t},0),od=no("ceil"),ad=Xi(function(e,t){return e/t},1),sd=no("floor"),ud=Xi(function(e,t){return e*t},1),cd=no("round"),fd=Xi(function(e,t){return e-t},0);return r.after=ms,r.ary=ws,r.assign=Sh,r.assignIn=kh,r.assignInWith=Eh,r.assignWith=jh,r.at=Ah,r.before=xs,r.bind=rh,r.bindAll=Wh,r.bindKey=nh,r.castArray=Ds,r.chain=Va,r.chunk=Qo,r.compact=ea,r.concat=ta,r.cond=xc,r.conforms=Sc,r.constant=kc,r.countBy=Yl,r.create=ku,r.curry=Ss,r.curryRight=ks,r.debounce=Es,r.defaults=Mh,r.defaultsDeep=Ch,r.defer=ih,r.delay=oh,r.difference=Cl,r.differenceBy=Ol,r.differenceWith=Tl,r.drop=ra,r.dropRight=na,r.dropRightWhile=ia,r.dropWhile=oa,r.fill=aa,r.filter=ns,r.flatMap=is,r.flatMapDeep=os,r.flatMapDepth=as,r.flatten=ca,r.flattenDeep=fa,r.flattenDepth=la,r.flip=js,r.flow=$h,r.flowRight=Xh,r.fromPairs=ha,r.functions=Tu,r.functionsIn=Ru,r.groupBy=Xl,r.initial=ba,r.intersection=Rl,r.intersectionBy=Il,r.intersectionWith=Pl,r.invert=Oh,r.invertBy=Th,r.invokeMap=Zl,r.iteratee=Ac,r.keyBy=Jl,r.keys=Bu,r.keysIn=Nu,r.map=fs,r.mapKeys=Lu,r.mapValues=Fu,r.matches=Mc,r.matchesProperty=Cc,r.memoize=As,r.merge=Ih,r.mergeWith=Ph,r.method=Zh,r.methodOf=Jh,r.mixin=Oc,r.negate=Ms,r.nthArg=Ic,r.omit=Dh,r.omitBy=Uu,r.once=Cs,r.orderBy=ls,r.over=Qh,r.overArgs=ah,r.overEvery=ed,r.overSome=td,r.partial=sh,r.partialRight=uh,r.partition=Ql,r.pick=Bh,r.pickBy=zu,r.property=Pc,r.propertyOf=Dc,r.pull=Dl,r.pullAll=ma,r.pullAllBy=wa,r.pullAllWith=xa,r.pullAt=Bl,r.range=rd,r.rangeRight=nd,r.rearg=ch,r.reject=ps,r.remove=Sa,r.rest=Os,r.reverse=ka,r.sampleSize=vs,r.set=Ku,r.setWith=Hu,r.shuffle=ys,r.slice=Ea,r.sortBy=eh,r.sortedUniq=Ra,r.sortedUniqBy=Ia,r.split=lc,r.spread=Ts,r.tail=Pa,r.take=Da,r.takeRight=Ba,r.takeRightWhile=Na,r.takeWhile=La,r.tap=Ya,r.throttle=Rs,r.thru=Wa,r.toArray=vu,r.toPairs=Nh,r.toPairsIn=Lh,r.toPath=qc,r.toPlainObject=wu,r.transform=Gu,r.unary=Is,r.union=Nl,r.unionBy=Ll,r.unionWith=Fl,r.uniq=Fa,r.uniqBy=Ua,r.uniqWith=za,r.unset=Vu,r.unzip=qa,r.unzipWith=Ka,r.update=Yu,r.updateWith=Wu,r.values=$u,r.valuesIn=Xu,r.without=Ul,r.words=wc,r.wrap=Ps,r.xor=zl,r.xorBy=ql,r.xorWith=Kl,r.zip=Hl,r.zipObject=Ha,r.zipObjectDeep=Ga,r.zipWith=Gl,r.entries=Nh,r.entriesIn=Lh,r.extend=kh,r.extendWith=Eh,Oc(r,r),r.add=id,r.attempt=Yh,r.camelCase=Fh,r.capitalize=ec,r.ceil=od,r.clamp=Zu,r.clone=Bs,r.cloneDeep=Ls,r.cloneDeepWith=Fs,r.cloneWith=Ns,r.conformsTo=Us,r.deburr=tc,r.defaultTo=Ec,r.divide=ad,r.endsWith=rc,r.eq=zs,r.escape=nc,r.escapeRegExp=ic,r.every=rs,r.find=Wl,r.findIndex=sa,r.findKey=Eu,r.findLast=$l,r.findLastIndex=ua,r.findLastKey=ju,r.floor=sd,r.forEach=ss,r.forEachRight=us,r.forIn=Au,r.forInRight=Mu,r.forOwn=Cu,r.forOwnRight=Ou,r.get=Iu,r.gt=fh,r.gte=lh,r.has=Pu,r.hasIn=Du,r.head=da,r.identity=jc,r.includes=cs,r.indexOf=pa,r.inRange=Ju,r.invoke=Rh,r.isArguments=hh,r.isArray=dh,r.isArrayBuffer=ph,r.isArrayLike=qs,r.isArrayLikeObject=Ks,r.isBoolean=Hs,r.isBuffer=bh,r.isDate=vh,r.isElement=Gs,r.isEmpty=Vs,r.isEqual=Ys,r.isEqualWith=Ws,r.isError=$s,r.isFinite=Xs,r.isFunction=Zs,r.isInteger=Js,r.isLength=Qs,r.isMap=yh,r.isMatch=ru,r.isMatchWith=nu,r.isNaN=iu,r.isNative=ou,r.isNil=su,r.isNull=au,r.isNumber=uu,r.isObject=eu,r.isObjectLike=tu,r.isPlainObject=cu,r.isRegExp=gh,r.isSafeInteger=fu,r.isSet=_h,r.isString=lu,r.isSymbol=hu,r.isTypedArray=mh,r.isUndefined=du,r.isWeakMap=pu,r.isWeakSet=bu,r.join=va,r.kebabCase=Uh,r.last=ya,r.lastIndexOf=ga,r.lowerCase=zh,r.lowerFirst=qh,r.lt=wh,r.lte=xh,r.max=Hc,r.maxBy=Gc,r.mean=Vc,r.meanBy=Yc,r.min=Wc,r.minBy=$c,r.stubArray=Bc,r.stubFalse=Nc,r.stubObject=Lc,r.stubString=Fc,r.stubTrue=Uc,r.multiply=ud,r.nth=_a,r.noConflict=Tc,r.noop=Rc,r.now=th,r.pad=oc,r.padEnd=ac,r.padStart=sc,r.parseInt=uc,r.random=Qu,r.reduce=hs,r.reduceRight=ds,r.repeat=cc,r.replace=fc,r.result=qu,r.round=cd,r.runInContext=e,r.sample=bs,r.size=gs,r.snakeCase=Kh,r.some=_s,r.sortedIndex=ja,r.sortedIndexBy=Aa,r.sortedIndexOf=Ma,r.sortedLastIndex=Ca,r.sortedLastIndexBy=Oa,r.sortedLastIndexOf=Ta,r.startCase=Hh,r.startsWith=hc,r.subtract=fd,r.sum=Xc,r.sumBy=Zc,r.template=dc,r.times=zc,r.toFinite=yu,r.toInteger=gu,r.toLength=_u,r.toLower=pc,r.toNumber=mu,r.toSafeInteger=xu,r.toString=Su,r.toUpper=bc,r.trim=vc,r.trimEnd=yc,r.trimStart=gc,r.truncate=_c,r.unescape=mc,r.uniqueId=Kc,r.upperCase=Gh,r.upperFirst=Vh,r.each=ss,r.eachRight=us,r.first=da,Oc(r,function(){var e={};return cn(r,function(t,n){df.call(r.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),r.VERSION="4.17.4",s(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){r[e].placeholder=r}),s(["drop","take"],function(e,t){$.prototype[e]=function(r){r=r===re?1:qf(gu(r),0);var n=this.__filtered__&&!t?new $(this):this.clone();return n.__filtered__?n.__takeCount__=Kf(r,n.__takeCount__):n.__views__.push({size:Kf(r,Pe),type:e+(n.__dir__<0?"Right":"")}),n},$.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),s(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r==Me||3==r;$.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:go(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),s(["head","last"],function(e,t){var r="take"+(t?"Right":"");$.prototype[e]=function(){return this[r](1).value()[0]}}),s(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");$.prototype[e]=function(){return this.__filtered__?new $(this):this[r](1)}}),$.prototype.compact=function(){return this.filter(jc)},$.prototype.find=function(e){return this.filter(e).head()},$.prototype.findLast=function(e){return this.reverse().find(e)},$.prototype.invokeMap=Jn(function(e,t){return"function"==typeof e?new $(this):this.map(function(r){return wn(r,e,t)})}),$.prototype.reject=function(e){return this.filter(Ms(go(e)))},$.prototype.slice=function(e,t){e=gu(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==re&&(t=gu(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},$.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$.prototype.toArray=function(){return this.take(Pe)},cn($.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=r[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(r.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof $,c=s[0],f=u||dh(t),l=function(e){var t=o.apply(r,p([e],s));return i&&h?t[0]:t};f&&n&&"function"==typeof c&&1!=c.length&&(u=f=!1);var h=this.__chain__,d=!!this.__actions__.length,b=a&&!h,v=u&&!d;if(!a&&f){t=v?t:new $(this);var y=e.apply(t,s);return y.__actions__.push({func:Wa,args:[l],thisArg:re}),new A(y,h)}return b&&v?e.apply(this,s):(y=this.thru(l),b?i?y.value()[0]:y.value():y)})}),s(["pop","push","shift","sort","splice","unshift"],function(e){var t=uf[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);r.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(dh(r)?r:[],e)}return this[n](function(r){return t.apply(dh(r)?r:[],e)})}}),cn($.prototype,function(e,t){var n=r[t];if(n){var i=n.name+"";(tl[i]||(tl[i]=[])).push({name:t,func:n})}}),tl[Wi(re,be).name]=[{name:"wrapper",func:re}],$.prototype.clone=Q,$.prototype.reverse=ee,$.prototype.value=Dt,r.prototype.at=Vl,r.prototype.chain=$a,r.prototype.commit=Xa,r.prototype.next=Za,r.prototype.plant=Qa,r.prototype.reverse=es,r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=ts,r.prototype.first=r.prototype.head,Cf&&(r.prototype[Cf]=Ja),r}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(kr._=Ur,define(function(){return Ur})):jr?((jr.exports=Ur)._=Ur,Er._=Ur):kr._=Ur}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],369:[function(e,t,r){function n(e,t){return(s(e)?i:a)(e,o(t,3))}var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),s=e("./isArray");t.exports=n},{"./_arrayMap":188,"./_baseIteratee":221,"./_baseMap":224,"./isArray":350}],370:[function(e,t,r){function n(e,t){var r={};return t=a(t,3),o(e,function(e,n,o){i(r,n,t(e,n,o))}),r}var i=e("./_baseAssignValue"),o=e("./_baseForOwn"),a=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":198,"./_baseForOwn":207,"./_baseIteratee":221}],371:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),o="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":171}],372:[function(e,t,r){function n(e){if("function"!=typeof e)throw new TypeError(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var i="Expected a function";t.exports=n},{}],373:[function(e,t,r){function n(){}t.exports=n},{}],374:[function(e,t,r){var n=e("./_root"),i=function(){return n.Date.now()};t.exports=i},{"./_root":314}],375:[function(e,t,r){function n(e){return i(2,e)}var i=e("./before");t.exports=n},{"./before":333}],376:[function(e,t,r){function n(e,t,r){return r||null==t?t=0:t&&(t=+t),s(o(e).replace(a,""),t||0)}var i=e("./_root"),o=e("./toString"),a=/^\s+/,s=i.parseInt;t.exports=n},{"./_root":314,"./toString":388}],377:[function(e,t,r){var n=e("./_createAggregator"),i=n(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});t.exports=i},{"./_createAggregator":253}],378:[function(e,t,r){function n(e){return a(e)?i(s(e)):o(e)}var i=e("./_baseProperty"),o=e("./_basePropertyDeep"),a=e("./_isKey"),s=e("./_toKey");t.exports=n},{"./_baseProperty":227,"./_basePropertyDeep":228,"./_isKey":289,"./_toKey":328}],379:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,u(a(t,3)))}var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),s=e("./isArray"),u=e("./negate");t.exports=n},{"./_arrayFilter":184,"./_baseFilter":203,"./_baseIteratee":221,"./isArray":350,"./negate":372}],380:[function(e,t,r){function n(e){if(null==e)return 0;if(a(e))return s(e)?u(e):e.length;var t=o(e);return t==c||t==f?e.size:i(e).length}var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArrayLike"),s=e("./isString"),u=e("./_stringSize"),c="[object Map]",f="[object Set]";t.exports=n},{"./_baseKeys":222,"./_getTag":274,"./_stringSize":326,"./isArrayLike":351,"./isString":363}],381:[function(e,t,r){function n(e,t,r){var n=s(e)?i:a;return r&&u(e,t,r)&&(t=void 0),n(e,o(t,3))}var i=e("./_arraySome"),o=e("./_baseIteratee"),a=e("./_baseSome"),s=e("./isArray"),u=e("./_isIterateeCall");t.exports=n},{"./_arraySome":191,"./_baseIteratee":221,"./_baseSome":231,"./_isIterateeCall":288,"./isArray":350}],382:[function(e,t,r){function n(){return[]}t.exports=n},{}],383:[function(e,t,r){function n(){return!1}t.exports=n},{}],384:[function(e,t,r){function n(e,t,r){var n=!0,s=!0;if("function"!=typeof e)throw new TypeError(a);return o(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),i(e,t,{leading:n,maxWait:t,trailing:s})}var i=e("./debounce"),o=e("./isObject"),a="Expected a function";t.exports=n},{"./debounce":336,"./isObject":361}],385:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===o||e===-o){return(e<0?-1:1)*a}return e===e?e:0}var i=e("./toNumber"),o=1/0,a=1.7976931348623157e308;t.exports=n},{"./toNumber":387}],386:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":385}],387:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var r=c.test(e);return r||f.test(e)?l(e.slice(2),r?2:8):u.test(e)?a:+e}var i=e("./isObject"),o=e("./isSymbol"),a=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=n},{"./isObject":361,"./isSymbol":364}],388:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":233}],389:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseRest"),o=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=i(function(e){return o(n(e,1,a,!0))});t.exports=s},{"./_baseFlatten":205,"./_baseRest":229,"./_baseUniq":235,"./isArrayLikeObject":352}],390:[function(e,t,r){function n(e){return null==e?[]:i(e,o(e))}var i=e("./_baseValues"),o=e("./keys");t.exports=n},{"./_baseValues":236,"./keys":366}],391:[function(e,t,r){var n=e("./_baseDifference"),i=e("./_baseRest"),o=e("./isArrayLikeObject"),a=i(function(e,t){return o(e)?n(e,t):[]});t.exports=a},{"./_baseDifference":201,"./_baseRest":229,"./isArrayLikeObject":352}],392:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(e){var t,r=0,a=1,s=i(null),u=i(null),c=0;return e=n(e),{hit:function(n){var i=u[n],f=++c;if(s[f]=n,u[n]=f,!i){if(++r<=e)return;return n=s[a],t(n),n}if(delete s[i],a===i)for(;!o.call(s,++a);)continue},delete:t=function(e){var t=u[e];if(t&&(delete s[t],delete u[e],--r,a===t)){if(!r)return c=0,void(a=1);for(;!o.call(s,++a);)continue}},clear:function(){r=0,a=1,s=i(null),u=i(null),c=0}}}},{"es5-ext/number/to-pos-integer":117}],393:[function(e,t,r){"use strict";var n=e("es5-ext/array/from"),i=e("es5-ext/object/map"),o=e("es5-ext/object/mixin"),a=e("es5-ext/function/_define-length"),s=e("next-tick"),u=Array.prototype.slice,c=Function.prototype.apply,f=Object.create;e("../lib/registered-extensions").async=function(e,t){var r,l,h,d=f(null),p=f(null),b=t.memoized,v=t.original;t.memoized=a(function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=u.call(t,0,-1)),b.apply(l=this,h=t)},b);try{o(t.memoized,b)}catch(e){}t.on("get",function(e){var n,i,o;if(r){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],r]:d[e].push(r),void(r=null);n=r,i=l,o=h,r=l=h=null,s(function(){var a;hasOwnProperty.call(p,e)?(a=p[e],t.emit("getasync",e,o,i),c.call(n,a.context,a.args)):(r=n,l=i,h=o,b.apply(i,o))})}}),t.original=function(){var e,i,o,a;return r?(e=n(arguments),i=function e(r){var i,o,u=e.id;return null==u?void s(c.bind(e,this,arguments)):(delete e.id,i=d[u],delete d[u],i?(o=n(arguments),t.has(u)&&(r?t.delete(u):(p[u]={context:this,args:o},t.emit("setasync",u,"function"==typeof i?1:i.length))),"function"==typeof i?a=c.call(i,this,o):i.forEach(function(e){a=c.call(e,this,o)},this),a):void 0)},o=r,r=l=h=null,e.push(i),a=c.call(v,this,e),i.cb=o,r=i,a):c.call(v,this,arguments)},t.on("set",function(e){ -if(!r)return void t.delete(e);d[e]?"function"==typeof d[e]?d[e]=[d[e],r.cb]:d[e].push(r.cb):d[e]=r.cb,delete r.cb,r.id=e,r=null}),t.on("delete",function(e){var r;hasOwnProperty.call(d,e)||p[e]&&(r=p[e],delete p[e],t.emit("deleteasync",e,u.call(r.args,1)))}),t.on("clear",function(){var e=p;p=f(null),t.emit("clearasync",i(e,function(e){return u.call(e.args,1)}))})}},{"../lib/registered-extensions":401,"es5-ext/array/from":101,"es5-ext/function/_define-length":106,"es5-ext/object/map":129,"es5-ext/object/mixin":130,"next-tick":415}],394:[function(e,t,r){"use strict";var n=e("es5-ext/object/valid-callable"),i=e("es5-ext/object/for-each"),o=e("../lib/registered-extensions"),a=Function.prototype.apply;o.dispose=function(e,t,r){var s;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",s=function(t,r){a.call(e,null,r)}),void t.on("clearasync",function(e){i(e,function(e,t){s(t,e)})});t.on("delete",s=function(t,r){e(r)}),t.on("clear",function(e){i(e,function(e,t){s(t,e)})})}},{"../lib/registered-extensions":401,"es5-ext/object/for-each":122,"es5-ext/object/valid-callable":133}],395:[function(e,t,r){"use strict";var n=e("es5-ext/array/from"),i=e("es5-ext/object/for-each"),o=e("next-tick"),a=e("is-promise"),s=e("timers-ext/valid-timeout"),u=e("../lib/registered-extensions"),c=Function.prototype,f=Math.max,l=Math.min,h=Object.create;u.maxAge=function(e,t,r){var d,p,b,v;(e=s(e))&&(d=h(null),p=r.async&&u.async||r.promise&&u.promise?"async":"",t.on("set"+p,function(r){d[r]=setTimeout(function(){t.delete(r)},e),v&&(v[r]&&"nextTick"!==v[r]&&clearTimeout(v[r]),v[r]=setTimeout(function(){delete v[r]},b))}),t.on("delete"+p,function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])}),r.preFetch&&(b=r.preFetch===!0||isNaN(r.preFetch)?.333:f(l(Number(r.preFetch),1),0))&&(v={},b=(1-b)*e,t.on("get"+p,function(e,i,s){v[e]||(v[e]="nextTick",o(function(){var o;"nextTick"===v[e]&&(delete v[e],t.delete(e),r.async&&(i=n(i),i.push(c)),o=t.memoized.apply(s,i),r.promise&&a(o)&&("function"==typeof o.done?o.done(c,c):o.then(c,c)))}))})),t.on("clear"+p,function(){i(d,function(e){clearTimeout(e)}),d={},v&&(i(v,function(e){"nextTick"!==e&&clearTimeout(e)}),v={})}))}},{"../lib/registered-extensions":401,"es5-ext/array/from":101,"es5-ext/object/for-each":122,"is-promise":163,"next-tick":415,"timers-ext/valid-timeout":492}],396:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=e("lru-queue"),o=e("../lib/registered-extensions");o.max=function(e,t,r){var a,s,u;(e=n(e))&&(s=i(e),a=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+a,u=function(e){void 0!==(e=s.hit(e))&&t.delete(e)}),t.on("get"+a,u),t.on("delete"+a,s.delete),t.on("clear"+a,s.clear))}},{"../lib/registered-extensions":401,"es5-ext/number/to-pos-integer":117,"lru-queue":392}],397:[function(e,t,r){"use strict";var n=e("es5-ext/object/map"),i=e("es5-ext/object/primitive-set"),o=e("es5-ext/object/validate-stringifiable-value"),a=e("es5-ext/to-short-string-representation"),s=e("is-promise"),u=e("next-tick"),c=Object.create,f=i("then","then:finally","done","done:finally");e("../lib/registered-extensions").promise=function(e,t){var r=c(null),i=c(null),l=c(null);if(e===!0)e=null;else if(e=o(e),!f[e])throw new TypeError("'"+a(e)+"' is not valid promise mode");t.on("set",function(n,o,a){var c=!1,f=!1;if(!s(a))return i[n]=a,void t.emit("setasync",n,1);r[n]=1,l[n]=a;var h=function(e){var o=r[n];if(c)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'then:finally' or 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},d=function(){c=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},p=e;if(p||(p="function"==typeof a.finally?"then:finally":"then"),"then"===p)a.then(function(e){u(h.bind(this,e))},function(){u(d)});else if("then:finally"===p){if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'then:finally' mode");a.then(function(e){f=!0,u(h.bind(this,e))}),a.finally(function(){f||d()})}else if("done"===p){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");a.done(h,d)}else if("done:finally"===p){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");a.done(h),a.finally(d)}}),t.on("get",function(e,n,i){var o;if(r[e])return void++r[e];o=l[e];var a=function(){t.emit("getasync",e,n,i)};s(o)?"function"==typeof o.done?o.done(a):o.then(function(){u(a)}):a()}),t.on("delete",function(e){if(delete l[e],r[e])return void delete r[e];if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}}),t.on("clear",function(){var e=i;i=c(null),r=c(null),l=c(null),t.emit("clearasync",n(e,function(e){return[e]}))})}},{"../lib/registered-extensions":401,"es5-ext/object/map":129,"es5-ext/object/primitive-set":132,"es5-ext/object/validate-stringifiable-value":135,"es5-ext/to-short-string-representation":142,"is-promise":163,"next-tick":415}],398:[function(e,t,r){"use strict";var n=e("d"),i=e("../lib/registered-extensions"),o=Object.create,a=Object.defineProperties;i.refCounter=function(e,t,r){var s,u;s=o(null),u=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+u,function(e,t){s[e]=t||1}),t.on("get"+u,function(e){++s[e]}),t.on("delete"+u,function(e){delete s[e]}),t.on("clear"+u,function(){s={}}),a(t.memoized,{deleteRef:n(function(){var e=t.get(arguments);return null===e?null:s[e]?!--s[e]&&(t.delete(e),!0):null}),getRefCount:n(function(){var e=t.get(arguments);return null===e?0:s[e]?s[e]:0})})}},{"../lib/registered-extensions":401,d:73}],399:[function(e,t,r){"use strict";var n=e("es5-ext/object/normalize-options"),i=e("./lib/resolve-length"),o=e("./plain");t.exports=function(t){var r,a=n(arguments[1]);return a.normalizer||0!==(r=a.length=i(a.length,t.length,a.async))&&(a.primitive?r===!1?a.normalizer=e("./normalizers/primitive"):r>1&&(a.normalizer=e("./normalizers/get-primitive-fixed")(r)):a.normalizer=r===!1?e("./normalizers/get")():1===r?e("./normalizers/get-1")():e("./normalizers/get-fixed")(r)),a.async&&e("./ext/async"),a.promise&&e("./ext/promise"),a.dispose&&e("./ext/dispose"),a.maxAge&&e("./ext/max-age"),a.max&&e("./ext/max"),a.refCounter&&e("./ext/ref-counter"),o(t,a)}},{"./ext/async":393,"./ext/dispose":394,"./ext/max":396,"./ext/max-age":395,"./ext/promise":397,"./ext/ref-counter":398,"./lib/resolve-length":402,"./normalizers/get":408,"./normalizers/get-1":405,"./normalizers/get-fixed":406,"./normalizers/get-primitive-fixed":407,"./normalizers/primitive":409,"./plain":410,"es5-ext/object/normalize-options":131}],400:[function(e,t,r){"use strict";var n=e("es5-ext/error/custom"),i=e("es5-ext/function/_define-length"),o=e("d"),a=e("event-emitter").methods,s=e("./resolve-resolve"),u=e("./resolve-normalize"),c=Function.prototype.apply,f=Function.prototype.call,l=Object.create,h=Object.defineProperties,d=a.on,p=a.emit;t.exports=function(e,t,r){var a,b,v,y,g,_,m,w,x,S,k,E,j,A,M,C=l(null);return b=t!==!1?t:isNaN(e.length)?1:e.length,r.normalizer&&(S=u(r.normalizer),v=S.get,y=S.set,g=S.delete,_=S.clear),null!=r.resolvers&&(M=s(r.resolvers)),A=v?i(function(t){var r,i,o=arguments;if(M&&(o=M(o)),null!==(r=v(o))&&hasOwnProperty.call(C,r))return k&&a.emit("get",r,o,this),C[r];if(i=1===o.length?f.call(e,this,o[0]):c.call(e,this,o),null===r){if(null!==(r=v(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=y(o)}else if(hasOwnProperty.call(C,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return C[r]=i,E&&a.emit("set",r,null,i),i},b):0===t?function(){var t;if(hasOwnProperty.call(C,"data"))return k&&a.emit("get","data",arguments,this),C.data;if(t=arguments.length?c.call(e,this,arguments):f.call(e,this),hasOwnProperty.call(C,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return C.data=t,E&&a.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(M&&(o=M(arguments)),i=String(o[0]),hasOwnProperty.call(C,i))return k&&a.emit("get",i,o,this),C[i];if(r=1===o.length?f.call(e,this,o[0]):c.call(e,this,o),hasOwnProperty.call(C,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return C[i]=r,E&&a.emit("set",i,null,r),r},a={original:e,memoized:A,profileName:r.profileName,get:function(e){return M&&(e=M(e)),v?v(e):String(e[0])},has:function(e){return hasOwnProperty.call(C,e)},delete:function(e){var t;hasOwnProperty.call(C,e)&&(g&&g(e),t=C[e],delete C[e],j&&a.emit("delete",e,t))},clear:function(){var e=C;_&&_(),C=l(null),a.emit("clear",e)},on:function(e,t){return"get"===e?k=!0:"set"===e?E=!0:"delete"===e&&(j=!0),d.call(this,e,t)},emit:p,updateEnv:function(){e=a.original}},m=v?i(function(e){var t,r=arguments;M&&(r=M(r)),null!==(t=v(r))&&a.delete(t)},b):0===t?function(){return a.delete("data")}:function(e){return M&&(e=M(arguments)[0]),a.delete(e)},w=i(function(){var e,t=arguments;return M&&(t=M(t)),e=v(t),C[e]}),x=i(function(){var e,t=arguments;return M&&(t=M(t)),null!==(e=v(t))&&a.has(e)}),h(A,{__memoized__:o(!0),delete:o(m),clear:o(a.clear),_get:o(w),_has:o(x)}),a}},{"./resolve-normalize":403,"./resolve-resolve":404,d:73,"es5-ext/error/custom":105,"es5-ext/function/_define-length":106,"event-emitter":148}],401:[function(e,t,r){"use strict"},{}],402:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer");t.exports=function(e,t,r){var i;return isNaN(e)?(i=t,i>=0?r&&i?i-1:i:1):e!==!1&&n(e)}},{"es5-ext/number/to-pos-integer":117}],403:[function(e,t,r){"use strict";var n=e("es5-ext/object/valid-callable");t.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},{"es5-ext/object/valid-callable":133}],404:[function(e,t,r){"use strict";var n,i=e("es5-ext/array/to-array"),o=e("es5-ext/object/is-value"),a=e("es5-ext/object/valid-callable"),s=Array.prototype.slice;n=function(e){return this.map(function(t,r){return t?t(e[r]):e[r]}).concat(s.call(e,this.length))},t.exports=function(e){return e=i(e),e.forEach(function(e){o(e)&&a(e)}),n.bind(e)}},{"es5-ext/array/to-array":104,"es5-ext/object/is-value":125,"es5-ext/object/valid-callable":133}],405:[function(e,t,r){"use strict";var n=e("es5-ext/array/#/e-index-of");t.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return i===-1?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);i!==-1&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},{"es5-ext/array/#/e-index-of":100}],406:[function(e,t,r){"use strict";var n=e("es5-ext/array/#/e-index-of"),i=Object.create;t.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,a=r;o>=7-n),new i(r)},n.prototype.test=function(e,t,r){var n=e.bitLength(),o=i.mont(e),a=new i(1).toRed(o);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),u=s.subn(1),c=0;!s.testn(c);c++);for(var f=e.shrn(c),l=s.toRed(o);t>0;t--){var h=this._rand(u);r&&r(h);var d=h.toRed(o).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var p=1;p0;t--){var l=this._rand(s),h=e.gcd(l);if(0!==h.cmpn(1))return h;var d=l.toRed(n).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var p=1;p>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r0)for(r=0;r0?"future":"past"];return j(r)?r(t):r.replace(/%s/i,t)}function B(e,t){var r=e.toLowerCase();Rn[r]=Rn[r+"s"]=Rn[t]=e}function N(e){return"string"==typeof e?Rn[e]||Rn[e.toLowerCase()]:void 0}function L(e){var t,r,n={};for(r in e)f(e,r)&&(t=N(r))&&(n[t]=e[r]);return n}function F(e,t){In[e]=t}function U(e){var t=[];for(var r in e)t.push({unit:r,priority:In[r]});return t.sort(function(e,t){return e.priority-t.priority}),t}function z(e,t){return function(n){return null!=n?(K(this,e,n),r.updateOffset(this,t),this):q(this,e)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,r){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](r)}function H(e){return e=N(e),j(this[e])?this[e]():this}function G(e,t){if("object"==typeof e){e=L(e);for(var r=U(e),n=0;n=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}function Y(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(Nn[e]=i),t&&(Nn[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])}),r&&(Nn[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,r,n=e.match(Pn);for(t=0,r=n.length;t=0&&Dn.test(e);)e=e.replace(Dn,r),Dn.lastIndex=0,n-=1;return e}function J(e,t,r){qn[e]=j(t)?t:function(e,n){return e&&r?r:t}}function Q(e,t){return f(qn,e)?qn[e](t._strict,t._locale):new RegExp(ee(e))}function ee(e){return te(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))}function te(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),s(t)&&(n=function(e,r){r[t]=w(e)}),r=0;r=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function me(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function we(e,t,r){var n=7+t-r;return-((7+me(e,0,n).getUTCDay()-t)%7)+n-1}function xe(e,t,r,n,i){var o,a,s=(7+r-n)%7,u=we(e,n,i),c=1+7*(t-1)+s+u;return c<=0?(o=e-1,a=ve(o)+c):c>ve(e)?(o=e+1,a=c-ve(e)):(o=e,a=c),{year:o,dayOfYear:a}}function Se(e,t,r){var n,i,o=we(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,n=a+ke(i,t,r)):a>ke(e.year(),t,r)?(n=a-ke(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function ke(e,t,r){var n=we(e,t,r),i=we(e+1,t,r);return(ve(e)-n+i)/7}function Ee(e){return Se(e,this._week.dow,this._week.doy).week}function je(){return this._week.dow}function Ae(){return this._week.doy}function Me(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ce(e){var t=Se(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Oe(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Te(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Re(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function Ie(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Pe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function De(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?(i=Qn.call(this._weekdaysParse,a),i!==-1?i:null):"ddd"===t?(i=Qn.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):"dddd"===t?(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._shortWeekdaysParse,a))!==-1?i:(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):"ddd"===t?(i=Qn.call(this._shortWeekdaysParse,a))!==-1?i:(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):(i=Qn.call(this._minWeekdaysParse,a))!==-1?i:(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._shortWeekdaysParse,a),i!==-1?i:null)}function Be(e,t,r){var n,i,o;if(this._weekdaysParseExact)return De.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=h([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Ne(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Oe(e,this.localeData()),this.add(e-t,"d")):t}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Fe(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Te(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ue(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=fi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ze(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=li),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qe(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ke(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)r=h([2e3,1]).day(t),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),o=this.weekdays(r,""),a.push(n),s.push(i),u.push(o),c.push(n),c.push(i),c.push(o);for(a.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=te(s[t]),u[t]=te(u[t]),c[t]=te(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function He(){return this.hours()%12||12}function Ge(){return this.hours()||24}function Ve(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ye(e,t){return t._meridiemParse}function We(e){ -return"p"===(e+"").toLowerCase().charAt(0)}function $e(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}function Xe(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,r,n,i,o=0;o0;){if(n=Je(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&x(i,r,!0)>=t-1)break;t--}o++}return null}function Je(r){var n=null;if(!vi[r]&&void 0!==t&&t&&t.exports)try{n=di._abbr,e("./locale/"+r),Qe(n)}catch(e){}return vi[r]}function Qe(e,t){var r;return e&&(r=a(t)?rt(e):et(e,t))&&(di=r),di._abbr}function et(e,t){if(null!==t){var r=bi;if(t.abbr=e,null!=vi[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=vi[e]._config;else if(null!=t.parentLocale){if(null==vi[t.parentLocale])return yi[t.parentLocale]||(yi[t.parentLocale]=[]),yi[t.parentLocale].push({name:e,config:t}),null;r=vi[t.parentLocale]._config}return vi[e]=new C(M(r,t)),yi[e]&&yi[e].forEach(function(e){et(e.name,e.config)}),Qe(e),vi[e]}return delete vi[e],null}function tt(e,t){if(null!=t){var r,n=bi;null!=vi[e]&&(n=vi[e]._config),t=M(n,t),r=new C(t),r.parentLocale=vi[e],vi[e]=r,Qe(e)}else null!=vi[e]&&(null!=vi[e].parentLocale?vi[e]=vi[e].parentLocale:null!=vi[e]&&delete vi[e]);return vi[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return di;if(!n(e)){if(t=Je(e))return t;e=[e]}return Ze(e)}function nt(){return Mn(vi)}function it(e){var t,r=e._a;return r&&p(e).overflow===-2&&(t=r[Gn]<0||r[Gn]>11?Gn:r[Vn]<1||r[Vn]>oe(r[Hn],r[Gn])?Vn:r[Yn]<0||r[Yn]>24||24===r[Yn]&&(0!==r[Wn]||0!==r[$n]||0!==r[Xn])?Yn:r[Wn]<0||r[Wn]>59?Wn:r[$n]<0||r[$n]>59?$n:r[Xn]<0||r[Xn]>999?Xn:-1,p(e)._overflowDayOfYear&&(tVn)&&(t=Vn),p(e)._overflowWeeks&&t===-1&&(t=Zn),p(e)._overflowWeekday&&t===-1&&(t=Jn),p(e).overflow=t),e}function ot(e){var t,r,n,i,o,a,s=e._i,u=gi.exec(s)||_i.exec(s);if(u){for(p(e).iso=!0,t=0,r=wi.length;t10?"YYYY ":"YY "),o="HH:mm"+(r[4]?":ss":""),r[1]){var l=new Date(r[2]),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()];if(r[1].substr(0,3)!==h)return p(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(r[5].length){case 2:0===u?s=" +0000":(u=f.indexOf(r[5][1].toUpperCase())-12,s=(u<0?" -":" +")+(""+u).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:s=c[r[5]];break;default:s=c[" GMT"]}r[5]=s,e._i=r.splice(1).join(""),a=" ZZ",e._f=n+i+o+a,ht(e),p(e).rfc2822=!0}else e._isValid=!1}function st(e){var t=Si.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));ot(e),e._isValid===!1&&(delete e._isValid,at(e),e._isValid===!1&&(delete e._isValid,r.createFromInputFallback(e)))}function ut(e,t,r){return null!=e?e:null!=t?t:r}function ct(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ft(e){var t,r,n,i,o=[];if(!e._d){for(n=ct(e),e._w&&null==e._a[Vn]&&null==e._a[Gn]&<(e),null!=e._dayOfYear&&(i=ut(e._a[Hn],n[Hn]),(e._dayOfYear>ve(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),r=me(i,0,e._dayOfYear),e._a[Gn]=r.getUTCMonth(),e._a[Vn]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Yn]&&0===e._a[Wn]&&0===e._a[$n]&&0===e._a[Xn]&&(e._nextDay=!0,e._a[Yn]=0),e._d=(e._useUTC?me:_e).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Yn]=24)}}function lt(e){var t,r,n,i,o,a,s,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)o=1,a=4,r=ut(t.GG,e._a[Hn],Se(mt(),1,4).year),n=ut(t.W,1),((i=ut(t.E,1))<1||i>7)&&(u=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var c=Se(mt(),o,a);r=ut(t.gg,e._a[Hn],c.year),n=ut(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(u=!0)):i=o}n<1||n>ke(r,o,a)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=xe(r,n,i,o,a),e._a[Hn]=s.year,e._dayOfYear=s.dayOfYear)}function ht(e){if(e._f===r.ISO_8601)return void ot(e);if(e._f===r.RFC_2822)return void at(e);e._a=[],p(e).empty=!0;var t,n,i,o,a,s=""+e._i,u=s.length,c=0;for(i=Z(e._f,e._locale).match(Pn)||[],t=0;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),Nn[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),ie(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=u-c,s.length>0&&p(e).unusedInput.push(s),e._a[Yn]<=12&&p(e).bigHour===!0&&e._a[Yn]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Yn]=dt(e._locale,e._a[Yn],e._meridiem),ft(e),it(e)}function dt(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?(n=e.isPM(r),n&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function pt(e){var t,r,n,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=yt(e),e._a){var t=e._isUTC?h(e._a):mt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qt(){return!!this.isValid()&&!this._isUTC}function Kt(){return!!this.isValid()&&this._isUTC}function Ht(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Gt(e,t){var r,n,i,o=e,a=null;return Mt(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(o={},t?o[t]=e:o.milliseconds=e):(a=Oi.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:w(a[Vn])*r,h:w(a[Yn])*r,m:w(a[Wn])*r,s:w(a[$n])*r,ms:w(Ct(1e3*a[Xn]))*r}):(a=Ti.exec(e))?(r="-"===a[1]?-1:1,o={y:Vt(a[2],r),M:Vt(a[3],r),w:Vt(a[4],r),d:Vt(a[5],r),h:Vt(a[6],r),m:Vt(a[7],r),s:Vt(a[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Wt(mt(o.from),mt(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),n=new At(o),Mt(e)&&f(e,"_locale")&&(n._locale=e._locale),n}function Vt(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Yt(e,t){var r={milliseconds:0,months:0};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Wt(e,t){var r;return e.isValid()&&t.isValid()?(t=Rt(t,e),e.isBefore(t)?r=Yt(e,t):(r=Yt(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function $t(e,t){return function(r,n){var i,o;return null===n||isNaN(+n)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),r="string"==typeof r?+r:r,i=Gt(r,n),Xt(this,i,e),this}}function Xt(e,t,n,i){var o=t._milliseconds,a=Ct(t._days),s=Ct(t._months);e.isValid()&&(i=null==i||i,o&&e._d.setTime(e._d.valueOf()+o*n),a&&K(e,"Date",q(e,"Date")+a*n),s&&fe(e,q(e,"Month")+s*n),i&&r.updateOffset(e,a||s))}function Zt(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Jt(e,t){var n=e||mt(),i=Rt(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,mt(n)))}function Qt(){return new g(this)}function er(e,t){var r=_(e)?e:mt(e);return!(!this.isValid()||!r.isValid())&&(t=N(a(t)?"millisecond":t),"millisecond"===t?this.valueOf()>r.valueOf():r.valueOf()9999?X(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):j(Date.prototype.toISOString)?this.toDate().toISOString():X(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function fr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+i)}function lr(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=X(this,e);return this.localeData().postformat(t)}function hr(e,t){return this.isValid()&&(_(e)&&e.isValid()||mt(e).isValid())?Gt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function dr(e){return this.from(mt(),e)}function pr(e,t){return this.isValid()&&(_(e)&&e.isValid()||mt(e).isValid())?Gt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function br(e){return this.to(mt(),e)}function vr(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function yr(){return this._locale}function gr(e){switch(e=N(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function _r(e){return void 0===(e=N(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function mr(){return this._d.valueOf()-6e4*(this._offset||0)}function wr(){return Math.floor(this.valueOf()/1e3)}function xr(){return new Date(this.valueOf())}function Sr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function kr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Er(){return this.isValid()?this.toISOString():null}function jr(){return b(this)}function Ar(){return l({},p(this))}function Mr(){return p(this).overflow}function Cr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Or(e,t){Y(0,[e,e.length],0,t)}function Tr(e){return Dr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Rr(e){return Dr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Ir(){return ke(this.year(),1,4)}function Pr(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function Dr(e,t,r,n,i){var o;return null==e?Se(this,n,i).year:(o=ke(e,n,i),t>o&&(t=o),Br.call(this,e,t,r,n,i))}function Br(e,t,r,n,i){var o=xe(e,t,r,n,i),a=me(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Nr(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Lr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Fr(e,t){t[Xn]=w(1e3*("0."+e))}function Ur(){return this._isUTC?"UTC":""}function zr(){return this._isUTC?"Coordinated Universal Time":""}function qr(e){return mt(1e3*e)}function Kr(){return mt.apply(null,arguments).parseZone()}function Hr(e){return e}function Gr(e,t,r,n){var i=rt(),o=h().set(n,t);return i[r](o,e)}function Vr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Gr(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Gr(e,n,r,"month");return i}function Yr(e,t,r,n){"boolean"==typeof e?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var i=rt(),o=e?i._week.dow:0;if(null!=r)return Gr(t,(r+o)%7,n,"day");var a,u=[];for(a=0;a<7;a++)u[a]=Gr(t,(a+o)%7,n,"day");return u}function Wr(e,t){return Vr(e,t,"months")}function $r(e,t){return Vr(e,t,"monthsShort")}function Xr(e,t,r){return Yr(e,t,r,"weekdays")}function Zr(e,t,r){return Yr(e,t,r,"weekdaysShort")}function Jr(e,t,r){return Yr(e,t,r,"weekdaysMin")}function Qr(){var e=this._data;return this._milliseconds=qi(this._milliseconds),this._days=qi(this._days),this._months=qi(this._months),e.milliseconds=qi(e.milliseconds),e.seconds=qi(e.seconds),e.minutes=qi(e.minutes),e.hours=qi(e.hours),e.months=qi(e.months),e.years=qi(e.years),this}function en(e,t,r,n){var i=Gt(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function tn(e,t){return en(this,e,t,1)}function rn(e,t){return en(this,e,t,-1)}function nn(e){return e<0?Math.floor(e):Math.ceil(e)}function on(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*nn(sn(s)+a),a=0,s=0),u.milliseconds=o%1e3,e=m(o/1e3),u.seconds=e%60,t=m(e/60),u.minutes=t%60,r=m(t/60),u.hours=r%24,a+=m(r/24),i=m(an(a)),s+=i,a-=nn(sn(i)),n=m(s/12),s%=12,u.days=a,u.months=s,u.years=n,this}function an(e){return 4800*e/146097}function sn(e){return 146097*e/4800}function un(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=N(e))||"year"===e)return t=this._days+n/864e5,r=this._months+an(t),"month"===e?r:r/12;switch(t=this._days+Math.round(sn(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function cn(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN}function fn(e){return function(){return this.as(e)}}function ln(e){return e=N(e),this.isValid()?this[e+"s"]():NaN}function hn(e){return function(){return this.isValid()?this._data[e]:NaN}}function dn(){return m(this.days()/7)}function pn(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function bn(e,t,r){var n=Gt(e).abs(),i=io(n.as("s")),o=io(n.as("m")),a=io(n.as("h")),s=io(n.as("d")),u=io(n.as("M")),c=io(n.as("y")),f=i<=oo.ss&&["s",i]||i0,f[4]=r,pn.apply(null,f)}function vn(e){return void 0===e?io:"function"==typeof e&&(io=e,!0)}function yn(e,t){return void 0!==oo[e]&&(void 0===t?oo[e]:(oo[e]=t,"s"===e&&(oo.ss=t-1),!0))}function gn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=bn(this,!e,t);return e&&(r=t.pastFuture(+this,r)),t.postformat(r)}function _n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n=ao(this._milliseconds)/1e3,i=ao(this._days),o=ao(this._months);e=m(n/60),t=m(e/60),n%=60,e%=60,r=m(o/12),o%=12;var a=r,s=o,u=i,c=t,f=e,l=n,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||f||l?"T":"")+(c?c+"H":"")+(f?f+"M":"")+(l?l+"S":""):"P0D"}var mn,wn;wn=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),r=t.length>>>0,n=0;n68?1900:2e3)};var oi=z("FullYear",!0);Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),F("week",5),F("isoWeek",5),J("w",/\d\d?/),J("ww",/\d\d?/,/\d\d/),J("W",/\d\d?/),J("WW",/\d\d?/,/\d\d/),ne(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=w(e)});var ai={dow:0,doy:6};Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),J("d",/\d\d?/),J("e",/\d\d?/),J("E",/\d\d?/),J("dd",function(e,t){return t.weekdaysMinRegex(e)}),J("ddd",function(e,t){return t.weekdaysShortRegex(e)}),J("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:p(r).invalidWeekday=e}),ne(["d","e","E"],function(e,t,r,n){t[n]=w(e)});var si="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ui="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ci="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fi=zn,li=zn,hi=zn;Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,He),Y("k",["kk",2],0,Ge),Y("hmm",0,0,function(){return""+He.apply(this)+V(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+He.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Ve("a",!0),Ve("A",!1),B("hour","h"),F("hour",13),J("a",Ye),J("A",Ye),J("H",/\d\d?/),J("h",/\d\d?/),J("k",/\d\d?/),J("HH",/\d\d?/,/\d\d/),J("hh",/\d\d?/,/\d\d/),J("kk",/\d\d?/,/\d\d/),J("hmm",/\d\d\d\d?/),J("hmmss",/\d\d\d\d\d\d?/),J("Hmm",/\d\d\d\d?/),J("Hmmss",/\d\d\d\d\d\d?/),re(["H","HH"],Yn),re(["k","kk"],function(e,t,r){var n=w(e);t[Yn]=24===n?0:n}),re(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),re(["h","hh"],function(e,t,r){t[Yn]=w(e),p(r).bigHour=!0}),re("hmm",function(e,t,r){var n=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n)),p(r).bigHour=!0}),re("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n,2)),t[$n]=w(e.substr(i)),p(r).bigHour=!0}),re("Hmm",function(e,t,r){var n=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n))}),re("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n,2)),t[$n]=w(e.substr(i))});var di,pi=z("Hours",!0),bi={calendar:Cn,longDateFormat:On,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:Tn,months:ti,monthsShort:ri,week:ai,weekdays:si,weekdaysMin:ci,weekdaysShort:ui,meridiemParse:/[ap]\.?m?\.?/i},vi={},yi={},gi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_i=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mi=/Z|[+-]\d\d(?::?\d\d)?/,wi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Si=/^\/?Date\((\-?\d+)/i,ki=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Ei=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=mt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:v()}),Ai=function(){return Date.now?Date.now():+new Date},Mi=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ot("Z",":"),Ot("ZZ",""),J("Z",Un),J("ZZ",Un),re(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Tt(Un,e)});var Ci=/([\+\-]|\d\d)/gi;r.updateOffset=function(){};var Oi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ti=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Gt.fn=At.prototype,Gt.invalid=jt;var Ri=$t(1,"add"),Ii=$t(-1,"subtract");r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Pi=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Or("gggg","weekYear"),Or("ggggg","weekYear"),Or("GGGG","isoWeekYear"),Or("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),J("G",/[+-]?\d+/),J("g",/[+-]?\d+/),J("GG",/\d\d?/,/\d\d/),J("gg",/\d\d?/,/\d\d/),J("GGGG",/\d{1,4}/,/\d{4}/),J("gggg",/\d{1,4}/,/\d{4}/),J("GGGGG",/[+-]?\d{1,6}/,Ln),J("ggggg",/[+-]?\d{1,6}/,Ln),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=w(e)}),ne(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),B("quarter","Q"),F("quarter",7),J("Q",/\d/),re("Q",function(e,t){t[Gn]=3*(w(e)-1)}),Y("D",["DD",2],"Do","date"),B("date","D"),F("date",9),J("D",/\d\d?/),J("DD",/\d\d?/,/\d\d/),J("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),re(["D","DD"],Vn),re("Do",function(e,t){t[Vn]=w(e.match(/\d\d?/)[0],10)});var Di=z("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),F("dayOfYear",4),J("DDD",/\d{1,3}/),J("DDDD",/\d{3}/),re(["DDD","DDDD"],function(e,t,r){r._dayOfYear=w(e)}),Y("m",["mm",2],0,"minute"),B("minute","m"),F("minute",14),J("m",/\d\d?/),J("mm",/\d\d?/,/\d\d/),re(["m","mm"],Wn);var Bi=z("Minutes",!1);Y("s",["ss",2],0,"second"),B("second","s"),F("second",15),J("s",/\d\d?/),J("ss",/\d\d?/,/\d\d/),re(["s","ss"],$n);var Ni=z("Seconds",!1);Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),B("millisecond","ms"),F("millisecond",16),J("S",/\d{1,3}/,/\d/),J("SS",/\d{1,3}/,/\d\d/),J("SSS",/\d{1,3}/,/\d{3}/);var Li;for(Li="SSSS";Li.length<=9;Li+="S")J(Li,/\d+/);for(Li="S";Li.length<=9;Li+="S")re(Li,Fr);var Fi=z("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var Ui=g.prototype;Ui.add=Ri,Ui.calendar=Jt,Ui.clone=Qt,Ui.diff=ar,Ui.endOf=_r,Ui.format=lr,Ui.from=hr,Ui.fromNow=dr,Ui.to=pr,Ui.toNow=br,Ui.get=H,Ui.invalidAt=Mr,Ui.isAfter=er,Ui.isBefore=tr,Ui.isBetween=rr,Ui.isSame=nr,Ui.isSameOrAfter=ir,Ui.isSameOrBefore=or,Ui.isValid=jr,Ui.lang=Pi,Ui.locale=vr,Ui.localeData=yr,Ui.max=ji,Ui.min=Ei,Ui.parsingFlags=Ar,Ui.set=G,Ui.startOf=gr,Ui.subtract=Ii,Ui.toArray=Sr,Ui.toObject=kr,Ui.toDate=xr,Ui.toISOString=cr, -Ui.inspect=fr,Ui.toJSON=Er,Ui.toString=ur,Ui.unix=wr,Ui.valueOf=mr,Ui.creationData=Cr,Ui.year=oi,Ui.isLeapYear=ge,Ui.weekYear=Tr,Ui.isoWeekYear=Rr,Ui.quarter=Ui.quarters=Nr,Ui.month=le,Ui.daysInMonth=he,Ui.week=Ui.weeks=Me,Ui.isoWeek=Ui.isoWeeks=Ce,Ui.weeksInYear=Pr,Ui.isoWeeksInYear=Ir,Ui.date=Di,Ui.day=Ui.days=Ne,Ui.weekday=Le,Ui.isoWeekday=Fe,Ui.dayOfYear=Lr,Ui.hour=Ui.hours=pi,Ui.minute=Ui.minutes=Bi,Ui.second=Ui.seconds=Ni,Ui.millisecond=Ui.milliseconds=Fi,Ui.utcOffset=Pt,Ui.utc=Bt,Ui.local=Nt,Ui.parseZone=Lt,Ui.hasAlignedHourOffset=Ft,Ui.isDST=Ut,Ui.isLocal=qt,Ui.isUtcOffset=Kt,Ui.isUtc=Ht,Ui.isUTC=Ht,Ui.zoneAbbr=Ur,Ui.zoneName=zr,Ui.dates=k("dates accessor is deprecated. Use date instead.",Di),Ui.months=k("months accessor is deprecated. Use month instead",le),Ui.years=k("years accessor is deprecated. Use year instead",oi),Ui.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Dt),Ui.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zt);var zi=C.prototype;zi.calendar=O,zi.longDateFormat=T,zi.invalidDate=R,zi.ordinal=I,zi.preparse=Hr,zi.postformat=Hr,zi.relativeTime=P,zi.pastFuture=D,zi.set=A,zi.months=ae,zi.monthsShort=se,zi.monthsParse=ce,zi.monthsRegex=pe,zi.monthsShortRegex=de,zi.week=Ee,zi.firstDayOfYear=Ae,zi.firstDayOfWeek=je,zi.weekdays=Re,zi.weekdaysMin=Pe,zi.weekdaysShort=Ie,zi.weekdaysParse=Be,zi.weekdaysRegex=Ue,zi.weekdaysShortRegex=ze,zi.weekdaysMinRegex=qe,zi.isPM=We,zi.meridiem=$e,Qe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qe),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",rt);var qi=Math.abs,Ki=fn("ms"),Hi=fn("s"),Gi=fn("m"),Vi=fn("h"),Yi=fn("d"),Wi=fn("w"),$i=fn("M"),Xi=fn("y"),Zi=hn("milliseconds"),Ji=hn("seconds"),Qi=hn("minutes"),eo=hn("hours"),to=hn("days"),ro=hn("months"),no=hn("years"),io=Math.round,oo={ss:44,s:45,m:45,h:22,d:26,M:11},ao=Math.abs,so=At.prototype;return so.isValid=Et,so.abs=Qr,so.add=tn,so.subtract=rn,so.as=un,so.asMilliseconds=Ki,so.asSeconds=Hi,so.asMinutes=Gi,so.asHours=Vi,so.asDays=Yi,so.asWeeks=Wi,so.asMonths=$i,so.asYears=Xi,so.valueOf=cn,so._bubble=on,so.get=ln,so.milliseconds=Zi,so.seconds=Ji,so.minutes=Qi,so.hours=eo,so.days=to,so.weeks=dn,so.months=ro,so.years=no,so.humanize=gn,so.toISOString=_n,so.toString=_n,so.toJSON=_n,so.locale=vr,so.localeData=yr,so.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_n),so.lang=Pi,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),J("x",/[+-]?\d+/),J("X",/[+-]?\d+(\.\d{1,3})?/),re("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))}),re("x",function(e,t,r){r._d=new Date(w(e))}),r.version="2.18.1",function(e){mn=e}(mt),r.fn=Ui,r.min=xt,r.max=St,r.now=Ai,r.utc=h,r.unix=qr,r.months=Wr,r.isDate=u,r.locale=Qe,r.invalid=v,r.duration=Gt,r.isMoment=_,r.weekdays=Xr,r.parseZone=Kr,r.localeData=rt,r.isDuration=Mt,r.monthsShort=$r,r.weekdaysMin=Jr,r.defineLocale=et,r.updateLocale=tt,r.locales=nt,r.weekdaysShort=Zr,r.normalizeUnits=N,r.relativeTimeRounding=vn,r.relativeTimeThreshold=yn,r.calendarFormat=Zt,r.prototype=Ui,r})},{}],415:[function(e,t,r){(function(e){"use strict";var r,n;r=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},n=function(e){var t,n,i=document.createTextNode(""),o=0;return new e(function(){var e;if(t)n&&(t=n.concat(t));else{if(!n)return;t=n}if(n=t,t=null,"function"==typeof n)return e=n,n=null,void e();for(i.data=o=++o%2;n;)e=n.shift(),n.length||(n=null),e()}).observe(i,{characterData:!0}),function(e){if(r(e),t)return void("function"==typeof t?t=[t,e]:t.push(e));t=e,i.data=o=++o%2}},t.exports=function(){if("object"==typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return n(MutationObserver);if("function"==typeof WebKitMutationObserver)return n(WebKitMutationObserver)}return"function"==typeof setImmediate?function(e){setImmediate(r(e))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(e){setTimeout(r(e),0)}:null}()}).call(this,e("_process"))},{_process:425}],416:[function(e,t,r){t.exports={"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"}},{}],417:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.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())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.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())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var c=n.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())});r.EncryptedPrivateKey=c;var f=n.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())});r.DSAPrivateKey=f,r.DSAparam=n.define("DSAparam",function(){this.int()});var l=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=l;var h=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":418,"asn1.js":19}],418:[function(e,t,r){"use strict";var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(u)}),f=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),l=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),h=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":19}],419:[function(e,t,r){(function(r){var n=e("evp_bytestokey"),i=e("browserify-aes");t.exports=function(e,t){var o,a=e.toString(),s=a.match(/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m);if(s){var u="aes"+s[1],c=new r(s[2],"hex"),f=new r(s[3].replace(/\r?\n/g,""),"base64"),l=n(t,c.slice(0,8),parseInt(s[1],10)).key,h=[],d=i.createDecipheriv(u,l,c);h.push(d.update(f)),h.push(d.final()),o=r.concat(h)}else{o=new r(a.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m)[2].replace(/\r?\n/g,""),"base64")}return{tag:a.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m)[1],data:o}}}).call(this,e("buffer").Buffer)},{"browserify-aes":40,buffer:64,evp_bytestokey:150}],420:[function(e,t,r){(function(r){function n(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var n,a,u=s(e,t),c=u.tag,f=u.data;switch(c){case"CERTIFICATE":a=o.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=o.PublicKey.decode(f,"der")),n=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=o.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":f=o.EncryptedPrivateKey.decode(f,"der"),f=i(f,t);case"PRIVATE KEY":switch(a=o.PrivateKey.decode(f,"der"),n=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:o.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=o.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return f=o.ECPrivateKey.decode(f,"der"),{curve:f.parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+c)}}function i(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=a[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=c.pbkdf2Sync(t,n,i,l),d=u.createDecipheriv(o,h,s),p=[];return p.push(d.update(f)),p.push(d.final()),r.concat(p)}var o=e("./asn1"),a=e("./aesid.json"),s=e("./fixProc"),u=e("browserify-aes"),c=e("pbkdf2");t.exports=n,n.signature=o.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":416,"./asn1":417,"./fixProc":419,"browserify-aes":40,buffer:64,pbkdf2:421}],421:[function(e,t,r){(function(t,n){var i=e("create-hmac"),o=e("./precondition");r.pbkdf2=function(e,t,n,i,a,s){if("function"==typeof a&&(s=a,a=void 0),o(n,i),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");setTimeout(function(){s(null,r.pbkdf2Sync(e,t,n,i,a))})};var a;if(t.browser)a="utf-8";else{a=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}r.pbkdf2Sync=function(e,t,r,s,u){n.isBuffer(e)||(e=new n(e,a)),n.isBuffer(t)||(t=new n(t,a)),o(r,s),u=u||"sha1";var c,f=1,l=new n(s),h=new n(t.length+4);t.copy(h,0,0,t.length);for(var d,p,b=1;b<=f;b++){h.writeUInt32BE(b,t.length);var v=i(u,e).update(h).digest();c||(c=v.length,p=new n(c),f=Math.ceil(s/c),d=s-(f-1)*c),v.copy(p,0,0,c);for(var y=1;yn||t!==t)throw new TypeError("Bad key length")}},{}],423:[function(e,t,r){(function(){var e=[].slice,n={}.hasOwnProperty;!function(e,n){"function"==typeof define&&define.amd?define(function(){return e.PinejsClientCore=n()}):"object"==typeof r?t.exports=n():e.PinejsClientCore=n()}(this,function(){var t,r,i;return i=function(){},r={},t=function(e,t){return r[e]=function(){return console.warn("pinejs-client deprecated:",t),r[e]=i}},t("expandObject","`$expand: a: b: ...` is deprecated, please use `$expand: a: $expand: b: ...` instead."),t("expandPrimitive",'`$expand: a: "b"` is deprecated, please use `$expand: a: $expand: "b"` instead.'),t("expandFilter",'`$filter: a: b: ...` is deprecated, please use `$filter: a: $any: { $alias: "x", $expr: x: b: ... }` instead.'),function(t,i){var o,a,s,u,c,f,l,h,d,p;return function(){var e,r,n,o;for(o=["isString","isNumber","isBoolean","isObject","isArray","isDate"],e=0,r=o.length;e1?"(("+n+"))":r?"("+n+")":n},o=function(e,t,r){return null==r&&(r=" eq "),null!=t?f(t)+r+e:e},a=function(e,t,r){var n,i;for(n in t)i=t[n],i="("+c(i)+")",i=i.replace(/\$/g,"$$$$"),e=e.replace(new RegExp("\\$"+n+"([^a-zA-Z0-9]|$)","g"),i+"$1");return o(e,r)},c=function(){var i,u,d;return d=function(n,d,p){var b,v,y,g,_,m,w,x,S,k,E,j;switch(p=p.slice(1)){case"ne":case"eq":case"gt":case"ge":case"lt":case"le":case"add":case"sub":case"mul":case"div":case"mod":if(p=" "+p+" ",h(n))return n=l(n),o(n,d,p);if(t.isArray(n))return n=i(n),n=s(n,p),o(n,d);if(t.isObject(n)){if(j=u(n),j.length<1)throw new Error(p+" objects must have at least 1 property, got: "+JSON.stringify(n));return 1===j.length?o(j[0],d,p):(n=s(j,p),o(n,d))}throw new Error("Expected null/string/number/bool/obj/array, got: "+typeof n);case"contains":case"endswith":case"startswith":case"length":case"indexof":case"substring":case"tolower":case"toupper":case"trim":case"concat":case"year":case"month":case"day":case"hour":case"minute":case"second":case"fractionalseconds":case"date":case"time":case"totaloffsetminutes":case"now":case"maxdatetime":case"mindatetime":case"totalseconds":case"round":case"floor":case"ceiling":case"isof":case"cast":if(h(n))return x=[],null!=d&&x.push(f(d)),x.push(l(n)),p+"("+x.join()+")";if(t.isArray(n))return n=i(n),n=s(n,",",!0),n=p+n,o(n,d);if(t.isObject(n))return j=u(n),n=s(j,",",!0),n=p+n,o(n,d);throw new Error("Expected null/string/number/obj/array, got: "+typeof n);case"raw":if(t.isString(n))return o(n,d);if(t.isArray(n)){if(E=n,n=E[0],k=2<=E.length?e.call(E,1):[],!t.isString(n))throw new Error("First element of array for $"+p+" must be a string, got: "+typeof n);for(w={},_=g=0,m=k.length;g0&&r.expandFilter(),i=t.concat(i)),o.push(c(a,i))));return o},i=function(e,t,r){var n,i,o,a;if(null==r&&(r=2),e.length0&&r.expandPrimitive(),f(o.concat(n))):t.isArray(n)?(n=e(n,o),n=d(n)):t.isObject(n)?(n=i(n,o),d(n)):void 0}}(),p=["apiPrefix","passthrough","passthroughByMethod"],function(){function e(e,r){var n,i,o;if(t.isString(e)&&(e={apiPrefix:e}),t.isObject(e))for(n=0,i=p.length;n1)throw new Error("Returned multiple results when only one was expected.");return e.d[0]}return e.d})},e.prototype.put=function(e){return this.request(e,{method:"PUT"})},e.prototype.patch=function(e){return this.request(e,{method:"PATCH"})},e.prototype.post=function(e){return this.request(e,{method:"POST"})},e.prototype.delete=function(e){return this.request(e,{method:"DELETE"})},e.prototype.compile=function(e){var r,i,o,a,s,f;if(t.isString(e))return e;if(null!=e.url)return e.url;if(null==e.resource)throw new Error("Either the url or resource must be specified.");if(s=e.resource,e.hasOwnProperty("id")){if(null==e.id)throw new Error("If the id property is set it must be non-null");s+="("+l(e.id)+")"}if(i=[],null!=e.options){o=e.options;for(r in o)n.call(o,r)&&(f=o[r],f=function(){switch(r){case"filter":return c(f);case"expand":return u(f);default:if(t.isString(f)||t.isArray(f))return d(f);throw new Error("'"+r+"' option has no special handling so must be either a string or array")}}(),i.push("$"+r+"="+f))}if(null!=e.customOptions){a=e.customOptions;for(r in a)n.call(a,r)&&(f=a[r],i.push(r+"="+f))}return i.length>0&&(s+="?"+i.join("&")),s},e.prototype.request=function(e,r){var o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m;null==r&&(r={});try{for(l=e.method,a=e.body,b=e.passthrough,null==b&&(b={}),t.isString(e)&&(l="GET"),o=null!=(v=e.apiPrefix)?v:this.apiPrefix,_=o+this.compile(e),l=null!=(y=null!=l?l:r.method)?y:"GET",l=l.toUpperCase(),f=[this.passthrough,null!=(g=this.passthroughByMethod[l])?g:{},null!=b?b:{},{method:l,url:_,body:a},r],p={},u=0,c=f.length;u1)for(var r=1;r=0;r--)t.push(JSON.stringify(e[r]));return t.join("")}};t.exports=function(e){if(void 0===e)return i.simple;if("string"==typeof e&&i.hasOwnProperty(e))return i[e];if(Array.isArray(e))return n(e);if("[object Function]"===Object.prototype.toString.call(e))return e;throw new Error("promise-memoize: invalid resolve option")}},{}],429:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":431,"./publicEncrypt":432}],430:[function(e,t,r){(function(r){function n(e){var t=new r(4);return t.writeUInt32BE(e,0),t}var i=e("create-hash");t.exports=function(e,t){for(var o,a=new r(""),s=0;a.length=t.length){o++;break}var a=t.slice(2,i-1);t.slice(i-1,i);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}function o(e,t){e=new r(e),t=new r(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));for(var o=-1;++ol||new c(t).cmp(u.modulus)>=0)throw new Error("decryption error");var d;d=o?h(new c(t),u):f(t,u);var p=new r(l-d.length);if(p.fill(0),d=r.concat([p,d],l),4===s)return n(u,d);if(1===s)return i(u,d,o);if(3===s)return d;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":430,"./withPublic":433,"./xor":434,"bn.js":35,"browserify-rsa":56,buffer:64,"create-hash":68,"parse-asn1":420}],432:[function(e,t,r){(function(r){function n(e,t){var n=e.modulus.byteLength(),i=t.length,o=u("sha1").update(new r("")).digest(),a=o.length,h=2*a;if(i>n-h-2)throw new Error("message too long");var d=new r(n-i-h-2);d.fill(0);var p=n-a-1,b=s(a),v=f(r.concat([o,d,new r([1]),t],p),c(b,p)),y=f(b,c(v,a));return new l(r.concat([new r([0]),y,v],n))}function i(e,t,n){var i=t.length,a=e.modulus.byteLength();if(i>a-11)throw new Error("message too long");var s;return n?(s=new r(a-i-3),s.fill(255)):s=o(a-i-3),new l(r.concat([new r([0,n?1:2]),s,new r([0]),t],a))}function o(e,t){for(var n,i=new r(e),o=0,a=s(2*e),u=0;o=0)throw new Error("data too long for modulus")}return r?d(s,u):h(s,u)}}).call(this,e("buffer").Buffer)},{"./mgf":430,"./withPublic":433,"./xor":434,"bn.js":35,"browserify-rsa":56,buffer:64,"create-hash":68,"parse-asn1":420,randombytes:445}],433:[function(e,t,r){(function(r){function n(e,t){return new r(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}var i=e("bn.js");t.exports=n}).call(this,e("buffer").Buffer)},{"bn.js":35,buffer:64}],434:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++nc)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=l,f=h,u=a,l+=122192928e5;var p=(1e4*(268435455&l)+h)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var b=l/4294967296*1e4&268435455;i[n++]=b>>>8&255,i[n++]=255&b,i[n++]=b>>>24&15|16,i[n++]=b>>>16&255,i[n++]=a>>>8|128,i[n++]=255&a;for(var v=e.node||s,y=0;y<6;++y)i[n+y]=v[y];return t?t:o(i)}var i=r(4),o=r(5),a=i(),s=[1|a[0],a[1],a[2],a[3],a[4],a[5]],u=16383&(a[6]<<8|a[7]),c=0,f=0;e.exports=n},function(e,t){(function(t){var r,n=t.crypto||t.msCrypto;if(n&&n.getRandomValues){var i=new Uint8Array(16);r=function(){return n.getRandomValues(i),i}}if(!r){var o=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=r}).call(t,function(){return this}())},function(e,t){function r(e,t){var r=t||0,i=n;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=r},function(e,t,r){function n(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[n+s]=a[s];return t||o(a)}var i=r(4),o=r(5);e.exports=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r>>2]|=(r[i>>>2]>>>24-i%4*8&255)<<24-(n+i)%4*8;else if(65535>>2]=r[i>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n>>2]>>>24-n%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},f=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*o,i=e.min(4*t,i),t){for(var u=0;uf;){var l;e:{l=c;for(var h=e.sqrt(l),d=2;d<=h;d++)if(!(l%d)){l=!1;break e}l=!0}l&&(8>f&&(a[f]=u(e.pow(c,.5))),s[f]=u(e.pow(c,1/3)),f++),c++}var p=[],n=n.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],u=r[4],c=r[5],f=r[6],l=r[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var d=p[h-15],b=p[h-2];p[h]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+p[h-7]+((b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10)+p[h-16]}d=l+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&f)+s[h]+p[h],b=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),l=f,f=c,c=u,u=a+d|0,a=o,o=i,i=n,n=d+b|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(n),t.HmacSHA256=o._createHmacHelper(n)}(Math),function(){var e=r,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,i=4*n;r.sigBytes>i&&(r=e.finalize(r)),r.clamp();for(var o=this._oKey=r.clone(),a=this._iKey=r.clone(),s=o.words,u=a.words,c=0;c>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a>>6*(3-a)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map,i=n.charAt(64);i&&-1!=(i=e.indexOf(i))&&(r=i);for(var i=[],o=0,a=0;a>>6-a%4*2;i[o>>>2]|=(s|u)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,r,n,i,o,a){return((e=e+(t&r|~t&n)+i+a)<>>32-o)+t}function n(e,t,r,n,i,o,a){return((e=e+(t&n|r&~n)+i+a)<>>32-o)+t}function i(e,t,r,n,i,o,a){return((e=e+(t^r^n)+i+a)<>>32-o)+t}function o(e,t,r,n,i,o,a){return((e=e+(r^(t|~n))+i+a)<>>32-o)+t}for(var a=r,s=a.lib,u=s.WordArray,c=s.Hasher,s=a.algo,f=[],l=0;64>l;l++)f[l]=4294967296*e.abs(e.sin(l+1))|0;s=s.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,r){for(var a=0;16>a;a++){var s=r+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var a=this._hash.words,s=e[r+0],u=e[r+1],c=e[r+2],l=e[r+3],h=e[r+4],d=e[r+5],p=e[r+6],b=e[r+7],v=e[r+8],y=e[r+9],g=e[r+10],_=e[r+11],m=e[r+12],w=e[r+13],x=e[r+14],S=e[r+15],k=a[0],E=a[1],j=a[2],A=a[3],k=t(k,E,j,A,s,7,f[0]),A=t(A,k,E,j,u,12,f[1]),j=t(j,A,k,E,c,17,f[2]),E=t(E,j,A,k,l,22,f[3]),k=t(k,E,j,A,h,7,f[4]),A=t(A,k,E,j,d,12,f[5]),j=t(j,A,k,E,p,17,f[6]),E=t(E,j,A,k,b,22,f[7]),k=t(k,E,j,A,v,7,f[8]),A=t(A,k,E,j,y,12,f[9]),j=t(j,A,k,E,g,17,f[10]),E=t(E,j,A,k,_,22,f[11]),k=t(k,E,j,A,m,7,f[12]),A=t(A,k,E,j,w,12,f[13]),j=t(j,A,k,E,x,17,f[14]),E=t(E,j,A,k,S,22,f[15]),k=n(k,E,j,A,u,5,f[16]),A=n(A,k,E,j,p,9,f[17]),j=n(j,A,k,E,_,14,f[18]),E=n(E,j,A,k,s,20,f[19]),k=n(k,E,j,A,d,5,f[20]),A=n(A,k,E,j,g,9,f[21]),j=n(j,A,k,E,S,14,f[22]),E=n(E,j,A,k,h,20,f[23]),k=n(k,E,j,A,y,5,f[24]),A=n(A,k,E,j,x,9,f[25]),j=n(j,A,k,E,l,14,f[26]),E=n(E,j,A,k,v,20,f[27]),k=n(k,E,j,A,w,5,f[28]),A=n(A,k,E,j,c,9,f[29]),j=n(j,A,k,E,b,14,f[30]),E=n(E,j,A,k,m,20,f[31]),k=i(k,E,j,A,d,4,f[32]),A=i(A,k,E,j,v,11,f[33]),j=i(j,A,k,E,_,16,f[34]),E=i(E,j,A,k,x,23,f[35]),k=i(k,E,j,A,u,4,f[36]),A=i(A,k,E,j,h,11,f[37]),j=i(j,A,k,E,b,16,f[38]),E=i(E,j,A,k,g,23,f[39]),k=i(k,E,j,A,w,4,f[40]),A=i(A,k,E,j,s,11,f[41]),j=i(j,A,k,E,l,16,f[42]),E=i(E,j,A,k,p,23,f[43]),k=i(k,E,j,A,y,4,f[44]),A=i(A,k,E,j,m,11,f[45]),j=i(j,A,k,E,S,16,f[46]),E=i(E,j,A,k,c,23,f[47]),k=o(k,E,j,A,s,6,f[48]),A=o(A,k,E,j,b,10,f[49]),j=o(j,A,k,E,x,15,f[50]),E=o(E,j,A,k,d,21,f[51]),k=o(k,E,j,A,m,6,f[52]),A=o(A,k,E,j,l,10,f[53]),j=o(j,A,k,E,g,15,f[54]),E=o(E,j,A,k,u,21,f[55]),k=o(k,E,j,A,v,6,f[56]),A=o(A,k,E,j,S,10,f[57]),j=o(j,A,k,E,p,15,f[58]),E=o(E,j,A,k,w,21,f[59]),k=o(k,E,j,A,h,6,f[60]),A=o(A,k,E,j,_,10,f[61]),j=o(j,A,k,E,c,15,f[62]),E=o(E,j,A,k,y,21,f[63]);a[0]=a[0]+k|0,a[1]=a[1]+E|0,a[2]=a[2]+j|0,a[3]=a[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296);for(r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(r.length+1),this._process(),t=this._hash,r=t.words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),a.MD5=c._createHelper(s),a.HmacMD5=c._createHmacHelper(s)}(Math),function(){var e=r,t=e.lib,n=t.Base,i=t.WordArray,t=e.algo,o=t.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),o=i.create(),a=o.words,s=r.keySize,r=r.iterations;a.length>>2]}},n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:h}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=e.createEncryptor;else r=e.createDecryptor,this._minBufferSize=1;this._mode=r.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),f=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?o.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){e=s.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var r=o.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:r})}},p=n.SerializableCipher=i.extend({cfg:i.extend({format:f}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n);return t=i.finalize(t),i=i.cfg,d.create({ciphertext:t,key:r,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){return n||(n=o.random(8)),e=u.create({keySize:t+r}).compute(e,n),r=o.create(e.words.slice(t),4*r),e.sigBytes=4*t,d.create({key:e,iv:r,salt:n})}},b=n.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:t}),encrypt:function(e,t,r,n){return n=this.cfg.extend(n),r=n.kdf.execute(r,e.keySize,e.ivSize),n.iv=r.iv,e=p.encrypt.call(this,e,t,r.key,n),e.mixIn(r),e},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),r=n.kdf.execute(r,e.keySize,e.ivSize,t.salt),n.iv=r.iv,p.decrypt.call(this,e,t,r.key,n)}})}(),function(){for(var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],f=[],l=[],h=[],d=[],p=[],b=0;256>b;b++)p[b]=128>b?b<<1:b<<1^283;for(var v=0,y=0,b=0;256>b;b++){var g=y^y<<1^y<<2^y<<3^y<<4,g=g>>>8^255&g^99;i[v]=g,o[g]=v;var _=p[v],m=p[_],w=p[m],x=257*p[g]^16843008*g;a[v]=x<<24|x>>>8,s[v]=x<<16|x>>>16,u[v]=x<<8|x>>>24,c[v]=x,x=16843009*w^65537*m^257*_^16843008*v,f[g]=x<<24|x>>>8,l[g]=x<<16|x>>>16,h[g]=x<<8|x>>>24,d[g]=x,v?(v=_^p[p[p[w^_]]],y^=p[p[y]]):v=y=1}var S=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes/4,e=4*((this._nRounds=r+6)+1),n=this._keySchedule=[],o=0;o>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=a<<8|a>>>24,a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=S[o/r|0]<<24),n[o]=n[o-r]^a}for(t=this._invKeySchedule=[],r=0;rr||4>=o?a:f[i[a>>>24]]^l[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,l,h,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],f=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&h]^r[d++],v=n[f>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&c]^r[d++],y=n[l>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&f]^r[d++],h=n[h>>>24]^i[c>>>16&255]^o[f>>>8&255]^a[255&l]^r[d++],c=b,f=v,l=y;b=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],v=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[d++],y=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^r[d++],h=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[d++],e[t]=b,e[t+1]=v,e[t+2]=y,e[t+3]=h},keySize:8});e.AES=t._createHelper(n)}(),r.mode.ECB=function(){var e=r.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,r,n){var i=s.default.post(this.getStandardOrigin()+r.url).query(e).send(t);return this._abstractedXDR(i,r,n)}},{key:"GET",value:function(e,t,r){var n=s.default.get(this.getStandardOrigin()+t.url).query(e);return this._abstractedXDR(n,t,r)}},{key:"_abstractedXDR",value:function(e,t,r){var n=this;return this._config.logVerbosity&&(e=e.use(this._attachSuperagentLogger)),this._config.proxy&&(e=e.proxy(this._config.proxy)),this._config.keepAlive&&this._agentKeepAlive&&(e=this._agentKeepAlive(e)),e.timeout(t.timeout).end(function(e,i){var o={};return o.error=null!==e,o.operation=t.operation,i&&i.status&&(o.statusCode=i.status),e?(o.errorData=e,o.category=n._detectErrorCategory(e),r(o,null)):r(o,JSON.parse(i.text))})}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return f.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return f.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return f.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return f.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return f.default.PNNetworkIssuesCategory;if(e.timeout)return f.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return f.default.PNBadRequestCategory;if(e.response.forbidden)return f.default.PNAccessDeniedCategory}return f.default.PNUnknownCategory}},{key:"_attachSuperagentLogger",value:function(e){var t=(new Date).getTime(),r=(new Date).toISOString(),n=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();n.log("<<<<<"),n.log("["+r+"]","\n",e.url,"\n",e.qs),n.log("-----"),e.on("response",function(r){var i=(new Date).getTime(),o=i-t,a=(new Date).toISOString();n.log(">>>>>>"),n.log("["+a+" / "+o+"]","\n",e.url,"\n",e.qs,"\n",r.text),n.log("-----")})}}]),e}());t.default=l,e.exports=t.default},function(e,t,r){function n(){}function i(e){if(!y(e))return e;var t=[];for(var r in e)o(t,r,e[r]);return t.join("&")}function o(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){o(e,t,r)});else if(y(r))for(var n in r)o(e,t+"["+n+"]",r[n]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function a(e){for(var t,r,n={},i=e.split("&"),o=0,a=i.length;o=300)&&(n=new Error(t.statusText||"Unsuccessful HTTP response"),n.original=e,n.response=t,n.status=t.status)}catch(e){n=e}n?r.callback(n,t):r.callback(null,t)})}function d(e,t){var r=g("DELETE",e);return t&&r.end(t),r}var p;"undefined"!=typeof window?p=window:"undefined"!=typeof self?p=self:(console.warn("Using browser-only version of superagent in non-browser environment"),p=this);var b=r(13),v=r(14),y=r(15),g=e.exports=r(16).bind(null,h);g.getXHR=function(){if(!(!p.XMLHttpRequest||p.location&&"file:"==p.location.protocol&&p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};g.serializeObject=i,g.parseString=a,g.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},g.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},g.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},l.prototype.get=function(e){return this.header[e.toLowerCase()]},l.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var r=f(t);for(var n in r)this[n]=r[n]},l.prototype._parseBody=function(e){var t=g.parse[this.type];return!t&&u(this.type)&&(t=g.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},l.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},l.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",i=new Error(n);return i.status=this.status,i.method=t,i.url=r,i},g.Response=l,b(h.prototype);for(var m in v)h.prototype[m]=v[m];h.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},h.prototype.responseType=function(e){return this._responseType=e,this},h.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},h.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var n=btoa(e+":"+t);this.set("Authorization","Basic "+n);break;case"auto":this.username=e,this.password=t}return this},h.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},h.prototype.end=function(e){var t=this,r=this.xhr=g.getXHR(),i=this._timeout,o=this._formData||this._data;this._callback=e||n,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var a=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{r.onprogress=a.bind(null,"download"),r.upload&&(r.upload.onprogress=a.bind(null,"upload"))}catch(e){}if(i&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},i)),this._appendQueryString(),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof o&&!this._isHost(o)){var s=this._header["content-type"],c=this._serializer||g.serialize[s?s.split(";")[0]:""];!c&&u(s)&&(c=g.serialize["application/json"]),c&&(o=c(o))}for(var f in this.header)null!=this.header[f]&&r.setRequestHeader(f,this.header[f]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==o?o:null),this},g.Request=h,g.get=function(e,t,r){var n=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},g.head=function(e,t,r){var n=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.options=function(e,t,r){var n=g("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.del=d,g.delete=d,g.patch=function(e,t,r){var n=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.post=function(e,t,r){var n=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.put=function(e,t,r){var n=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},function(e,t,r){function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,i=0;i=o){var a={};a.category=p.default.PNRequestMessageCountExceededCategory,a.operation=e.operation,this._listenerManager.announceStatus(a)}i.forEach(function(e){var t=e.channel,n=e.subscriptionMatch,i=e.publishMetaData;if(t===n&&(n=null),h.default.endsWith(e.channel,"-pnpres")){var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=n?t:null,o.subscribedChannel=null!=n?n:t,t&&(o.channel=t.substring(0,t.lastIndexOf("-pnpres"))),n&&(o.subscription=n.substring(0,n.lastIndexOf("-pnpres"))),o.action=e.payload.action,o.state=e.payload.data,o.timetoken=i.publishTimetoken,o.occupancy=e.payload.occupancy,o.uuid=e.payload.uuid,o.timestamp=e.payload.timestamp,r._listenerManager.announcePresence(o)}else{var a={};a.channel=null,a.subscription=null,a.actualChannel=null!=n?t:null,a.subscribedChannel=null!=n?n:t,a.channel=t,a.subscription=n,a.timetoken=i.publishTimetoken,a.publisher=e.issuingClientId,r._config.cipherKey?a.message=r._crypto.decrypt(e.payload):a.message=e.payload,r._listenerManager.announceMessage(a)}}),this._region=t.metadata.region,this._timetoken=t.metadata.timetoken,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&(this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/leave"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i={};return n.length>0&&(i["channel-group"]=n.join(",")),i}function f(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(){return l.default.PNWhereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var r=e.config,n=t.uuid,i=void 0===n?r.UUID:n;return"/v2/presence/sub-key/"+r.subscribeKey+"/uuid/"+i}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNHeartbeatOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/heartbeat"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i=t.state,o=void 0===i?{}:i,a=e.config,s={};return n.length>0&&(s["channel-group"]=n.join(",")),s.state=JSON.stringify(o),s.heartbeat=a.getPresenceTimeout(),s}function f(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNGetStateOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.uuid,i=void 0===n?r.UUID:n,o=t.channels,a=void 0===o?[]:o,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(s)+"/uuid/"+i}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i={};return n.length>0&&(i["channel-group"]=n.join(",")),i}function f(e,t,r){var n=r.channels,i=void 0===n?[]:n,o=r.channelGroups,a=void 0===o?[]:o,s={};return 1===i.length&&0===a.length?s[i[0]]=t.payload:s=t.payload,{channels:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNSetStateOperation}function o(e,t){var r=e.config,n=t.state,i=t.channels,o=void 0===i?[]:i,a=t.channelGroups,s=void 0===a?[]:a;return n?r.subscribeKey?0===o.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/uuid/"+r.UUID+"/data"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.state,n=t.channelGroups,i=void 0===n?[]:n,o={};return o.state=JSON.stringify(r),i.length>0&&(o["channel-group"]=i.join(",")),o}function f(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNHereNowOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=t.channelGroups,a=void 0===o?[]:o,s="/v2/presence/sub-key/"+r.subscribeKey;if(i.length>0||a.length>0){var u=i.length>0?i.join(","):",";s+="/channel/"+p.default.encodeString(u)}return s}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i=t.includeUUIDs,o=void 0===i||i,a=t.includeState,s=void 0!==a&&a,u={};return o||(u.disable_uuids=1),s&&(u.state=1),n.length>0&&(u["channel-group"]=n.join(",")),u}function f(e,t,r){var n=r.channels,i=void 0===n?[]:n,o=r.channelGroups,a=void 0===o?[]:o,s=r.includeUUIDs,u=void 0===s||s,c=r.includeState,f=void 0!==c&&c;return i.length>1||a.length>0||0===a.length&&0===i.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(r){var n=t.payload.channels[r],i=[];return e.channels[r]={occupants:i,name:r,occupancy:n.occupancy},u&&n.uuids.forEach(function(e){f?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e}():function(){var e={},r=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:r,name:i[0],occupancy:t.occupancy},u&&t.uuids.forEach(function(e){f?r.push({state:e.state,uuid:e.uuid}):r.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(){return l.default.PNAccessManagerAudit}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var r=t.channel,n=t.channelGroup,i=t.authKeys,o=void 0===i?[]:i,a={};return r&&(a.channel=r),n&&(a["channel-group"]=n),o.length>0&&(a.auth=o.join(",")),a}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(){return l.default.PNAccessManagerGrant}function i(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function o(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var r=t.channels,n=void 0===r?[]:r,i=t.channelGroups,o=void 0===i?[]:i,a=t.ttl,s=t.read,u=void 0!==s&&s,c=t.write,f=void 0!==c&&c,l=t.manage,h=void 0!==l&&l,d=t.authKeys,p=void 0===d?[]:d,b={};return b.r=u?"1":"0",b.w=f?"1":"0",b.m=h?"1":"0",n.length>0&&(b.channel=n.join(",")),o.length>0&&(b["channel-group"]=o.join(",")),p.length>0&&(b.auth=p.join(",")),(a||0===a)&&(b.ttl=a),b}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.crypto,n=e.config,i=JSON.stringify(t);return n.cipherKey&&(i=r.encrypt(i),i=JSON.stringify(i)),i}function o(){return y.default.PNPublishOperation}function a(e,t){var r=e.config,n=t.message;return t.channel?n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function s(e,t){var r=t.sendByPost;return void 0!==r&&r}function u(e,t){var r=e.config,n=t.channel,o=t.message,a=i(e,o);return"/publish/"+r.publishKey+"/"+r.subscribeKey+"/0/"+_.default.encodeString(n)+"/0/"+_.default.encodeString(a)}function c(e,t){var r=e.config,n=t.channel;return"/publish/"+r.publishKey+"/"+r.subscribeKey+"/0/"+_.default.encodeString(n)+"/0"}function f(e){return e.config.getTransactionTimeout()}function l(){return!0}function h(e,t){return i(e,t.message)}function d(e,t){var r=t.meta,n=t.replicate,i=void 0===n||n,o=t.storeInHistory,a=t.ttl,s={};return null!=o&&(s.store=o?"1":"0"),a&&(s.ttl=a),i===!1&&(s.norep="true"),r&&"object"===(void 0===r?"undefined":b(r))&&(s.meta=JSON.stringify(r)),s}function p(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=o,t.validateParams=a,t.usePost=s,t.getURL=u,t.postURL=c,t.getRequestTimeout=f,t.isAuthSupported=l,t.postPayload=h,t.prepareParams=d,t.handleResponse=p;var v=(r(8),r(22)),y=n(v),g=r(23),_=n(g)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.config,n=e.crypto;if(!r.cipherKey)return t;try{return n.decrypt(t)}catch(e){return t}}function o(){return d.default.PNHistoryOperation}function a(e,t){var r=t.channel,n=e.config;return r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function s(e,t){var r=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+b.default.encodeString(r)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function f(e,t){var r=t.start,n=t.end,i=t.reverse,o=t.count,a=void 0===o?100:o,s=t.stringifiedTimeToken,u=void 0!==s&&s,c={include_token:"true"};return c.count=a,r&&(c.start=r),n&&(c.end=n),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function l(e,t){var r={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var n={timetoken:t.timetoken,entry:i(e,t.message)};r.messages.push(n)}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=f,t.handleResponse=l;var h=(r(8),r(22)),d=n(h),p=r(23),b=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.config,n=e.crypto;if(!r.cipherKey)return t;try{return n.decrypt(t)}catch(e){return t}}function o(){return d.default.PNFetchMessagesOperation}function a(e,t){var r=t.channels,n=e.config;return r&&0!==r.length?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function s(e,t){var r=t.channels,n=void 0===r?[]:r,i=e.config,o=n.length>0?n.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+b.default.encodeString(o)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function f(e,t){var r=t.start,n=t.end,i=t.count,o={};return i&&(o.max=i),r&&(o.start=r),n&&(o.end=n),o}function l(e,t){var r={channels:{}};return Object.keys(t.channels||{}).forEach(function(n){r.channels[n]=[],(t.channels[n]||[]).forEach(function(t){var o={};o.channel=n,o.subscription=null,o.timetoken=t.timetoken,o.message=i(e,t.message),r.channels[n].push(o)})}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=f,t.handleResponse=l;var h=(r(8),r(22)),d=n(h),p=r(23),b=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNSubscribeOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/subscribe/"+r.subscribeKey+"/"+p.default.encodeString(o)+"/0"}function s(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var r=e.config,n=t.channelGroups,i=void 0===n?[]:n,o=t.timetoken,a=t.filterExpression,s=t.region,u={heartbeat:r.getPresenceTimeout()};return i.length>0&&(u["channel-group"]=i.join(",")),a&&a.length>0&&(u["filter-expr"]=a),o&&(u.tt=o),s&&(u.tr=s),u}function f(e,t){var r=[];return t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},n={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:t};r.push(n)}),{messages:r,metadata:{timetoken:t.t.t,region:t.t.r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return!(!navigator||!navigator.sendBeacon)&&void navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(11),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{sendBeaconModule:a}))}return o(t,e),t}(u.default);t.default=c,e.exports=t.default}])})},{}],436:[function(e,t,r){(function(e){!function(n){function i(e){throw new RangeError(I[e])}function o(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function a(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(R,"."),n+o(e.split("."),t).join(".")}function s(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=B(e>>>10&1023|55296),e=56320|1023&e),t+=B(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?D(e/j):e>>1,e+=D(e/t);e>P*k>>1;n+=x)e=D(e/P);return D(n+(P+1)*e/(e+E))}function h(e){var t,r,n,o,a,s,f,h,d,p,b=[],v=e.length,y=0,g=M,_=A;for(r=e.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&i("not-basic"),b.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=v&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=x||h>D((w-y)/s))&&i("overflow"),y+=h*s,d=f<=_?S:f>=_+k?k:f-_,!(hD(w/p)&&i("overflow"),s*=p;t=b.length+1,_=l(y-a,t,0==a),D(y/t)>w-g&&i("overflow"),g+=D(y/t),y%=t,b.splice(y++,0,g)}return u(b)}function d(e){var t,r,n,o,a,u,c,h,d,p,b,v,y,g,_,m=[];for(e=s(e),v=e.length,t=M,r=0,a=A,u=0;u=t&&bD((w-r)/y)&&i("overflow"),r+=(c-t)*y,t=c,u=0;uw&&i("overflow"),b==t){for(h=r,d=x;p=d<=a?S:d>=a+k?k:d-a,!(h= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=x-S,D=Math.floor,B=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:s,encode:u},decode:h,encode:d,toASCII:b,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return _});else if(v&&y)if(t.exports==v)y.exports=_;else for(m in _)_.hasOwnProperty(m)&&(v[m]=_[m]);else n.punycode=_}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],437:[function(e,t,r){"use strict";var n=String.prototype.replace;t.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,/%20/g,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],438:[function(e,t,r){"use strict";var n=e("./stringify"),i=e("./parse"),o=e("./formats");t.exports={formats:o,parse:i,stringify:n}},{"./formats":437,"./parse":439,"./stringify":440}],439:[function(e,t,r){"use strict";var n=e("./utils"),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),o=0;o=0&&r.parseArrays&&a<=r.arrayLimit?(n=[],n[a]=s(e,t,r)):n[o]=s(e,t,r)}return n},u=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(n),c=u?n.slice(0,u.index):n,f=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var l=0;null!==(u=a.exec(n))&&l=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var o=[],a=0;a0&&u>s&&(u=s);for(var c=0;c=0?(f=p.substr(0,b),l=p.substr(b+1)):(f=p,l=""),h=decodeURIComponent(f),d=decodeURIComponent(l),n(a,h)?i(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],443:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var o=new r.Uint8Array(t);t>0&&a.getRandomValues(o);var s=new n(o.buffer);return"function"==typeof i?e.nextTick(function(){i(null,s)}):s}var a=r.crypto||r.msCrypto;a&&a.getRandomValues?t.exports=o:t.exports=i}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:425,buffer:64}],446:[function(e,t,r){t.exports=e("./lib/randomstring")},{"./lib/randomstring":448}],447:[function(e,t,r){function n(){this.chars=""}var i=e("array-uniq");n.prototype.setType=function(e){var t,r="abcdefghijklmnopqrstuvwxyz",n=r.toUpperCase();t="alphanumeric"===e?"0123456789"+r+n:"numeric"===e?"0123456789":"alphabetic"===e?r+n:"hex"===e?"0123456789abcdef":e,this.chars=t},n.prototype.removeUnreadable=function(){this.chars=this.chars.replace(/[0OIl]/g,"")},n.prototype.setcapitalization=function(e){"uppercase"===e?this.chars=this.chars.toUpperCase():"lowercase"===e&&(this.chars=this.chars.toLowerCase())},n.prototype.removeDuplicates=function(){var e=this.chars.split("");e=i(e),this.chars=e.join("")},t.exports=n},{"array-uniq":449}],448:[function(e,t,r){"use strict";function n(e){for(;;)try{return i.randomBytes(e)}catch(e){continue}}var i=e("crypto"),o=e("./charset.js");r.generate=function(e){var t,r=new o,i="";"object"==typeof e?(t=e.length||32,e.charset?r.setType(e.charset):r.setType("alphanumeric"),e.capitalization&&r.setcapitalization(e.capitalization),e.readable&&r.removeUnreadable(),r.removeDuplicates()):"number"==typeof e?(t=e,r.setType("alphanumeric")):(t=32,r.setType("alphanumeric"));for(var a=r.chars.length,s=256-256%a;t>0;)for(var u=n(Math.ceil(256*t/s)),c=0;c0;c++){var f=u.readUInt8(c);f0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),p(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=z?e=z:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function f(e,t){var r=null;return P.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(d,e):d(e))}function d(e){L("emit readable"),e.emit("readable"),m(e)}function p(e,t){t.readingMore||(t.readingMore=!0,O(b,e,t))}function b(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=x(e,t.buffer,t.decoder),r}function x(e,t,r){var n;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}function k(e,t){var r=D.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(j,t,e))}function j(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):h(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&E(this),null;var n=t.needReadable;L("need readable",n),(0===t.length||t.length-e0?w(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,t){function i(e){L("onunpipe"),e===h&&a()}function o(){L("onend"),e.end()}function a(){L("cleanup"),e.removeListener("close",c),e.removeListener("finish",f),e.removeListener("drain",y),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",o),h.removeListener("end",a),h.removeListener("data",s),g=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function s(t){L("ondata"),_=!1,!1!==e.write(t)||_||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&M(d.pipes,e)!==-1)&&!g&&(L("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,_=!0),h.pause())}function u(t){L("onerror",t),l(),e.removeListener("error",u),0===I(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",f),l()}function f(){L("onfinish"),e.removeListener("close",c),l()}function l(){L("unpipe"),h.unpipe(e)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,L("pipe count=%d opts=%j",d.pipesCount,t);var p=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,b=p?o:a;d.endEmitted?O(b):h.once("end",b),e.on("unpipe",i);var y=v(h);e.on("drain",y);var g=!1,_=!1;return h.on("data",s),n(e,"error",u),e.once("close",c),e.once("finish",f),e.emit("pipe",h),d.flowing||(L("pipe resume"),h.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?setImmediate:k;a.WritableState=o;var j=e("core-util-is");j.inherits=e("inherits");var A,M={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(e){}finally{A||(A=e("events").EventEmitter)}}();var C=e("buffer").Buffer,O=e("buffer-shims");j.inherits(a,A),o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:M.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var T;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!T.call(this,e)||e&&e._writableState instanceof o}})):T=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,r){var i=this._writableState,o=!1,a=C.isBuffer(e);return"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?s(this,r):(a||u(this,i,e,r))&&(i.pendingcb++,o=f(this,i,a,e,t,r)),o},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},a.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},a.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":451,_process:425,buffer:64,"buffer-shims":62,"core-util-is":66,events:149,inherits:161,"process-nextick-args":424,"util-deprecate":497}],456:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:64,"buffer-shims":62}],457:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],458:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":452}],459:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":451,"./lib/_stream_passthrough.js":452,"./lib/_stream_readable.js":453,"./lib/_stream_transform.js":454,"./lib/_stream_writable.js":455,_process:425}],460:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":454}],461:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":455}],462:[function(e,t,r){var n,i,o,a,s,u,c,f,l;u=e("lodash/flatten"),a=e("lodash/assign"),i=e("bluebird"),n=e("events").EventEmitter,f=e("./pubnub"),l=e("./utils"),s=l.extractMessages,c=l.getChannels,o="PNNetworkIssuesCategory",r.subscribe=function(e,t){var r,i,a,u,l,h,d,p;return p=c(t),r=p.channel,i=p.clearChannel,l=f.getInstance(e),u=new n,a=function(e,t){return u.emit(e,t)},h=function(e){return e.channel===i?a("clear"):e.channel===r?s(e.message).forEach(function(e){return a("line",e)}):void 0},d={message:h,status:function(e){if(e.category===o)return a("error",o)}},l.addListener(d),l.subscribe({channels:[r,i]}),u.unsubscribe=function(){return l.removeListener(d),l.unsubscribe({channels:[r,i]})},u},r.history=function(e,t,r){return i.try(function(){var n,i;return i=f.getInstance(e),n=c(t).channel,f.history(i,n,r)}).map(s).then(u)},r.historySinceLastClear=function(e,t,n){return r.getLastClearTime(e,t).then(function(i){return n=a({count:200},n,{end:i}),r.history(e,t,n)})},r.clear=function(e,t){return i.try(function(){var r,n;return n=f.getInstance(e),r=c(t).clearChannel,n.time().then(function(e){var t;return t=e.timetoken,n.publish({channel:r,message:t})})})},r.getLastClearTime=function(e,t){return i.try(function(){var r,n;return n=f.getInstance(e),r=c(t).clearChannel,f.history(n,r,{count:1}).then(function(e){return(null!=e?e[0]:void 0)||0})})}},{"./pubnub":463,"./utils":464,bluebird:34,events:149,"lodash/assign":331,"lodash/flatten":342}],463:[function(e,t,r){var n,i,o,a,s;i=e("lodash/assign"),s=e("lodash/memoize"),e("bluebird"),n=e("pubnub"),o=function(e){return e.publishKey||e.publish_key},a=function(e){return e.subscribeKey||e.subscribe_key},r.getInstance=s(function(e){return new n({publishKey:o(e),subscribeKey:a(e),ssl:!0})},a),r.history=function(e,t,r){return null==r&&(r={}),r=i({channel:t},r),e.history(r).then(function(e){var t;return t=e.messages,t.map(function(e){return e.entry})})}},{bluebird:34,"lodash/assign":331,"lodash/memoize":371,pubnub:435}],464:[function(e,t,r){var n,i,o,a;a=e("lodash/isString"),o=e("lodash/isArray"),n=e("lodash/assign"),i=function(e){return e.logs_channel||e.uuid},r.getChannel=function(e,t){return null==t&&(t="logs"),"device-"+i(e)+"-"+t},r.getChannels=function(e){return{channel:r.getChannel(e),clearChannel:r.getChannel(e,"clear-logs")}},r.extractMessages=function(e){return a(e)?[{isSystem:/\[system\]/.test(e),message:e,timestamp:null}]:o(e)?e.map(function(e){var t,r,n;return t=e.m,n=e.t,r=e.s,{message:t,timestamp:n,isSystem:Boolean(r)}}):[n({isSystem:!1,timestamp:null},e)]}},{"lodash/assign":331,"lodash/isArray":350,"lodash/isString":363}],465:[function(e,t,r){var n,i;i=e("lodash/find"),n=2013,r.status={IDLE:"idle",CONFIGURING:"configuring",UPDATING:"updating",OFFLINE:"offline",POST_PROVISIONING:"post-provisioning"},r.statuses=[{key:r.status.IDLE,name:"Idle"},{key:r.status.CONFIGURING,name:"Configuring"},{key:r.status.UPDATING,name:"Updating"},{key:r.status.OFFLINE,name:"Offline"},{key:r.status.POST_PROVISIONING,name:"Post Provisioning"}],r.getStatus=function(e){var t;return"Post-Provisioning"===e.provisioning_state?i(r.statuses,{key:r.status.POST_PROVISIONING}):(t=new Date(e.last_seen_time),!e.is_online&&t.getFullYear()=r.TOKEN_REFRESH_INTERVAL})},r.getAuthorizationHeader=o.method(function(e){if(null!=e)return e.get().then(function(e){if(null!=e)return"Bearer "+e})}),r.getErrorMessageFromResponse=function(e){return e.body?null!=e.body.error?e.body.error.text:e.body:"The request was unsuccessful"},r.isErrorCode=function(e){return e>=400},r.isResponseCompressed=function(e){return"gzip"===e.headers.get("Content-Encoding")},r.getResponseLength=function(e){return{uncompressed:h(e.headers.get("Content-Length"),10)||void 0,compressed:h(e.headers.get("X-Transfer-Length"),10)||void 0}},r.debugRequest=function(e,t){return console.error(s({statusCode:t.statusCode,duration:t.duration},e))},a=["qsParseOptions","qsStringifyOptions","useQuerystring","form","formData","multipart","preambleCRLF","postambleCRLF","jsonReviver","jsonReplacer","auth","oauth","aws","httpSignature","followAllRedirects","maxRedirects","removeRefererHeader","encoding","jar","agent","agentClass","agentOptions","forever","pool","localAddress","proxy","proxyHeaderWhiteList","proxyHeaderExclusiveList","time","har","callback"],d=function(e){var t,r,o,s,u,c,f,l;if(null==e&&(e={}),l=e.url||e.uri,e.baseUrl&&(l=y.resolve(e.baseUrl,l)),e.qs&&(f=p.stringify(e.qs),l+=(l.indexOf("?")>=0?"&":"?")+f),c={},c.timeout=e.timeout,c.retries=e.retries,c.method=e.method,c.compress=e.gzip,t=e.body,r=e.headers,null==r&&(r={}),e.json&&t&&(t=JSON.stringify(t),r["Content-Type"]="application/json"),c.body=t,i||r["Accept-Encoding"]||(r["Accept-Encoding"]="compress, gzip"),e.followRedirect&&(c.redirect="follow"),c.headers=new n(r),e.strictSSL===!1)throw new Error("`strictSSL` must be true or absent");for(o=0,u=a.length;o0?o.catch(function(){return v(e,t,r-1)}):o},r.getRequestAsync=function(e){return null==e&&(e=f),function(t){return v(e,t)}},r.notImplemented=l=function(){throw new Error("The method is not implemented.")},r.onlyIf=function(e){return function(t){return e?t:l}}},{bluebird:34,"fetch-ponyfill":151,"lodash/assign":331,"lodash/includes":348,"lodash/parseInt":376,qs:438,"resin-errors":474,url:495}],474:[function(e,t,r){var n,i={}.hasOwnProperty,o=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};n=e("typed-error"),r.ResinInvalidDeviceType=function(e){function t(e){this.type=e,t.__super__.constructor.call(this,"Invalid device type: "+this.type)}return o(t,e),t.prototype.code="ResinInvalidDeviceType",t.prototype.exitCode=1,t}(n),r.ResinMalformedToken=function(e){function t(e){this.token=e,t.__super__.constructor.call(this,"Malformed token: "+this.token)}return o(t,e),t.prototype.code="ResinMalformedToken",t.prototype.exitCode=1,t}(n),r.ResinExpiredToken=function(e){function t(e){this.token=e,t.__super__.constructor.call(this,"The token expired: "+this.token)}return o(t,e),t.prototype.code="ResinExpiredToken",t.prototype.exitCode=1,t}(n),r.ResinApplicationNotFound=function(e){function t(e){this.application=e,t.__super__.constructor.call(this,"Application not found: "+this.application)}return o(t,e),t.prototype.code="ResinApplicationNotFound",t.prototype.exitCode=1,t}(n),r.ResinBuildNotFound=function(e){function t(e){this.build=e,t.__super__.constructor.call(this,"Build not found: "+this.build)}return o(t,e),t.prototype.code="ResinBuildNotFound",t.prototype.exitCode=1,t}(n),r.ResinDeviceNotFound=function(e){function t(e){this.device=e,t.__super__.constructor.call(this,"Device not found: "+this.device)}return o(t,e),t.prototype.code="ResinDeviceNotFound",t.prototype.exitCode=1,t}(n),r.ResinAmbiguousDevice=function(e){function t(e){this.device=e,t.__super__.constructor.call(this,"Device is ambiguous: "+this.device)}return o(t,e),t.prototype.code="ResinAmbiguousDevice",t.prototype.exitCode=1,t}(n),r.ResinAmbiguousApplication=function(e){function t(e){this.application=e,t.__super__.constructor.call(this,"Application is ambiguous: "+this.application)}return o(t,e),t.prototype.code="ResinAmbiguousApplication",t.prototype.exitCode=1,t}(n),r.ResinKeyNotFound=function(e){function t(e){this.key=e,t.__super__.constructor.call(this,"Key not found: "+this.key)}return o(t,e),t.prototype.code="ResinKeyNotFound",t.prototype.exitCode=1,t}(n),r.ResinRequestError=function(e){function t(e,r,n){this.body=e,this.statusCode=r,this.requestOptions=n,t.__super__.constructor.call(this,"Request error: "+this.body)}return o(t,e),t.prototype.code="ResinRequestError",t.prototype.exitCode=1,t}(n),r.ResinNotLoggedIn=function(e){function t(){t.__super__.constructor.call(this,"You have to log in")}return o(t,e),t.prototype.code="ResinNotLoggedIn",t.prototype.exitCode=1,t}(n),r.ResinInvalidParameterError=function(e){function t(e,r){this.parameterName=e,this.suppliedValue=r,t.__super__.constructor.call(this,"Invalid parameter: "+this.suppliedValue+" is not a valid value for parameter '"+this.parameterName+"'")}return o(t,e),t.prototype.code="ResinInvalidParameterError",t.prototype.exitCode=1,t}(n)},{"typed-error":494}],475:[function(e,t,r){var n,i,o,a;a=function(e){return"resin-"+e},i=function(){var e;return e={},{getItem:function(t){return e.hasOwnProperty(t)?e[t]:null},setItem:function(t,r){e[t]=r},removeItem:function(t){delete e[t]},clear:function(){e={}}}},o=function(e,t){var r,n;try{n=e[t]}catch(e){e,n=!1}if(n){r="__"+Math.round(1e7*Math.random());try{e[t].setItem(r,r),n=e[t].getItem(r)===r,e[t].removeItem(r,r)}catch(e){e,n=!1}}return n},"undefined"!=typeof window&&null!==window?o(window,"localStorage")?t.exports=function(){return{getItem:function(e){return localStorage.getItem(a(e))},setItem:function(e,t){return localStorage.setItem(a(e),t)},removeItem:function(e){return localStorage.removeItem(a(e))},clear:function(){return localStorage.clear()}}}:t.exports=function(){return i()}:(n=e("node-localstorage").LocalStorage,t.exports=function(e){return new n(e,Infinity)})},{"node-localstorage":void 0}],476:[function(e,t,r){var n,i,o,a;n=e("bluebird"),a=e("lodash/isString"),i=e("./local-storage"),o=function(e){var t,r,o,s,u,c,f;return t=null!=(u=(null!=e?e:{}).dataDirectory)?u:null,s=i(t),f=function(e,t){return n.try(function(){return a(t)||(t=JSON.stringify(t)),s.setItem(e,t)})},r=function(e){return n.try(function(){var t;"function"==typeof s._init&&s._init(),t=s.getItem(e)||void 0,/^-?\d+\.?\d*$/.test(t)&&(t=parseFloat(t));try{t=JSON.parse(t)}catch(e){}return t}).catchReturn(void 0)},o=function(e){return r(e).then(function(e){return null!=e})},c=function(e){return n.try(function(){return s.removeItem(e)})},{set:f,get:r,has:o,remove:c}},t.exports=o},{"./local-storage":475,bluebird:34,"lodash/isString":363}],477:[function(e,t,r){var n,i,o,a,s;n=e("bluebird"),s=e("jwt-decode"),e("url"),o=e("resin-errors"),a=e("resin-settings-storage"),i="token",t.exports=function(e){var t,r,u,c,f;return t=null!=(c=(null!=e?e:{}).dataDirectory)?c:null,f=a({dataDirectory:t}),r={},r.isValid=function(e){return r.parse(e).return(!0).catch(o.ResinMalformedToken,function(){return!1})},r.set=function(e){return r.isValid(e).then(function(e){if(!e)throw new Error("The token is invalid")}).then(function(){return r.isExpired(e)}).then(function(t){if(t)throw new Error("The token has expired");return f.set(i,e.trim())})},r.get=function(){return f.get(i)},r.has=function(){return f.has(i)},r.remove=function(){return f.remove(i)},r.parse=function(e){return n.try(function(){return s(e.trim())}).catch(function(){throw new o.ResinMalformedToken(e)})},r.getData=function(){return r.has().then(function(e){if(e)return r.get().then(r.parse)})},r.getProperty=function(e){return r.getData().then(function(t){return null!=t?t[e]:void 0})},u=function(e){return function(){return r.getProperty(e)}},r.getUsername=u("username"),r.getUserId=u("id"),r.getEmail=u("email"),r.getAge=function(){return r.getProperty("iat").then(function(e){if(null!=e)return Date.now()-1e3*e})},r.isExpired=function(e){return r.parse(e).get("exp").then(function(e){return null!=e&&Date.now()>1e3*e})},r}},{bluebird:34,"jwt-decode":166,"resin-errors":478,"resin-settings-storage":476,url:495}],478:[function(e,t,r){arguments[4][469][0].apply(r,arguments)},{dup:469,"typed-error":494}],479:[function(e,t,r){(function(e){function r(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t}function n(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function i(e,t,r){for(var n=0;n<16;n++){var i=r+n,l=t[i];t[i]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var g,_,m,w,x,S,k,E,j,A;S=g=e[0],k=_=e[1],E=m=e[2],j=w=e[3],A=x=e[4];var M;for(n=0;n<80;n+=1)M=g+t[r+h[n]]|0,M+=n<16?o(_,m,w)+v[0]:n<32?a(_,m,w)+v[1]:n<48?s(_,m,w)+v[2]:n<64?u(_,m,w)+v[3]:c(_,m,w)+v[4],M|=0,M=f(M,p[n]),M=M+x|0,g=x,x=w,w=f(m,10),m=_,_=M,M=S+t[r+d[n]]|0,M+=n<16?c(k,E,j)+y[0]:n<32?u(k,E,j)+y[1]:n<48?s(k,E,j)+y[2]:n<64?a(k,E,j)+y[3]:o(k,E,j)+y[4],M|=0,M=f(M,b[n]),M=M+A|0,S=A,A=j,j=f(E,10),E=k,k=M;M=e[1]+m+j|0,e[1]=e[2]+w+A|0,e[2]=e[3]+x+S|0,e[3]=e[4]+g+k|0,e[4]=e[0]+_+E|0,e[0]=M}function o(e,t,r){return e^t^r}function a(e,t,r){return e&t|~e&r}function s(e,t,r){return(e|~t)^r}function u(e,t,r){return e&r|t&~r}function c(e,t,r){return e^(t|~r)}function f(e,t){return e<>>32-t}function l(t){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var a=r(t),s=8*t.length,u=8*t.length;a[s>>>5]|=128<<24-s%32,a[14+(s+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8);for(var c=0;c>>24)|4278255360&(f<<24|f>>>8)}return new e(n(o))}var h=[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],d=[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],p=[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],b=[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],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];t.exports=l}).call(this,e("buffer").Buffer)},{buffer:64}],480:[function(e,t,r){(function(e){function n(e,t){if(e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>$)return null;if(!(t?Z[pe]:Z[le]).test(e))return null;try{return new a(e,t)}catch(e){return null}}function i(e,t){var r=n(e,t);return r?r.version:null}function o(e,t){var r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}function a(e,t){if(e instanceof a){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>$)throw new TypeError("version is longer than "+$+" characters");if(!(this instanceof a))return new a(e,t);W("SemVer",e,t),this.loose=t;var r=e.trim().match(t?Z[pe]:Z[le]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&tt?1:0}function f(e,t){return c(t,e)}function l(e,t){return new a(e,t).major}function h(e,t){return new a(e,t).minor}function d(e,t){return new a(e,t).patch}function p(e,t,r){return new a(e,r).compare(t)}function b(e,t){return p(e,t,!0)}function v(e,t,r){return p(t,e,r)}function y(e,t){return e.sort(function(e,n){return r.compare(e,n,t)})}function g(e,t){return e.sort(function(e,n){return r.rcompare(e,n,t)})}function _(e,t,r){return p(e,t,r)>0}function m(e,t,r){return p(e,t,r)<0}function w(e,t,r){return 0===p(e,t,r)}function x(e,t,r){return 0!==p(e,t,r)}function S(e,t,r){return p(e,t,r)>=0}function k(e,t,r){return p(e,t,r)<=0}function E(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=w(e,r,n);break;case"!=":i=x(e,r,n);break;case">":i=_(e,r,n);break;case">=":i=S(e,r,n);break;case"<":i=m(e,r,n);break;case"<=":i=k(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function j(e,t){if(e instanceof j){if(e.loose===t)return e;e=e.value}if(!(this instanceof j))return new j(e,t);W("comparator",e,t),this.loose=t,this.parse(e),this.semver===Le?this.value="":this.value=this.operator+this.semver.version,W("comp",this)}function A(e,t){if(e instanceof A&&e.loose===t)return e;if(!(this instanceof A))return new A(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function M(e,t){return new A(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function C(e,t){return W("comp",e),e=I(e,t),W("caret",e),e=T(e,t),W("tildes",e),e=D(e,t),W("xrange",e),e=N(e,t),W("stars",e),e}function O(e){return!e||"x"===e.toLowerCase()||"*"===e}function T(e,t){return e.trim().split(/\s+/).map(function(e){return R(e,t)}).join(" ")}function R(e,t){var r=t?Z[Ee]:Z[ke];return e.replace(r,function(t,r,n,i,o){W("tilde",e,t,r,n,i,o);var a;return O(r)?a="":O(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":O(i)?a=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(W("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),a=">="+r+"."+n+"."+i+o+" <"+r+"."+(+n+1)+".0"):a=">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0",W("tilde return",a),a})}function I(e,t){return e.trim().split(/\s+/).map(function(e){return P(e,t)}).join(" ")}function P(e,t){W("caret",e,t);var r=t?Z[Ce]:Z[Me];return e.replace(r,function(t,r,n,i,o){W("caret",e,t,r,n,i,o);var a;return O(r)?a="":O(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":O(i)?a="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(W("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),a="0"===r?"0"===n?">="+r+"."+n+"."+i+o+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+o+" <"+(+r+1)+".0.0"):(W("no pr"),a="0"===r?"0"===n?">="+r+"."+n+"."+i+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+" <"+(+r+1)+".0.0"),W("caret return",a),a})}function D(e,t){return W("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return B(e,t)}).join(" ")}function B(e,t){e=e.trim();var r=t?Z[we]:Z[me];return e.replace(r,function(t,r,n,i,o,a){W("xRange",e,t,r,n,i,o,a);var s=O(n),u=s||O(i),c=u||O(o),f=c;return"="===r&&f&&(r=""),s?t=">"===r||"<"===r?"<0.0.0":"*":r&&f?(u&&(i=0),c&&(o=0),">"===r?(r=">=",u?(n=+n+1,i=0,o=0):c&&(i=+i+1,o=0)):"<="===r&&(r="<",u?n=+n+1:i=+i+1),t=r+n+"."+i+"."+o):u?t=">="+n+".0.0 <"+(+n+1)+".0.0":c&&(t=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"),W("xRange return",t),t})}function N(e,t){return W("replaceStars",e,t),e.trim().replace(Z[De],"")}function L(e,t,r,n,i,o,a,s,u,c,f,l,h){return t=O(r)?"":O(n)?">="+r+".0.0":O(i)?">="+r+"."+n+".0":">="+t,s=O(u)?"":O(c)?"<"+(+u+1)+".0.0":O(f)?"<"+u+"."+(+c+1)+".0":l?"<="+u+"."+c+"."+f+"-"+l:"<="+s,(t+" "+s).trim()}function F(e,t){for(var r=0;r0){var n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}function U(e,t,r){try{t=new A(t,r)}catch(e){return!1}return t.test(e)}function z(e,t,r){return e.filter(function(e){return U(e,t,r)}).sort(function(e,t){return v(e,t,r)})[0]||null}function q(e,t,r){return e.filter(function(e){return U(e,t,r)}).sort(function(e,t){return p(e,t,r)})[0]||null}function K(e,t){try{return new A(e,t).range||"*"}catch(e){return null}}function H(e,t,r){return V(e,t,"<",r)}function G(e,t,r){return V(e,t,">",r)}function V(e,t,r,n){e=new a(e,n),t=new A(t,n);var i,o,s,u,c;switch(r){case">":i=_,o=k,s=m,u=">",c=">=";break;case"<":i=m,o=S,s=_,u="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(U(e,t,n))return!1;for(var f=0;f=0.0.0")),h=h||e,d=d||e,i(e.semver,h.semver,n)?h=e:s(e.semver,d.semver,n)&&(d=e)}),h.operator===u||h.operator===c)return!1;if((!d.operator||d.operator===u)&&o(e,d.semver))return!1;if(d.operator===c&&s(e,d.semver))return!1}return!0}function Y(e,t){var r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}r=t.exports=a;var W;W="object"==typeof e&&e.env&&e.env.NODE_DEBUG&&/\bsemver\b/i.test(e.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},r.SEMVER_SPEC_VERSION="2.0.0";var $=256,X=Number.MAX_SAFE_INTEGER||9007199254740991,Z=r.re=[],J=r.src=[],Q=0,ee=Q++;J[ee]="0|[1-9]\\d*";var te=Q++;J[te]="[0-9]+";var re=Q++;J[re]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var ne=Q++;J[ne]="("+J[ee]+")\\.("+J[ee]+")\\.("+J[ee]+")";var ie=Q++;J[ie]="("+J[te]+")\\.("+J[te]+")\\.("+J[te]+")";var oe=Q++;J[oe]="(?:"+J[ee]+"|"+J[re]+")";var ae=Q++;J[ae]="(?:"+J[te]+"|"+J[re]+")";var se=Q++;J[se]="(?:-("+J[oe]+"(?:\\."+J[oe]+")*))";var ue=Q++;J[ue]="(?:-?("+J[ae]+"(?:\\."+J[ae]+")*))";var ce=Q++;J[ce]="[0-9A-Za-z-]+";var fe=Q++;J[fe]="(?:\\+("+J[ce]+"(?:\\."+J[ce]+")*))";var le=Q++,he="v?"+J[ne]+J[se]+"?"+J[fe]+"?";J[le]="^"+he+"$";var de="[v=\\s]*"+J[ie]+J[ue]+"?"+J[fe]+"?",pe=Q++;J[pe]="^"+de+"$";var be=Q++;J[be]="((?:<|>)?=?)";var ve=Q++;J[ve]=J[te]+"|x|X|\\*";var ye=Q++;J[ye]=J[ee]+"|x|X|\\*";var ge=Q++;J[ge]="[v=\\s]*("+J[ye]+")(?:\\.("+J[ye]+")(?:\\.("+J[ye]+")(?:"+J[se]+")?"+J[fe]+"?)?)?";var _e=Q++;J[_e]="[v=\\s]*("+J[ve]+")(?:\\.("+J[ve]+")(?:\\.("+J[ve]+")(?:"+J[ue]+")?"+J[fe]+"?)?)?";var me=Q++;J[me]="^"+J[be]+"\\s*"+J[ge]+"$";var we=Q++;J[we]="^"+J[be]+"\\s*"+J[_e]+"$";var xe=Q++;J[xe]="(?:~>?)";var Se=Q++;J[Se]="(\\s*)"+J[xe]+"\\s+",Z[Se]=new RegExp(J[Se],"g");var ke=Q++;J[ke]="^"+J[xe]+J[ge]+"$";var Ee=Q++;J[Ee]="^"+J[xe]+J[_e]+"$";var je=Q++;J[je]="(?:\\^)";var Ae=Q++;J[Ae]="(\\s*)"+J[je]+"\\s+",Z[Ae]=new RegExp(J[Ae],"g");var Me=Q++;J[Me]="^"+J[je]+J[ge]+"$";var Ce=Q++;J[Ce]="^"+J[je]+J[_e]+"$";var Oe=Q++;J[Oe]="^"+J[be]+"\\s*("+de+")$|^$";var Te=Q++;J[Te]="^"+J[be]+"\\s*("+he+")$|^$";var Re=Q++;J[Re]="(\\s*)"+J[be]+"\\s*("+de+"|"+J[ge]+")",Z[Re]=new RegExp(J[Re],"g");var Ie=Q++;J[Ie]="^\\s*("+J[ge]+")\\s+-\\s+("+J[ge]+")\\s*$";var Pe=Q++;J[Pe]="^\\s*("+J[_e]+")\\s+-\\s+("+J[_e]+")\\s*$";var De=Q++;J[De]="(<|>)?=?\\s*\\*";for(var Be=0;Be=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},r.inc=s,r.diff=u,r.compareIdentifiers=c;var Ne=/^[0-9]+$/;r.rcompareIdentifiers=f,r.major=l,r.minor=h,r.patch=d,r.compare=p,r.compareLoose=b,r.rcompare=v,r.sort=y,r.rsort=g,r.gt=_,r.lt=m,r.eq=w,r.neq=x,r.gte=S,r.lte=k,r.cmp=E,r.Comparator=j;var Le={};j.prototype.parse=function(e){var t=this.loose?Z[Oe]:Z[Te],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new a(r[2],this.loose):this.semver=Le},j.prototype.toString=function(){return this.value},j.prototype.test=function(e){return W("Comparator.test",e,this.loose),this.semver===Le||("string"==typeof e&&(e=new a(e,this.loose)),E(e,this.operator,this.semver,this.loose))},r.Range=A,A.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},A.prototype.toString=function(){return this.range},A.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),W("range",e,t);var r=t?Z[Pe]:Z[Ie];e=e.replace(r,L),W("hyphen replace",e),e=e.replace(Z[Re],"$1$2$3"),W("comparator trim",e,Z[Re]),e=e.replace(Z[Se],"$1~"),e=e.replace(Z[Ae],"$1^"),e=e.split(/\s+/).join(" ");var n=t?Z[Oe]:Z[Te],i=e.split(" ").map(function(e){return C(e,t)}).join(" ").split(/\s+/);return this.loose&&(i=i.filter(function(e){return!!e.match(n)})),i=i.map(function(e){return new j(e,t)})},r.toComparators=M,A.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new a(e,this.loose));for(var t=0;t=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(this,e("buffer").Buffer)},{buffer:64}],482:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":483,"./sha1":484,"./sha224":485,"./sha256":486,"./sha384":487,"./sha512":488}],483:[function(e,t,r){(function(r){function n(){this.init(),this._w=f,u.call(this,64,56)}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function a(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var s=e("inherits"),u=e("./hash"),c=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);s(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,s=0|this._c,u=0|this._d,f=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=i(r)+a(d,n,s,u)+f+t[h]+c[d]|0;f=u,u=s,s=o(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,buffer:64,inherits:161}],484:[function(e,t,r){(function(r){function n(){this.init(),this._w=l,c.call(this,64,56)}function i(e){return e<<1|e>>>31}function o(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function s(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var u=e("inherits"),c=e("./hash"),f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(n,c),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,u=0|this._c,c=0|this._d,l=0|this._e,h=0;h<16;++h)t[h]=e.readInt32BE(4*h);for(;h<80;++h)t[h]=i(t[h-3]^t[h-8]^t[h-14]^t[h-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=o(r)+s(p,n,u,c)+l+t[d]+f[p]|0;l=c,c=u,u=a(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=l+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,buffer:64,inherits:161}],485:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,a.call(this,64,56)}var i=e("inherits"),o=e("./sha256"),a=e("./hash"),s=new Array(64);i(n,o),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var e=new r(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,"./sha256":486,buffer:64,inherits:161}],486:[function(e,t,r){(function(r){function n(){this.init(),this._w=d,l.call(this,64,56)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){ -return e&t|r&(e|t)}function a(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function c(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=e("inherits"),l=e("./hash"),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);f(n,l),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,f=0|this._c,l=0|this._d,d=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=c(t[y-2])+t[y-7]+u(t[y-15])+t[y-16]|0;for(var g=0;g<64;++g){var _=v+s(d)+i(d,p,b)+h[g]+t[g]|0,m=a(r)+o(r,n,f)|0;v=b,b=p,p=d,d=l+_|0,l=f,f=n,n=r,r=_+m|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=f+this._c|0,this._d=l+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},n.prototype._hash=function(){var e=new r(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,buffer:64,inherits:161}],487:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,a.call(this,128,112)}var i=e("inherits"),o=e("./sha512"),a=e("./hash"),s=new Array(160);i(n,o),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,"./sha512":488,buffer:64,inherits:161}],488:[function(e,t,r){(function(r){function n(){this.init(),this._w=v,p.call(this,128,112)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function a(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function h(e,t){return e>>>0>>0?1:0}var d=e("inherits"),p=e("./hash"),b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],v=new Array(160);d(n,p),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,d=0|this._ch,p=0|this._dh,v=0|this._eh,y=0|this._fh,g=0|this._gh,_=0|this._hh,m=0|this._al,w=0|this._bl,x=0|this._cl,S=0|this._dl,k=0|this._el,E=0|this._fl,j=0|this._gl,A=0|this._hl,M=0;M<32;M+=2)t[M]=e.readInt32BE(4*M),t[M+1]=e.readInt32BE(4*M+4);for(;M<160;M+=2){var C=t[M-30],O=t[M-30+1],T=u(C,O),R=c(O,C);C=t[M-4],O=t[M-4+1];var I=f(C,O),P=l(O,C),D=t[M-14],B=t[M-14+1],N=t[M-32],L=t[M-32+1],F=R+B|0,U=T+D+h(F,R)|0;F=F+P|0,U=U+I+h(F,P)|0,F=F+L|0,U=U+N+h(F,L)|0,t[M]=U,t[M+1]=F}for(var z=0;z<160;z+=2){U=t[z],F=t[z+1];var q=o(r,n,d),K=o(m,w,x),H=a(r,m),G=a(m,r),V=s(v,k),Y=s(k,v),W=b[z],$=b[z+1],X=i(v,y,g),Z=i(k,E,j),J=A+Y|0,Q=_+V+h(J,A)|0;J=J+Z|0,Q=Q+X+h(J,Z)|0,J=J+$|0,Q=Q+W+h(J,$)|0,J=J+F|0,Q=Q+U+h(J,F)|0;var ee=G+K|0,te=H+q+h(ee,G)|0;_=g,A=j,g=y,j=E,y=v,E=k,k=S+J|0,v=p+Q+h(k,S)|0,p=d,S=x,d=n,x=w,n=r,w=m,m=J+ee|0,r=Q+te+h(m,J)|0}this._al=this._al+m|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+j|0,this._hl=this._hl+A|0,this._ah=this._ah+r+h(this._al,m)|0,this._bh=this._bh+n+h(this._bl,w)|0,this._ch=this._ch+d+h(this._cl,x)|0,this._dh=this._dh+p+h(this._dl,S)|0,this._eh=this._eh+v+h(this._el,k)|0,this._fh=this._fh+y+h(this._fl,E)|0,this._gh=this._gh+g+h(this._gl,j)|0,this._hh=this._hh+_+h(this._hl,A)|0},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":481,buffer:64,inherits:161}],489:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){f||(f=!0,e.end())}function a(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",r),e.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",r),e.on("drain",n),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var f=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},{events:149,inherits:161,"readable-stream/duplex.js":450,"readable-stream/passthrough.js":458,"readable-stream/readable.js":459,"readable-stream/transform.js":460,"readable-stream/writable.js":461}],490:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,u=s.isEncoding||function(e){switch(e&&e.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!0;default:return!1}},c=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:64}],491:[function(e,t,r){"use strict";t.exports=2147483647},{}],492:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=e("./max-timeout");t.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},{"./max-timeout":491,"es5-ext/number/to-pos-integer":117}],493:[function(e,t,r){(function(e){var r,n,i,o,a,s,u,c,f,l,h,d,p,b,v,y;!function(r){function n(e,t){return function(r,n){return e[r]=t?t(r,n):n}}var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],function(e){r(n(i,n(e)))}):r("object"==typeof t&&"object"==typeof t.exports?n(i,n(t.exports)):n(i))}(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};r=function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)},n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=function(e,t){return function(r,n){t(r,n,e)}},s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},c=function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}},h=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},d=function(){for(var e=[],t=0;t1||i(e,t)})})}function i(e,t){try{o(f[e](t))}catch(e){u(l[0][3],e)}}function o(e){e.value instanceof p?Promise.resolve(e.value.v).then(a,s):u(l[0][2],e)}function a(e){i("next",e)}function s(e){i("throw",e)}function u(e,t){e(t),l.shift(),l.length&&i(l[0][0],l[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,f=r.apply(e,t||[]),l=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c},v=function(e){function t(t,i){e[t]&&(r[t]=function(r){return(n=!n)?{value:p(e[t](r)),done:"return"===t}:i?i(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r},y=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof l?l(e):e[Symbol.iterator]()},e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",s),e("__awaiter",u),e("__generator",c),e("__exportStar",f),e("__values",l),e("__read",h),e("__spread",d),e("__await",p),e("__asyncGenerator",b),e("__asyncDelegator",v),e("__asyncValues",y)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],494:[function(e,t,r){(function(){var e={}.hasOwnProperty,n=function(t,r){function n(){this.constructor=t}for(var i in r)e.call(r,i)&&(t[i]=r[i]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t};!function(e,n){"function"==typeof define&&define.amd?define(function(){return e.TypedError=n()}):"object"==typeof r?t.exports=n():e.TypedError=n()}(this,function(){return function(e){function t(e){var t;t=e instanceof Error?e:new Error(e),t.name=this.constructor.name,this.name=t.name,this.message=t.message,null!=Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):null!=t.stack&&(this.stack=t.stack)}return n(t,e),t}(Error)})}).call(this)},{}],495:[function(e,t,r){"use strict";function n(){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}function i(e,t,r){if(e&&c.isObject(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=e("punycode"),c=e("./util");r.parse=i,r.resolve=a,r.resolveObject=s,r.format=o,r.Url=n;var f=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),b=["'"].concat(p),v=["%","/","?",";","#"].concat(b),y=["/","?","#"],g={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");n.prototype.parse=function(e,t,r){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n127?"x":O[R];if(!T.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=M.slice(0,S),D=M.slice(S+1),B=O.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);B&&(P.push(B[1]),D.unshift(B[2])),D.length&&(a="/"+D.join(".")+a),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=u.toASCII(this.hostname));var N=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+N,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!g[d])for(var S=0,C=b.length;S0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return r.search=e.search,r.query=e.query,c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var j=S.slice(-1)[0],A=(r.host||e.host||S.length>1)&&("."===j||".."===j)||""===j,M=0,C=S.length;C>=0;C--)j=S[C],"."===j?S.splice(C,1):".."===j?(S.splice(C,1),M++):M&&(S.splice(C,1),M--);if(!w&&!x)for(;M--;M)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var O=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(k){r.hostname=r.host=O?"":S.length?S.shift():"";var E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return w=w||r.host&&S.length,w&&!O&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":496,punycode:436,querystring:444}],496:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],497:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],498:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=function(e,t){return function(r,n){t(r,n,e)}},s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},c=function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[0,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}},h=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},d=function(){for(var e=[],t=0;t1||i(e,t)})})}function i(e,t){try{o(f[e](t))}catch(e){u(l[0][3],e)}}function o(e){e.value instanceof p?Promise.resolve(e.value.v).then(a,s):u(l[0][2],e)}function a(e){i("next",e)}function s(e){i("throw",e)}function u(e,t){e(t),l.shift(),l.length&&i(l[0][0],l[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,f=r.apply(e,t||[]),l=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c},v=function(e){function t(t,i){e[t]&&(r[t]=function(r){return(n=!n)?{value:p(e[t](r)),done:"return"===t}:i?i(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r},y=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof l?l(e):e[Symbol.iterator]()},e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",s),e("__awaiter",u),e("__generator",c),e("__exportStar",f),e("__values",l),e("__read",h),e("__spread",d),e("__await",p),e("__asyncGenerator",b),e("__asyncDelegator",v),e("__asyncValues",y)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,r){"use strict";var n=e("tslib"),i=function(){function e(){Error.apply(this,arguments)}return e}();i.prototype=Object.create(Error.prototype);var o;if(null!=Error.captureStackTrace){var a=Error.captureStackTrace;o=function(e){a(e,e.constructor)}}else o=function(e,t){t instanceof Error||(t=new Error(t)),null!=t.stack&&(e.stack=t.stack)};var s=function(e){function t(t){void 0===t&&(t="");var r=e.call(this)||this;return t instanceof Error?r.message=t.message:r.message=t,r.name=r.constructor.name,o(r,t),r}return n.__extends(t,e),t}(i);t.exports=s},{tslib:2}],4:[function(e,t,r){var n;n=function(e,t){var r,n,i,o;return o=e.token,i=e.request,r=t.apiUrl,n={},n.isEnabled=function(e){return o.getProperty("twoFactorRequired").then(function(e){return null!=e}).asCallback(e)},n.isPassed=function(e){return o.getProperty("twoFactorRequired").then(function(e){return!e}).asCallback(e)},n.challenge=function(e,t){return i.send({method:"POST",url:"/auth/totp/verify",baseUrl:r,body:{code:e}}).get("body").then(o.set).asCallback(t)},n},t.exports=n},{}],5:[function(e,t,r){var n,i;n=e("resin-errors"),i=function(t,r){var i,o,a,s,u;return s=t.token,a=t.request,i=r.apiUrl,u=e("./2fa")(t,r),o={},o.twoFactor=u,o.whoami=function(e){return s.getUsername().asCallback(e)},o.authenticate=function(e,t){return a.send({method:"POST",baseUrl:i,url:"/login_",body:{username:e.email,password:String(e.password)},refreshToken:!1}).get("body").asCallback(t)},o.login=function(e,t){return o.authenticate(e).then(s.set).asCallback(t)},o.loginWithToken=function(e,t){return s.set(e).asCallback(t)},o.isLoggedIn=function(e){return a.send({method:"GET",url:"/whoami",baseUrl:i}).return(!0).catch(function(){return!1}).asCallback(e)},o.getToken=function(e){return s.get().then(function(e){if(null==e)throw new n.ResinNotLoggedIn;return e}).asCallback(e)},o.getUserId=function(e){return s.getUserId().then(function(e){if(null==e)throw new n.ResinNotLoggedIn;return e}).asCallback(e)},o.getEmail=function(e){return s.getEmail().then(function(e){if(null==e)throw new n.ResinNotLoggedIn;return e}).asCallback(e)},o.logout=function(e){return s.remove().asCallback(e)},o.register=function(e,t){return null==e&&(e={}),a.send({method:"POST",url:"/user/register",baseUrl:i,body:e}).get("body").asCallback(t)},o},t.exports=i},{"./2fa":4,"resin-errors":1}],6:[function(e,t,r){var n,i,o;n=e("bluebird"),o=e("resin-device-logs"),e("resin-errors"),i=function(t,r){var i,a,s,u;return i=e("./models/config")(t,r),a=e("./models/device")(t,r),s={},u=function(e){return n.props({device:a.get(e),pubNubKeys:i.getPubNubKeys()})},s.subscribe=function(e,t){return u(e).then(function(e){var t,r;return r=e.pubNubKeys,t=e.device,o.subscribe(r,t)}).asCallback(t)},s.history=function(e,t,r){return"function"==typeof t&&(r=t,t=void 0),u(e).then(function(e){var r,n;return n=e.pubNubKeys,r=e.device,o.history(n,r,t)}).asCallback(r)},s.historySinceLastClear=function(e,t,r){return"function"==typeof t&&(r=t,t=void 0),u(e).then(function(e){var r,n;return n=e.pubNubKeys,r=e.device,o.historySinceLastClear(n,r,t)}).asCallback(r)},s.clear=function(e,t){return u(e).then(function(e){var t,r;return r=e.pubNubKeys,t=e.device,o.clear(r,t)}).asCallback(t)},s},t.exports=i},{"./models/config":10,"./models/device":11,bluebird:37,"resin-device-logs":465,"resin-errors":1}],7:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m;i=e("bluebird"),y=e("lodash/once"),o=e("lodash/assign"),c=e("lodash/forEach"),l=e("lodash/isArray"),h=e("lodash/isEmpty"),s=e("lodash/filter"),_=e("lodash/size"),a=e("resin-errors"),g=e("../util"),d=g.isId,u=g.findCallback,p=g.mergePineOptions,v=g.notFoundResponse,m=g.treatAsMissingApplication,n=g.LOCKED_STATUS_CODE,b=e("../util/device-os-version").normalizeDeviceOsVersion,f=function(t,r){var f,g,w,x,S,k,E,j;return E=t.request,j=t.token,k=t.pine,f=r.apiUrl,g=y(function(){return e("./device")(t,r)}),w={},x=function(e){return i.try(function(){return d(e)?e:w.get(e,{select:"id"}).get("id")})},w._getId=x,S=function(e){return l(e.device)&&c(e.device,function(e){return b(e)}),e},w.getAll=function(e,t){return null==e&&(e={}),t=u(arguments),j.getUserId().then(function(t){return k.get({resource:"application",options:p({orderby:"app_name asc",expand:"device",filter:{user:t}},e)})}).map(function(e){var t;return e.online_devices=s(e.device,{is_online:!0}).length,e.devices_length=(null!=(t=e.device)?t.length:void 0)||0,S(e),e}).asCallback(t)},w.get=function(e,t,r){return null==t&&(t={}),r=u(arguments),i.try(function(){if(null==e)throw new a.ResinApplicationNotFound(e);return d(e)?k.get({resource:"application",id:e,options:p({},t)}).tap(function(t){if(null==t)throw new a.ResinApplicationNotFound(e)}):k.get({resource:"application",options:p({filter:{app_name:e}},t)}).tap(function(t){if(h(t))throw new a.ResinApplicationNotFound(e);if(_(t)>1)throw new a.ResinAmbiguousApplication(e)}).get(0)}).tap(S).asCallback(r)},w.getAppWithOwner=function(e,t,r,n){return null==r&&(r={}),n=u(arguments),e=e.toLowerCase(),t=t.toLowerCase(),k.get({resource:"application",options:p({filter:{$eq:[{$tolower:{$:"app_name"}},e]},expand:{user:{$filter:{$eq:[{$tolower:{$:"username"}},t]},$select:"id"}}},r)}).tap(function(r){if(h(r))throw new a.ResinApplicationNotFound(t+"/"+e);if(_(r)>1)throw new a.ResinAmbiguousApplication(t+"/"+e)}).get(0).tap(S).asCallback(n)},w.has=function(e,t){return w.get(e,{select:[]}).return(!0).catch(a.ResinApplicationNotFound,function(){return!1}).asCallback(t)},w.hasAny=function(e){return w.getAll({select:[]}).then(function(e){return!h(e)}).asCallback(e)},w.getById=function(e,t){return k.get({resource:"application",id:e}).tap(function(t){if(null==t)throw new a.ResinApplicationNotFound(e);return S(t)}).asCallback(t)},w.create=function(e,t,r,n){var s,c;return n=u(arguments),c=r?w.get(r,{select:["id"]}):i.resolve(),s=g().getManifestBySlug(t).tap(function(e){if(null==e)throw new a.ResinInvalidDeviceType(t)}),i.all([s,c]).then(function(r){var n,i,s;if(n=r[0],s=r[1],"DISCONTINUED"===n.state)throw new a.ResinDiscontinuedDeviceType(t);return i=s?{application:s.id}:{},k.post({resource:"application",body:o({app_name:e,device_type:n.slug},i)})}).asCallback(n)},w.remove=function(e,t){return x(e).then(function(e){return k.delete({resource:"application",id:e})}).catch(v,m(e)).asCallback(t)},w.restart=function(e,t){return x(e).then(function(e){return E.send({method:"POST",url:"/application/"+e+"/restart",baseUrl:f})}).return(void 0).catch(v,m(e)).asCallback(t)},w.generateApiKey=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,E.send({method:"POST",url:"/application/"+t+"/generate-api-key",baseUrl:f})}).get("body").asCallback(t)},w.purge=function(e,t){return E.send({method:"POST",url:"/supervisor/v1/purge",baseUrl:f,body:{appId:e,data:{appId:""+e}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(t)},w.shutdown=function(e,t,r){return null==t&&(t={}),E.send({method:"POST",url:"/supervisor/v1/shutdown",baseUrl:f,body:{appId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(r)},w.reboot=function(e,t,r){return null==t&&(t={}),E.send({method:"POST",url:"/supervisor/v1/reboot",baseUrl:f,body:{appId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===n)throw new a.ResinSupervisorLockedError;throw e}).asCallback(r)},w.getApiKey=w.generateApiKey,w.enableDeviceUrls=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,k.patch({resource:"device",body:{is_web_accessible:!0},options:{filter:{application:t}}})}).asCallback(t)},w.disableDeviceUrls=function(e,t){return w.get(e,{select:"id"}).then(function(e){var t;return t=e.id,k.patch({resource:"device",body:{is_web_accessible:!1},options:{filter:{application:t}}})}).asCallback(t)},w.grantSupportAccess=function(e,t,r){if(null==t||t<=Date.now())throw new a.ResinInvalidParameterError("expiryTimestamp",t);return x(e).then(function(e){return k.patch({resource:"application",id:e,body:{support_expiry_date:t}})}).catch(v,m(e)).asCallback(r)},w.revokeSupportAccess=function(e,t){return x(e).then(function(e){return k.patch({resource:"application",id:e,body:{support_expiry_date:null}})}).catch(v,m(e)).asCallback(t)},w},t.exports=f},{"../util":21,"../util/device-os-version":18,"./device":11,bluebird:37,"lodash/assign":334,"lodash/filter":342,"lodash/forEach":346,"lodash/isArray":353,"lodash/isEmpty":359,"lodash/once":378,"lodash/size":383,"resin-errors":1}],8:[function(e,t,r){var n;n=function(e,t){var n,i,o;return o=e.request,n=t.apiUrl,i=t.isBrowser,r.getAccount=function(e){return o.send({method:"GET",url:"/user/billing/account",baseUrl:n}).get("body").asCallback(e)},r.getPlan=function(e){return o.send({method:"GET",url:"/user/billing/plan",baseUrl:n}).get("body").asCallback(e)},r.getBillingInfo=function(e){return o.send({method:"GET",url:"/user/billing/info",baseUrl:n}).get("body").asCallback(e)},r.updateBillingInfo=function(e,t){return o.send({method:"POST",url:"/user/billing/info",baseUrl:n,body:e}).get("body").asCallback(t)},r.getInvoices=function(e){return o.send({method:"GET",url:"/user/billing/invoices",baseUrl:n}).get("body").asCallback(e)},r.downloadInvoice=function(e,t){var r;return r="/user/billing/invoices/"+e+"/download",i?o.send({method:"GET",url:r,baseUrl:n,responseFormat:"blob"}).get("body").asCallback(t):o.stream({method:"GET",url:r,baseUrl:n}).asCallback(t)},r},t.exports=n},{}],9:[function(e,t,r){var n,i,o,a,s,u;s=e("lodash/once"),n=e("resin-errors"),u=e("../util"),i=u.findCallback,a=u.mergePineOptions,o=function(t,r){var o,u,c;return c=t.pine,o=s(function(){return e("./application")(t,r)}),u={},u.get=function(e,t,r){return null==t&&(t={}),r=i(arguments),c.get({resource:"build",id:e,options:a({},t)}).tap(function(t){if(null==t)throw new n.ResinBuildNotFound(e)}).asCallback(r)},u.getAllByApplication=function(e,t,r){return null==t&&(t={}),r=i(arguments),o().get(e,{select:"id"}).then(function(e){var r;return r=e.id,c.get({resource:"build",options:a({filter:{application:r},select:["id","created_at","commit_hash","push_timestamp","start_timestamp","end_timestamp","update_timestamp","project_type","source","status","message"],expand:{user:{$select:["id","username"]}},orderby:"created_at desc"},t)})}).asCallback(r)},u},t.exports=o},{"../util":21,"./application":7,"lodash/once":378,"resin-errors":1}],10:[function(e,t,r){var n,i,o,a;o=e("lodash/once"),a=e("lodash/union"),i=e("lodash/map"),n=function(t,r){var n,s,u,c;return c=t.request,n=r.apiUrl,s=o(function(){return e("./device")(t,r)}),u={},u.getAll=function(e){return c.send({method:"GET",url:"/config",baseUrl:n,refreshToken:!1}).get("body").then(function(e){return e.deviceTypes=i(e.deviceTypes,function(e){return"PREVIEW"===e.state&&(e.state="ALPHA",e.name=e.name.replace("(PREVIEW)","(ALPHA)")),"EXPERIMENTAL"===e.state&&(e.state="BETA",e.name=e.name.replace("(EXPERIMENTAL)","(BETA)")),e}),e}).asCallback(e)},u.getPubNubKeys=function(e){return u.getAll().get("pubnub").tap(function(e){if(null==e)throw new Error("No pubnub keys")}).asCallback(e)},u.getMixpanelToken=function(e){return u.getAll().get("mixpanelToken").tap(function(e){if(null==e)throw new Error("No mixpanel token")}).asCallback(e)},u.getDeviceTypes=function(e){return u.getAll().get("deviceTypes").tap(function(e){if(null==e)throw new Error("No device types")}).asCallback(e)},u.getDeviceOptions=function(e,t){return s().getManifestBySlug(e).then(function(e){return null==e.initialization&&(e.initialization={}),a(e.options,e.initialization.options)}).asCallback(t)},u},t.exports=n},{"./device":11,"lodash/map":372,"lodash/once":378,"lodash/union":392}],11:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m,w,x,S,k,E,j,A;j=e("url"),a=e("bluebird"),d=e("lodash/isEmpty"),p=e("lodash/isFinite"),m=e("lodash/once"),A=e("lodash/without"),c=e("lodash/find"),S=e("lodash/some"),h=e("lodash/includes"),v=e("lodash/map"),x=e("semver"),u=e("resin-errors"),s=e("resin-device-status"),w=e("../util"),w.onlyIf,b=w.isId,f=w.findCallback,y=w.mergePineOptions,_=w.notFoundResponse,E=w.treatAsMissingDevice,i=w.LOCKED_STATUS_CODE,k=w.timeSince,g=e("../util/device-os-version").normalizeDeviceOsVersion,o="1.8.0-alpha.0",n=5e4,l=function(t,r){var l,w,M,C,O,T,R,I,P,D,B,N,L;return B=t.pine,L=t.request,w=r.apiUrl,T=r.dashboardUrl,N=e("resin-register-device")({request:L}),O=m(function(){return e("./config")(t,r)}),M=m(function(){return e("./application")(t,r)}),C=e("../auth")(t,r),I={},null==T&&(T=w.replace(/api/,"dashboard")),D=function(e){return a.try(function(){return b(e)?e:I.get(e,{select:"id"}).get("id")})},I.ensureSupervisorCompatibility=R=a.method(function(e,t){if(x.lt(e,t))throw new Error("Incompatible supervisor version: "+e+" - must be >= "+t)}),I.getDashboardUrl=P=function(e){var t,r,n,i;for(null==e&&(e={}),i=["appId","deviceId"],t=0,n=i.length;t1)throw new u.ResinAmbiguousDevice(e)}).get(0)}).then(l).asCallback(r)},I.getByName=function(e,t,r){return null==t&&(t={}),r=f(arguments),I.getAll(y({filter:{name:e}},t)).tap(function(t){if(d(t))throw new u.ResinDeviceNotFound(e)}).asCallback(r)},I.getName=function(e,t){return I.get(e,{select:"name"}).get("name").asCallback(t)},I.getApplicationName=function(e,t){return I.get(e,{select:"application_name"}).get("application_name").asCallback(t)},I.getApplicationInfo=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t,baseUrl:w,body:{deviceId:e.id,appId:t,method:"GET"}})}).get("body").asCallback(t)})},I.has=function(e,t){return I.get(e,{select:[]}).return(!0).catch(u.ResinDeviceNotFound,function(){return!1}).asCallback(t)},I.isOnline=function(e,t){return I.get(e,{select:"is_online"}).get("is_online").asCallback(t)},I.getLocalIPAddresses=function(e,t){return I.get(e,{select:["is_online","ip_address","vpn_address"]}).then(function(t){var r,n,i,o;if(i=t.is_online,r=t.ip_address,o=t.vpn_address,!i)throw new Error("The device is offline: "+e);return n=r.split(" "),A(n,o)}).asCallback(t)},I.remove=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.delete({resource:"device",options:{filter:{uuid:t}}})}).asCallback(t)},I.identify=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/blink",baseUrl:w,body:{uuid:e.uuid}})}).return(void 0).asCallback(t)},I.rename=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{name:t},options:{filter:{uuid:r}}})}).asCallback(r)},I.note=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{note:t},options:{filter:{uuid:r}}})}).asCallback(r)},I.setCustomLocation=function(e,t,r){return I.get(e,{select:"uuid"}).then(function(e){var r;return r=e.uuid,B.patch({resource:"device",body:{custom_latitude:String(t.latitude),custom_longitude:String(t.longitude)},options:{filter:{uuid:r}}})}).asCallback(r)},I.unsetCustomLocation=function(e,t){return I.setCustomLocation(e,{latitude:"",longitude:""},t)},I.move=function(e,t,r){return a.props({device:I.get(e,{select:["uuid","device_type"]}),application:M().get(t,{select:["id","device_type"]})}).then(function(e){var r,n;if(r=e.application,n=e.device,n.device_type!==r.device_type)throw new Error("Incompatible application: "+t);return B.patch({resource:"device",body:{application:r.id},options:{filter:{uuid:n.uuid}}})}).asCallback(r)},I.startApplication=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t+"/start",baseUrl:w,body:{deviceId:e.id,appId:t},timeout:n})})}).get("body").get("containerId").asCallback(t)},I.stopApplication=function(e,t){return I.get(e).then(function(e){return R(e.supervisor_version,o).then(function(){var t;return t=e.application[0].id,L.send({method:"POST",url:"/supervisor/v1/apps/"+t+"/stop",baseUrl:w,body:{deviceId:e.id,appId:t},timeout:n})})}).get("body").get("containerId").asCallback(t)},I.restartApplication=function(e,t){return D(e).then(function(e){return L.send({method:"POST",url:"/device/"+e+"/restart",baseUrl:w,timeout:n})}).get("body").catch(_,E(e)).asCallback(t)},I.reboot=function(e,t,r){return null==t&&(t={}),r=f(arguments),D(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/reboot",baseUrl:w,body:{deviceId:e,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).get("body").catch(_,E(e)).asCallback(r)},I.shutdown=function(e,t,r){return null==t&&(t={}),r=f(arguments),I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/shutdown",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{force:Boolean(t.force)}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).asCallback(r)},I.purge=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/purge",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{appId:e.application[0].id}}}).catch(function(e){if(e.statusCode===i)throw new u.ResinSupervisorLockedError;throw e})}).asCallback(t)},I.update=function(e,t,r){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/update",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id,data:{force:Boolean(t.force)}}})}).asCallback(r)},I.getDisplayName=function(e,t){return I.getManifestBySlug(e).get("name").catch(function(e){if(!(e instanceof u.ResinInvalidDeviceType))throw e}).asCallback(t)},I.getDeviceSlug=function(e,t){return I.getManifestBySlug(e).get("slug").catch(function(e){if(!(e instanceof u.ResinInvalidDeviceType))throw e}).asCallback(t)},I.getSupportedDeviceTypes=function(e){return O().getDeviceTypes().then(function(e){return v(e,"name")}).asCallback(e)},I.getManifestBySlug=function(e,t){return O().getDeviceTypes().then(function(t){return c(t,function(t){return S([t.name===e,t.slug===e,h(t.aliases,e)])})}).then(function(t){if(null==t)throw new u.ResinInvalidDeviceType(e);return t}).asCallback(t)},I.getManifestByApplication=function(e,t){return M().get(e,{select:"device_type"}).get("device_type").then(I.getManifestBySlug).asCallback(t)},I.generateUniqueKey=N.generateUniqueKey,I.register=function(e,t,r){return a.props({userId:C.getUserId(),apiKey:M().getApiKey(e),application:M().get(e,{select:["id","device_type"]})}).then(function(e){var r,n,i;return i=e.userId,r=e.apiKey,n=e.application,N.register({userId:i,applicationId:n.id,uuid:t,deviceType:n.device_type,provisioningApiKey:r,apiEndpoint:w})}).asCallback(r)},I.generateDeviceKey=function(e,t){return D(e).then(function(e){return L.send({method:"POST",url:"/api-key/device/"+e+"/device-key",baseUrl:w})}).get("body").catch({code:"ResinRequestError",statusCode:500,body:"No device found to associate with the api key"},E(e)).asCallback(t)},I.hasDeviceUrl=function(e,t){return I.get(e,{select:"is_web_accessible"}).get("is_web_accessible").asCallback(t)},I.getDeviceUrl=function(e,t){return I.hasDeviceUrl(e).then(function(t){if(!t)throw new Error("Device is not web accessible: "+e);return O().getAll().get("deviceUrlsBase").then(function(t){return I.get(e,{select:"uuid"}).get("uuid").then(function(e){return"https://"+e+"."+t})})}).asCallback(t)},I.enableDeviceUrl=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.patch({resource:"device",body:{is_web_accessible:!0},options:{filter:{uuid:t}}})}).asCallback(t)},I.disableDeviceUrl=function(e,t){return I.get(e,{select:"uuid"}).then(function(e){var t;return t=e.uuid,B.patch({resource:"device",body:{is_web_accessible:!1},options:{filter:{uuid:t}}})}).asCallback(t)},I.enableTcpPing=function(e,t){return I.get(e).then(function(e){return L.send({method:"POST",url:"/supervisor/v1/tcp-ping",baseUrl:w,data:{deviceId:e.id,appId:e.application[0].id}})}).get("body").asCallback(t)},I.disableTcpPing=function(e,t){return I.get(e).then(function(e){return L.send({method:"DELETE",url:"/supervisor/v1/tcp-ping",baseUrl:w,data:{deviceId:e.id,appId:e.application[0].id}})}).get("body").asCallback(t)},I.ping=function(e,t){return I.get(e).then(function(e){return L.send({method:"GET",url:"/supervisor/ping",baseUrl:w,body:{deviceId:e.id,appId:e.application[0].id}})}).asCallback(t)},I.getStatus=function(e,t){return a.try(function(){return s.getStatus(e).key}).asCallback(t)},I.grantSupportAccess=function(e,t,r){if(null==t||t<=Date.now())throw new u.ResinInvalidParameterError("expiryTimestamp",t);return I.get(e,{select:"id"}).then(function(e){var r;return r=e.id,B.patch({resource:"device",id:r,body:{support_expiry_date:t}})}).asCallback(r)},I.revokeSupportAccess=function(e,t){return I.get(e,{select:"id"}).then(function(e){var t;return t=e.id,B.patch({resource:"device",id:t,body:{support_expiry_date:null}})}).asCallback(t)},I.lastOnline=function(e){var t;return t=e.last_connectivity_event,t?e.is_online?"Currently online (for "+k(t,!1)+")":k(t):"Connecting..."},I},t.exports=l},{"../auth":5,"../util":21,"../util/device-os-version":18,"./application":7,"./config":10,bluebird:37,"lodash/find":343,"lodash/includes":351,"lodash/isEmpty":359,"lodash/isFinite":360,"lodash/map":372,"lodash/once":378,"lodash/some":384,"lodash/without":394,"resin-device-status":468,"resin-errors":1,"resin-register-device":471,semver:481,url:495}],12:[function(e,t,r){var n,i,o,a;n=e("bluebird"),i=e("resin-errors"),a=e("lodash/once"),o=function(t,r){var o,s,u,c,f,l;return l=t.pine,s=a(function(){return e("./device")(t,r)}),o=a(function(){return e("./application")(t,r)}),u={},f=function(e){return null!=/^[a-zA-Z_]+[a-zA-Z0-9_]*$/.exec(e)}, +u.getAllByApplication=function(e,t){return o().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"environment_variable",options:{filter:{application:t},orderby:"name asc"}})}).asCallback(t)},u.create=function(e,t,r,a){return n.try(function(){if(!f(t))throw new i.ResinInvalidParameterError("envVarName",t);return o().get(e,{select:"id"}).then(function(e){var n;return n=e.id,l.post({resource:"environment_variable",body:{name:t,value:String(r),application:n}})})}).asCallback(a)},u.update=function(e,t,r){return l.patch({resource:"environment_variable",id:e,body:{value:t}}).asCallback(r)},u.remove=function(e,t){return l.delete({resource:"environment_variable",id:e}).asCallback(t)},u.isSystemVariable=function(e){return/^RESIN_|^RESIN$|^USER$/.test(e.name)},c=function(e){return null!=e.env_var_name&&(e.name=e.env_var_name,delete e.env_var_name),e},u.device={},u.device.getAll=function(e,t){return s().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"device_environment_variable",options:{filter:{device:t},expand:"device",orderby:"env_var_name asc"}})}).map(c).asCallback(t)},u.device.getAllByApplication=function(e,t){return o().get(e,{select:"id"}).then(function(e){var t;return t=e.id,l.get({resource:"device_environment_variable",options:{filter:{device:{$any:{$alias:"d",$expr:{d:{application:t}}}}},expand:"device",orderby:"env_var_name asc"}})}).map(c).asCallback(t)},u.device.create=function(e,t,r,o){return n.try(function(){if(!f(t))throw new i.ResinInvalidParameterError("envVarName",t);return s().get(e,{select:"id"}).then(function(e){var n;return n=e.id,l.post({resource:"device_environment_variable",body:{device:n,env_var_name:t,value:String(r)}})}).then(c)}).asCallback(o)},u.device.update=function(e,t,r){return l.patch({resource:"device_environment_variable",id:e,body:{value:t}}).then(c).asCallback(r)},u.device.remove=function(e,t){return l.delete({resource:"device_environment_variable",id:e}).asCallback(t)},u},t.exports=o},{"./application":7,"./device":11,bluebird:37,"lodash/once":378,"resin-errors":1}],13:[function(e,t,r){var n,i;n=e("lodash/mapValues"),i={application:e("./application"),device:e("./device"),key:e("./key"),environmentVariables:e("./environment-variables"),os:e("./os"),config:e("./config"),build:e("./build"),billing:e("./billing")},t.exports=function(e,t){return n(i,function(r){return r(e,t)})}},{"./application":7,"./billing":8,"./build":9,"./config":10,"./device":11,"./environment-variables":12,"./key":14,"./os":15,"lodash/mapValues":373}],14:[function(e,t,r){var n,i,o,a,s,u,c;n=e("bluebird"),s=e("lodash/isEmpty"),i=e("resin-errors"),c=e("../util"),o=c.findCallback,u=c.mergePineOptions,a=function(t,r){var a,c,f;return f=t.pine,a=e("../auth")(t,r),c={},c.getAll=function(e,t){return null==e&&(e={}),t=o(arguments),f.get({resource:"user__has__public_key",options:u({},e)}).asCallback(t)},c.get=function(e,t){return f.get({resource:"user__has__public_key",id:e}).tap(function(t){if(s(t))throw new i.ResinKeyNotFound(e)}).asCallback(t)},c.remove=function(e,t){return f.delete({resource:"user__has__public_key",id:e}).asCallback(t)},c.create=function(e,t,r){return n.try(function(){return t=t.trim(),a.getUserId().then(function(r){return f.post({resource:"user__has__public_key",body:{title:e,public_key:t,user:r}})})}).asCallback(r)},c},t.exports=a},{"../auth":5,"../util":21,bluebird:37,"lodash/isEmpty":359,"resin-errors":1}],15:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g;e("bluebird"),v=e("lodash/reject"),h=e("lodash/once"),e("lodash/partition"),y=e("semver"),i=e("lodash"),a=e("resin-errors"),b=e("../util"),d=b.onlyIf,u=b.getImgMakerHelper,s=b.findCallback,l=b.notFoundResponse,g=b.treatAsMissingApplication,o=b.deviceTypes,p=b.osVersionRCompare,f=b.isDevelopmentVersion,n=/v?\d+\.\d+\.\d+(\.rev\d+)?((\-|\+).+)?/,c=function(t,r){var c,b,_,m,w,x,S,k,E,j,A,M,C,O,T,R;return T=t.request,c=r.apiUrl,M=r.isBrowser,j=r.imageMakerUrl,A=u(j,T),_=h(function(){return e("./config")(t,r)}),b=h(function(){return e("./application")(t,r)}),S=h(function(){return _().getDeviceTypes()}),C=function(e){return S().then(function(t){return!!o.findBySlug(t,e)})},k=A.buildApiRequester({buildUrl:function(e){var t,r;return t=e.deviceType,r=e.version,"/size_estimate?deviceType="+t+"&version="+r},postProcess:function(e){var t;return t=e.body,t.size}}),E=A.buildApiRequester({buildUrl:function(e){return"/image/"+e.deviceType+"/versions"},postProcess:function(e){var t,r,n,i,o;return i=e.body,o=i.versions,t=i.latest,o.sort(p),r=v(o,function(e){return y.prerelease(e)||f(e)}),n=(null!=r?r[0]:void 0)||null,{versions:o,recommended:n,latest:t,default:n||t}}}),O=function(e){var t;if(!e)throw new Error("Invalid version: "+e);if("latest"===e)return e;if(t="v"===e[0]?e.substring(1):e,!n.test(t))throw new Error("Invalid semver version: "+e);return t},m=function(e,t){return"/image/"+e+"/?version="+encodeURIComponent(t)},w={},x=function(e){return null!=e?null!=e?e.replace(/\.rev(\d+)/,"+FIXED-rev$1"):void 0:e},R=function(e){return null!=e?e.replace(/\+FIXED-rev(\d+)/,".rev$1"):e},w._getMaxSatisfyingVersion=function(e,t){var r,n;return"default"===e||"latest"===e||"recommended"===e?t[e]:(n=t.versions.map(x),r=y.maxSatisfying(n,x(e)),R(r))},w.getDownloadSize=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(r){if(!r)throw new a.ResinInvalidDeviceType("No such device type");return k(e,t)}).asCallback(r)},w.getSupportedVersions=function(e,t){return t=s(arguments),C(e).then(function(t){if(!t)throw new a.ResinInvalidDeviceType("No such device type");return E(e)}).asCallback(t)},w.getMaxSatisfyingVersion=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(t){if(!t)throw new a.ResinInvalidDeviceType("No such device type");return w.getSupportedVersions(e)}).then(function(e){return w._getMaxSatisfyingVersion(t,e)}).asCallback(r)},w.getLastModified=function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(e){if(!e)throw new a.ResinInvalidDeviceType("No such device type");return O(t)}).then(function(t){return A.request({method:"HEAD",url:m(e,t)})}).catch(l,function(){throw new Error("No such version for the device type")}).then(function(e){return new Date(e.headers.get("last-modified"))}).asCallback(r)},w.download=d(!M)(function(e,t,r){return null==t&&(t="latest"),r=s(arguments),C(e).then(function(e){if(!e)throw new a.ResinInvalidDeviceType("No such device type");return O(t)}).then(function(t){return A.stream({url:m(e,t)})}).catch(l,function(){throw new Error("No such version for the device type")}).asCallback(r)}),w.getConfig=function(e,t,r){var n;return null==t&&(t={}),r=s(arguments),n={network:"ethernet"},i.defaults(t,n),b()._getId(e).then(function(e){return T.send({method:"POST",url:"/download-config",baseUrl:c,body:i.assign(t,{appId:e})})}).get("body").catch(l,g(e)).asCallback(r)},w},t.exports=c},{"../util":21,"./application":7,"./config":10,bluebird:37,lodash:371,"lodash/once":378,"lodash/partition":380,"lodash/reject":382,"resin-errors":1,semver:481}],16:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b;a=e("lodash/assign"),d=e("lodash/mapValues"),s=e("lodash/defaults"),f=e("resin-request"),h=e("resin-token"),c=e("resin-pine"),u=e("resin-errors"),p=e("./util").notImplemented,o="RESIN_SDK_SHARED_OPTIONS",i="RESIN_SDK_HAS_USED_SHARED_OPTIONS",n="RESIN_SDK_HAS_SET_SHARED_OPTIONS",b={models:e("./models"),auth:e("./auth"),logs:e("./logs"),settings:e("./settings")},l=function(t){var r,n,i,o,l,v;return null==t&&(t={}),s(t,{apiUrl:"https://api.resin.io/",imageMakerUrl:"https://img.resin.io/",apiVersion:"v2",isBrowser:"undefined"!=typeof window&&null!==window}),t.isBrowser?l={get:p,getAll:p}:(l=e("resin-settings-client"),s(t,{dataDirectory:l.get("dataDirectory")})),v=h(t),i=f(a({},t,{token:v})),n=c(a({},t,{token:v,request:i})),r={settings:l,request:i,token:v,pine:n},o=d(b,function(e){return e(r,t)}),Object.defineProperty(o,"interceptors",{get:function(){return i.interceptors},set:function(e){return i.interceptors=e}}),o.request=i,o.token=v,o.pine=n,o.errors=u,o},l.setSharedOptions=function(e){var t;return t="undefined"!=typeof window&&null!==window?window:GLOBAL,t[i]&&console.error("Shared SDK options have already been used. You may have a race condition in your code."),t[n]&&console.error("Shared SDK options have already been set. You may have a race condition in your code."),t[o]=e,t[n]=!0},l.fromSharedOptions=function(){var e,t;return e="undefined"!=typeof window&&null!==window?window:GLOBAL,t=e[o],e[i]=!0,l(t)},t.exports=l},{"./auth":5,"./logs":6,"./models":13,"./settings":17,"./util":21,"lodash/assign":334,"lodash/defaults":340,"lodash/mapValues":373,"resin-errors":1,"resin-pine":469,"resin-request":473,"resin-settings-client":void 0,"resin-token":478}],17:[function(e,t,r){var n,i;n=e("bluebird"),i=function(e,t){var i;return i=e.settings,{},r.get=function(e,t){return n.try(function(){return i.get(e)}).asCallback(t)},r.getAll=function(e){return n.try(function(){return i.getAll()}).asCallback(e)},r},t.exports=i},{bluebird:37}],18:[function(e,t,r){var n,i;n=e("lodash/isEmpty"),i=e(".").isProvisioned,r.normalizeDeviceOsVersion=function(e){null!=e.os_version&&n(e.os_version)&&i(e)&&(e.os_version="Resin OS 1.0.0-pre")}},{".":21,"lodash/isEmpty":359}],19:[function(e,t,r){var n,i,o,a,s=[].indexOf||function(e){for(var t=0,r=this.length;t=0},n=function(e){return function(t){return t.slug===e||a(t.aliases,e)}},r.findBySlug=o=function(e,t){return i(e,n(t))},r.normalizeDeviceType=function(e,t){var r;return null!=(r=o(e,t))?r.slug:void 0}},{}],20:[function(e,t,r){var n,i,o,a,s,u;a=e("lodash/assign"),u=e("promise-memoize"),o="1",i="/api/v"+o,n=6e5,s=function(e,t){var r,o,s;return o={},r=function(t){var r;return r=t.url,r=""+i+r,a({method:"GET"},t,{url:r,baseUrl:e,refreshToken:!1})},o.request=s=function(e){return t.send(r(e))},o.stream=function(e){return t.stream(r(e))},o.buildApiRequester=function(e){var t,r,i,o,a,c,f,l,h;return f=null!=e?e:{},t=f.buildUrl,c=null!=(l=f.postProcess)?l:function(e){return e},a=null!=(h=f.onError)?h:function(e){throw e},i=f.maxAge,r=function(e,r){return s({url:t({deviceType:encodeURIComponent(e),version:encodeURIComponent(r)})}).then(c).catch(a)},void 0===i?i=n:null===i&&(i=void 0),o=u(r,{maxAge:i}),function(e,t){return null==t&&(t="latest"),o(e,t)}},o},t.exports=s},{"lodash/assign":334,"promise-memoize":429}],21:[function(e,t,r){var n,i,o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m,w,x,S={}.hasOwnProperty;a=e("resin-errors"),w=e("semver"),n=e("lodash/cloneDeep"),s=e("lodash/fromPairs"),c=e("lodash/includes"),f=e("lodash/isArray"),l=e("lodash/isEmpty"),h=e("lodash/isFunction"),d=e("lodash/isNumber"),p=e("lodash/isString"),x=e("lodash/throttle"),b=e("memoizee"),y=e("moment"),r.deviceTypes=e("./device-types"),r.getImgMakerHelper=e("./img-maker"),r.notImplemented=g=function(){throw new Error("The method is not implemented.")},r.onlyIf=function(e){return function(t){return e?t:g}},r.now=_=x(function(){return y()},1e3,{leading:!0}),r.dateToMoment=o=b(function(e){return y(e)},{max:1e3,primitive:!0}),r.timeSince=function(e,t){var r,n;return null==t&&(t=!0),r=o(e),n=_(),y.min(n,r).from(n,!t)},r.isId=d,r.LOCKED_STATUS_CODE=423,r.findCallback=function(e){var t;return t=e[e.length-1],h(t)?t:null},r.notFoundResponse={code:"ResinRequestError",statusCode:404},r.treatAsMissingApplication=function(e){return function(t){var r;throw r=new a.ResinApplicationNotFound(e),r.stack=t.stack,r}},r.treatAsMissingDevice=function(e){return function(t){var r;throw r=new a.ResinDeviceNotFound(e),r.stack=t.stack,r}},m=function(e){return e.replace(/(\.[0-9]+)\.rev/,"$1+rev")},r.osVersionRCompare=function(e,t){var n,i,o,a,s;return e=m(e),t=m(t),0!==(s=w.rcompare(e,t))?s:(o=u(e),a=u(t),o!==a?a-o:(n=r.isDevelopmentVersion(e),i=r.isDevelopmentVersion(t),n!==i?n-i:e.localeCompare(t)))},r.isDevelopmentVersion=function(e){return/(\.|\+|-)dev/.test(e)},r.isProvisioned=function(e){return!l(e.supervisor_version)&&!l(e.last_connectivity_event)},u=function(e){var t;return t=w.parse(e).build.map(function(e){var t;return null!=(t=/rev(\d+)/.exec(e))?t[1]:void 0}).filter(function(e){return null!=e})[0],null!=t?parseInt(t,10):0},r.mergePineOptions=function(e,t){var r,i,o;if(!t)return e;i=n(e);for(r in t)if(S.call(t,r))switch(o=t[r],r){case"select":null!=o&&(f(o)||(o=[o]),c(o,"id")||o.unshift("id")),i[r]=o;break;case"orderby":case"top":case"skip":i[r]=o;break;case"filter":e.filter?i.filter={$and:[e.filter,o]}:i.filter=o;break;case"expand":i.expand=v(e.expand,o);break;default:throw new Error("Unknown pine option: "+r)}return i},v=function(e,t){var r,n,o;if(null==e)return t;e=i(e),t=i(t);for(r in t)S.call(t,r)&&(o=t[r],n=e[r]||(e[r]={}),o.$select&&(n.$select=o.$select),o.$expand&&(n.$expand=v(n.$expand,o.$expand)));return e},i=function(e){var t,r,i,o;if(null==e)return{};if(p(e))return o={},o[""+e]={},o;if(f(e))return s(e.map(function(e){return[e,{}]}));for(t in e)if(S.call(e,t)&&(r=e[t],i=Object.keys(r).filter(function(e){return"$select"!==e&&"$expand"!==e}),i.length>0))throw new Error("Unknown pine expand options: "+i);return n(e)}},{"./device-types":19,"./img-maker":20,"lodash/cloneDeep":337,"lodash/fromPairs":347,"lodash/includes":351,"lodash/isArray":353,"lodash/isEmpty":359,"lodash/isFunction":361,"lodash/isNumber":363,"lodash/isString":366,"lodash/throttle":387,memoizee:402,moment:417,"resin-errors":1,semver:481}],22:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":23,"./asn1/base":25,"./asn1/constants":29,"./asn1/decoders":31,"./asn1/encoders":34,"bn.js":38}],23:[function(e,t,r){function n(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var i=e("../asn1"),o=e("inherits");r.define=function(e,t){return new n(e,t)},n.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return o(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},n.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},n.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},n.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},n.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":22,inherits:164,vm:498}],24:[function(e,t,r){function n(e,t){if(a.call(this,t),!s.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function i(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof i||(e=new i(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var o=e("inherits"),a=e("../base").Reporter,s=e("buffer").Buffer;o(n,a),r.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},n.prototype.restore=function(e){var t=new n(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,a.prototype.restore.call(this,e.reporter),t},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},n.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},n.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=i,i.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":25,buffer:67,inherits:164}],25:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":24,"./node":26,"./reporter":27}],26:[function(e,t,r){function n(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var i=e("../base").Reporter,o=e("../base").EncoderBuffer,a=e("../base").DecoderBuffer,s=e("minimalistic-assert"),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u),f=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=n;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];n.prototype.clone=function(){var e=this._baseState,t={};l.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},n.prototype._wrap=function(){var e=this._baseState;c.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},n.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},n.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0),t[e[r]]=r}),t}))},f.forEach(function(e){n.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),u.forEach(function(e){n.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}}),n.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},n.prototype.optional=function(){return this._baseState.optional=!0,this},n.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},n.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},n.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},n.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},n.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},n.prototype.any=function(){return this._baseState.any=!0,this},n.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},n.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},n.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n=r.default,i=!0,o=null;if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){var s=null;if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(i=this._peekTag(e,s,r.any),e.isError(i))return i}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),i=!0}catch(e){i=!1}e.restore(u)}}var c;if(r.obj&&i&&(c=e.enterObject()),i){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)var u=e.save();var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?n=e.raw(u):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),n=r.any?n:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(n);n=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&i&&(n=e.leaveObject(c)),null===r.key||null===n&&i!==!0?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,n),n},n.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},n.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},n.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},n.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},n.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},n.prototype._encodeValue=function(e,t,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new i);var o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}var a=null,s=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)a=this._getUse(n.contains,r)._encode(e,t),s=!0;else if(n.children)a=n.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},u))}else null!==n.use?o=this._getUse(n.use,r)._encode(e,t):(a=this._encodePrimitive(n.tag,e),s=!0);var o;if(!n.any&&null===n.choice){var c=null!==n.implicit?n.implicit:n.tag,f=null===n.implicit?"universal":"context";null===c?null===n.use&&t.error("Tag could be ommited only for .use()"):null===n.use&&(o=this._encodeComposite(c,s,f,a))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},n.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},n.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},n.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},n.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":25,"minimalistic-assert":415}],27:[function(e,t,r){function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}var o=e("inherits");r.Reporter=n,n.prototype.isError=function(e){return e instanceof i},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof i;if(t=n?e:new i(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},o(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:164}],28:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":29}],29:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0),t[e[r]]=r}),t},n.der=e("./der")},{"./der":28}],30:[function(e,t,r){function n(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new i,this.tree._init(e.body)}function i(e){c.Node.call(this,"der",e)}function o(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=l.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:l.tag[r]}}function a(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=l.tagClassByName[r||"universal"]<<6)}var s=e("inherits"),u=e("buffer").Buffer,c=e("../../asn1"),f=c.base,l=c.constants.der;t.exports=n,n.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(i,f.Node),i.prototype._encodeComposite=function(e,t,r,n){var i=a(e,t,r,this.reporter);if(n.length<128){var o=new u(2);return o[0]=i,o[1]=n.length,this._createEncoderBuffer([o,n])}for(var s=1,c=n.length;c>=256;c>>=8)s++;var o=new u(2+s);o[0]=i,o[1]=128|s;for(var c=1+s,f=n.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,n])},i.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new u(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0;n=128;o>>=7)i++}for(var a=new u(i),s=a.length-1,n=e.length-1;n>=0;n--){var o=e[n];for(a[s--]=127&o;(o>>=7)>0;)a[s--]=128|127&o}return this._createEncoderBuffer(a)},i.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[o(n.getFullYear()),o(n.getUTCMonth()+1),o(n.getUTCDate()),o(n.getUTCHours()),o(n.getUTCMinutes()),o(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[o(n.getFullYear()%100),o(n.getUTCMonth()+1),o(n.getUTCDate()),o(n.getUTCHours()),o(n.getUTCMinutes()),o(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!u.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new u(r)}if(u.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new u(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,o=e;o>=256;o>>=8)n++;for(var i=new Array(n),o=i.length-1;o>=0;o--)i[o]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new u(i))},i.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},i.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},i.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,a,s,u=e.length;a=n(e),s=new l(3*u/4-a),i=a>0?u-4:u;var c=0;for(t=0,r=0;t>16&255,s[c++]=o>>8&255,s[c++]=255&o;return 2===a?(o=f[e.charCodeAt(t)]<<2|f[e.charCodeAt(t+1)]>>4,s[c++]=255&o):1===a&&(o=f[e.charCodeAt(t)]<<10|f[e.charCodeAt(t+1)]<<4|f[e.charCodeAt(t+2)]>>2,s[c++]=o>>8&255,s[c++]=255&o),s}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,r){for(var n,i=[],o=t;ou?u:a+16383));return 1===n?(t=e[r-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=u;for(var c=[],f=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),n=e.shift();t.call(r,n)}else t._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),f=new e(t);f._propagateFrom(this,1);var l=this._target();if(f._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:f,target:l,bindingPromise:c};l._then(t,a,void 0,f,h),c._then(s,u,void 0,f,h),f._setOnCancel(c)}else f._resolveCallback(l);return f},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=this._bitField&-2097153},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(e){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=e("./promise")();o.noConflict=n,t.exports=o},{"./promise":22}],5:[function(e,t,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){function r(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+s.classString(e)+" has no method '"+s.toString(r)+"'";throw new t.TypeError(i)}return n}function n(e){return r(e,this.pop()).apply(e,this)}function i(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),u=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(n,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,r="number"==typeof e;if(r)t=o;else if(u){var n=a(e);t=null!==n?n:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r=0)return o[e]}var i=!1,o=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=o.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=r,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,u=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=u,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(e,t){return{promise:t}}function o(){return!1}function a(e,t,r){var n=this;try{e(t,r,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+F.toString(e));n._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?F.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function u(){return this._onCancelField}function c(e){this._onCancelField=e}function f(){this._cancellationParent=void 0,this._onCancelField=void 0}function l(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function d(){var e=this._boundTo;return void 0!==e&&e instanceof r?e.isFulfilled()?e.value():void 0:e}function p(){this._trace=new R(this._peekContext())}function b(e,t){if(U(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=k(e);F.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),F.notEnumerableProp(e,"__stackCleaned__",!0)}}}function v(e,t,r,n,i){if(void 0===e&&null!==t&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),u=x(s),c=u.length-1;c>=0;--c){var f=u[c];if(!q.test(f)){var l=f.match(K);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0)for(var h=u[0],c=0;c0&&(a="\n"+s[c-1]);break}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(d,!0,t)}}function y(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),g(r)}function g(e,t,n){if(ae.warnings){var i,o=new L(e);if(t)n._attachExtraTrace(o);else if(ae.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}te("warning",o)||E(o,"",!0)}}function _(e,t){for(var r=0;r=0;--s)if(n[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(t[i]!==u)break;t.pop(),i--}t=n}}function x(e){for(var t=[],r=0;r0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function k(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?S(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:x(t)}}function E(e,t,r){if("undefined"!=typeof console){var n;if(F.isObject(e)){n=t+G(e.stack,e)}else n=t+String(e);"function"==typeof D?D(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function j(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){N.throwLater(e)}"unhandledRejection"===e?te(e,r,n)||i||E(r,"Unhandled rejection "):te(e,n)}function A(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():F.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+M(t)+">, no stack trace)"}function M(e){return e.length<41?e:e.substr(0,38)+"..."}function C(){return"function"==typeof oe}function O(e){var t=e.match(ie);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function T(e,t){if(C()){for(var r,n,i=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,u=0;u=s||(ne=function(e){if(z.test(e))return!0;var t=O(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}}function R(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);oe(this,R),t>32&&this.uncycle()}var I,P,D,B=r._getDomain,N=r._async,L=t("./errors").Warning,F=t("./util"),U=F.canAttachTrace,z=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,K=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,G=null,V=!1,Y=!(0==F.env("BLUEBIRD_DEBUG")),W=!(0==F.env("BLUEBIRD_WARNINGS")||!Y&&!F.env("BLUEBIRD_WARNINGS")),$=!(0==F.env("BLUEBIRD_LONG_STACK_TRACES")||!Y&&!F.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=F.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!F.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),N.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",I,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",P,e,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(e,t,r){return g(e,t,r||this)},r.onPossiblyUnhandledRejection=function(e){var t=B();P="function"==typeof e?null===t?e:F.domainBind(t,e):void 0},r.onUnhandledRejectionHandled=function(e){var t=B();I="function"==typeof e?null===t?e:F.domainBind(t,e):void 0};var Z=function(){};r.longStackTraces=function(){if(N.haveItemsQueued()&&!ae.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ae.longStackTraces&&C()){var e=r.prototype._captureStackTrace,t=r.prototype._attachExtraTrace;ae.longStackTraces=!0,Z=function(){if(N.haveItemsQueued()&&!ae.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=e,r.prototype._attachExtraTrace=t,n.deactivateLongStackTraces(),N.enableTrampoline(),ae.longStackTraces=!1},r.prototype._captureStackTrace=p,r.prototype._attachExtraTrace=b,n.activateLongStackTraces(),N.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return ae.longStackTraces&&C()};var J=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return F.global.dispatchEvent(e),function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!F.global.dispatchEvent(r)}}if("function"==typeof Event){var e=new Event("CustomEvent");return F.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,!F.global.dispatchEvent(r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),F.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!F.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),Q=function(){return F.isNode?function(){return e.emit.apply(e,arguments)}:F.global?function(e){var t="on"+e.toLowerCase(),r=F.global[t];return!!r&&(r.apply(F.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),ee={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:i},te=function(e){var t=!1;try{t=Q.apply(null,arguments)}catch(e){N.throwLater(e),t=!0}var r=!1;try{r=J(e,ee[e].apply(null,arguments))}catch(e){N.throwLater(e),r=!0}return r||t};r.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?r.longStackTraces():!e.longStackTraces&&r.hasLongStackTraces()&&Z()),"warnings"in e){var t=e.warnings;ae.warnings=!!t,X=ae.warnings,F.isObject(t)&&"wForgottenReturn"in t&&(X=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ae.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=f,r.prototype._propagateFrom=l,r.prototype._onCancel=u,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,re=l,ae.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!ae.monitoring?(ae.monitoring=!0,r.prototype._fireEvent=te):!e.monitoring&&ae.monitoring&&(ae.monitoring=!1,r.prototype._fireEvent=o)),r},r.prototype._fireEvent=o,r.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(e){},r.prototype._attachCancellationCallback=function(e){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(e,t){};var re=h,ne=function(){return!1},ie=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;F.inherits(R,Error),n.CapturedTrace=R,R.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;e=this._length=n;for(var n=e-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var u=n>0?t[n-1]:this;s=0;--f)t[f]._length=c,c++;return}}}},R.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=k(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(x(i.stack.split("\n"))),i=i._parent;w(n),m(n),F.notEnumerableProp(e,"stack",_(r,n)),F.notEnumerableProp(e,"__stackCleaned__",!0)}};var oe=function(){var e=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():A(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=/^\s*at\s*/,G=e;var t=Error.captureStackTrace;return ne=function(e){return z.test(e)},function(e,r){Error.stackTraceLimit+=6,t(e,r),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,G=e,V=!0,function(e){e.stack=(new Error).stack};var n;try{throw new Error}catch(e){n="stack"in e}return"stack"in r||!n||"number"!=typeof Error.stackTraceLimit?(G=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?A(t):t.toString()},null):(H=/^\s*at\s*/,G=e,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(D=function(e){console.warn(e)},F.isNode&&e.stderr.isTTY?D=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:F.isNode||"string"!=typeof(new Error).stack||(D=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ae={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return $&&r.longStackTraces(),{longStackTraces:function(){return ae.longStackTraces},warnings:function(){return ae.warnings},cancellation:function(){return ae.cancellation},monitoring:function(){return ae.monitoring},propagateFromFunction:function(){return re},boundValueFunction:function(){return d},checkForgottenReturns:v,setBounds:T,warn:g,deprecated:y,CapturedTrace:R,fireDomEvent:J,fireGlobalEvent:Q}}},{"./errors":12,"./util":36}],10:[function(e,t,r){"use strict";t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){function r(){return o(this)}function n(e,r){return i(e,r,t,t)}var i=e.reduce,o=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(r,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,n){return i(e,n,t,0)._then(r,void 0,void 0,e,void 0)},e.mapSeries=n}},{}],12:[function(e,t,r){"use strict";function n(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return f(r,Error),r}function i(e){if(!(this instanceof i))return new i(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=e("./es5"),u=s.freeze,c=e("./util"),f=c.inherits,l=c.notEnumerableProp,h=n("Warning","warning"),d=n("CancellationError","cancellation error"),p=n("TimeoutError","timeout error"),b=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function u(e){if(!a(this,e))return h.e=e,h}function c(e){var i=this.promise,c=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?c.call(i._boundValue()):c.call(i._boundValue(),e);if(f===n)return f;if(void 0!==f){i._setReturnedNonUndefined();var d=r(f,i);if(d instanceof t){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new l("late cancellation observer");return i._attachExtraTrace(p),h.e=p,h}d.isPending()&&d._attachCancellationCallback(new o(this))}return d._then(s,u,void 0,this,void 0)}}}return i.isRejected()?(a(this),h.e=e,h):(a(this),e)}var f=e("./util"),l=t.CancellationError,h=f.errorObj,d=e("./catch_filter")(n);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,c,c)},t.prototype.tap=function(e){return this._passThrough(e,1,c)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,c);var n,i=new Array(r-1),o=0;for(n=0;n0&&"function"==typeof arguments[t]){e=arguments[t];var n}var i=[].slice.call(arguments);e&&i.pop();var n=new r(i).promise();return void 0!==e?n.spread(e):n}}},{"./util":36}],18:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function s(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=c();this._callback=null===i?t:f.domainBind(i,t),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function u(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+f.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+f.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+f.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,r,a,o).promise()}var c=t._getDomain,f=e("./util"),l=f.tryCatch,h=f.errorObj,d=t._async;f.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var c=this._promise,f=this._callback,d=c._boundValue();c._pushContext();var p=l(f).call(d,e,r,o),b=c._popContext();if(a.checkForgottenReturns(p,b,null!==s?"Promise.filter":"Promise.map",c),p===h)return this._reject(p.e),!0;var v=i(p,this._promise);if(v instanceof t){v=v._target();var y=v._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,(r+1)*-1),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);p=v._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],f=arguments[2];u=a.isArray(c)?s(e).apply(f,c):s(e).call(f,c)}else u=s(e)();var l=n._popContext();return o.checkForgottenReturns(u,l,"Promise.try",n),n._resolveFromSyncValue(u),n},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){"use strict";function n(e){return e instanceof Error&&f.getPrototypeOf(e)===Error.prototype}function i(e){var t;if(n(e)){t=new c(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var r=f.keys(e),i=0;i1){var r,n=new Array(t-1),i=0;for(r=0;r0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(r+=", "+p.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?h("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},o.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},o.getNewLibraryCopy=r.exports,o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(w);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(e)(T(t,r));return n===R&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new E(e).promise()},o.cast=function(e){var t=k(e);return t instanceof o||(t=new o(w),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(w);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new _("expecting a function but got "+p.classString(e));return y.setScheduler(e)},o.prototype._then=function(e,t,r,n,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),f=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=c();if(0!=(50397184&f)){var h,d,b=u._settlePromiseCtx;0!=(33554432&f)?(d=u._rejectionHandler0,h=e):0!=(16777216&f)?(d=u._fulfillmentHandler0,h=t,u._unsetRejectionIsUnhandled()):(b=u._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),u._attachExtraTrace(d),h=t),y.invoke(b,u,{handler:null===l?h:"function"==typeof h&&p.domainBind(l,h),promise:s,receiver:n,value:d})}else u._addCallbacks(e,t,s,n,l);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(e){this._bitField=this._bitField&-65536|65535&e},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){y.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==d)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=d),this._addCallbacks(t,r,n,i,null)},o.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=d),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:p.domainBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this[a+1]=null===i?t:p.domainBind(i,t))}return this._setLength(o+1),o},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(f(),!1);var r=k(e,this);if(!(r instanceof o))return this._fulfill(e);t&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(f());var i=n._bitField;if(0==(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var r=f();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():y.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return y.fatalError(e,p.isNode);(65535&t)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(e,t){for(var r=1;r0){if(0!=(16842752&e)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return M.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",f),t("./method")(o,w,k,h,M),t("./bind")(o,w,k,M),t("./cancel")(o,E,h,M),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,E,k,w,y,c),o.Promise=o,o.version="3.5.0",t("./map.js")(o,E,h,k,w,M),t("./call_get.js")(o),t("./using.js")(o,h,k,A,w,M),t("./timers.js")(o,w,M),t("./generators.js")(o,h,w,k,n,M),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,E,k,h),t("./race.js")(o,w,k,h),t("./reduce.js")(o,E,h,k,w,M),t("./settle.js")(o,E,M),t("./some.js")(o,E,h),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),M.setBounds(v.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function s(e){var n=this._promise=new t(r);e instanceof t&&n._propagateFrom(e,3),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=e("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,o){var s=n(this._values,this._promise);if(s instanceof t){s=s._target();var c=s._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=u.asArray(s))){var f=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(f,!1)}if(0===s.length)return void(o===-5?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){"use strict";function n(e,t,r,n,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var r=new o;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},i.prototype._promiseRejected=function(e,t){var r=new o;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){"use strict";t.exports=function(t,r,n){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(e),o=r.promise();return r.setHowMany(t),r.init(),o}var a=e("./util"),s=e("./errors").RangeError,u=e("./errors").AggregateError,c=a.isArray,f={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=c(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(f),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new u,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){return new s("Input array must contain at least "+this._howMany+" items but contains only "+e+" items")},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(e,t,r){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){"use strict";t.exports=function(t,r){function n(e,n){if(f(e)){if(e instanceof t)return e;var i=o(e);if(i===c){n&&n._pushContext();var u=t.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(a(e)){var u=new t(r);return e._then(u._fulfill,u._reject,void 0,u,null),u}return s(e,i,n)}}return e}function i(e){return e.then}function o(e){try{return i(e)}catch(e){return c.e=e,c}}function a(e){try{return l.call(e,"_promise0")}catch(e){return!1}}function s(e,n,i){function o(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,l,!0),s=null)}var s=new t(r),f=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var l=!0,h=u.tryCatch(n).call(e,o,a);return l=!1,s&&h===c&&(s._rejectCallback(h.e,!0,!0),s=null),f}var u=e("./util"),c=u.errorObj,f=u.isObject,l={}.hasOwnProperty;return n}},{"./util":36}],34:[function(e,t,r){"use strict";t.exports=function(t,r,n){function i(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(e){return f(+this).thenReturn(e)},f=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(c,null,null,e,void 0),n.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(r),s=setTimeout(function(){a._fulfill()},+e),n.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return f(e,this)};var l=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new u("operation timed out"):new u(t),s.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};t.prototype.timeout=function(e,t){e=+e;var r,s,u=new i(setTimeout(function(){r.isPending()&&l(r,t,s)},e));return n.cancellation()?(s=this.then(),r=s._then(o,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function s(e){setTimeout(function(){throw e},0)}function u(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function c(e,r){function i(){if(a>=c)return f._fulfill();var o=u(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(i,s,null,null,null)}i()}var a=0,c=e.length,f=new t(o);return i(),f}function f(e,t,r){this._data=e,this._promise=t,this._context=r}function l(e,t,r){this.constructor$(e,t,r)}function h(e){return f.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function d(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),b=e("./errors").TypeError,v=e("./util").inherits,y=p.errorObj,g=p.tryCatch,_={};f.prototype.data=function(){return this._data},f.prototype.promise=function(){return this._promise},f.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():_},f.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==_?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},f.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},v(l,f),l.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},d.prototype._resultCancelled=function(){for(var e=this.length,r=0;r0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new l(e,this,i());throw new b}}},{"./errors":12,"./util":36}],36:[function(t,r,i){"use strict";function o(){try{var e=T;return T=null,e.apply(this,arguments)}catch(e){return O.e=e,O}}function a(e){return T=e,o}function s(e){return null==e||e===!0||e===!1||"string"==typeof e||"number"==typeof e}function u(e){return"function"==typeof e||"object"==typeof e&&null!==e}function c(e){return s(e)?new Error(g(e)):e}function f(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=D.test(e+"")&&M.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function b(e){function t(){}t.prototype=e;for(var r=8;r--;)new t;return e}function v(e){return B.test(e)}function y(e,t,r){for(var n=new Array(e),i=0;i10||t[0]>0}(),q.isNode&&q.toFastProperties(e);try{throw new Error}catch(e){q.lastLineError=e}r.exports=q},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:428}],38:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}function u(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}function c(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;i=0|e.words[p],o=0|t.words[d],a=i*o+l,f+=a/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}function f(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0,i+=a>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function l(e,t,r){return(new h).mulp(e,t,r)}function h(e,t){this.x=e,this.y=t}function d(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){g.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var m;try{m=e("buffer").Buffer}catch(e){}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,u=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,r=0!==o||a!==this.length-1?w[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=x[e],f=S[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var h=l.modn(f).toString(e);l=l.idivn(f),r=l.isZero()?h+r:w[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==m),this.toArrayLike(m,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,v=0|a[2],y=8191&v,g=v>>>13,_=0|a[3],m=8191&_,w=_>>>13,x=0|a[4],S=8191&x,k=x>>>13,E=0|a[5],j=8191&E,A=E>>>13,M=0|a[6],C=8191&M,O=M>>>13,T=0|a[7],R=8191&T,I=T>>>13,P=0|a[8],D=8191&P,B=P>>>13,N=0|a[9],L=8191&N,F=N>>>13,U=0|s[0],z=8191&U,q=U>>>13,K=0|s[1],H=8191&K,G=K>>>13,V=0|s[2],Y=8191&V,W=V>>>13,$=0|s[3],X=8191&$,Z=$>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(l,z),i=Math.imul(l,q),i=i+Math.imul(h,z)|0,o=Math.imul(h,q);var ve=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,z),i=Math.imul(p,q),i=i+Math.imul(b,z)|0,o=Math.imul(b,q),n=n+Math.imul(l,H)|0,i=i+Math.imul(l,G)|0,i=i+Math.imul(h,H)|0,o=o+Math.imul(h,G)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=Math.imul(y,q),i=i+Math.imul(g,z)|0,o=Math.imul(g,q),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(l,Y)|0,i=i+Math.imul(l,W)|0,i=i+Math.imul(h,Y)|0,o=o+Math.imul(h,W)|0;var ge=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(m,z),i=Math.imul(m,q),i=i+Math.imul(w,z)|0,o=Math.imul(w,q),n=n+Math.imul(y,H)|0,i=i+Math.imul(y,G)|0,i=i+Math.imul(g,H)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(l,X)|0,i=i+Math.imul(l,Z)|0,i=i+Math.imul(h,X)|0,o=o+Math.imul(h,Z)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(S,z),i=Math.imul(S,q),i=i+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(m,H)|0,i=i+Math.imul(m,G)|0,i=i+Math.imul(w,H)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Y)|0,i=i+Math.imul(y,W)|0,i=i+Math.imul(g,Y)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(l,Q)|0,i=i+Math.imul(l,ee)|0,i=i+Math.imul(h,Q)|0,o=o+Math.imul(h,ee)|0;var me=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(j,z),i=Math.imul(j,q),i=i+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(S,H)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(k,H)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(m,Y)|0,i=i+Math.imul(m,W)|0,i=i+Math.imul(w,Y)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,i=i+Math.imul(y,Z)|0,i=i+Math.imul(g,X)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(l,re)|0,i=i+Math.imul(l,ne)|0,i=i+Math.imul(h,re)|0,o=o+Math.imul(h,ne)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,z),i=Math.imul(C,q),i=i+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(j,H)|0,i=i+Math.imul(j,G)|0,i=i+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,W)|0,i=i+Math.imul(k,Y)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(m,X)|0,i=i+Math.imul(m,Z)|0,i=i+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,Q)|0,i=i+Math.imul(y,ee)|0,i=i+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(l,oe)|0,i=i+Math.imul(l,ae)|0,i=i+Math.imul(h,oe)|0,o=o+Math.imul(h,ae)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(R,z),i=Math.imul(R,q),i=i+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(C,H)|0,i=i+Math.imul(C,G)|0,i=i+Math.imul(O,H)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(j,Y)|0,i=i+Math.imul(j,W)|0,i=i+Math.imul(A,Y)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,i=i+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(m,Q)|0,i=i+Math.imul(m,ee)|0,i=i+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=i+Math.imul(y,ne)|0,i=i+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=i+Math.imul(p,ae)|0,i=i+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(l,ue)|0,i=i+Math.imul(l,ce)|0,i=i+Math.imul(h,ue)|0,o=o+Math.imul(h,ce)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),i=Math.imul(D,q),i=i+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(R,H)|0,i=i+Math.imul(R,G)|0,i=i+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(C,Y)|0,i=i+Math.imul(C,W)|0,i=i+Math.imul(O,Y)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(j,X)|0,i=i+Math.imul(j,Z)|0,i=i+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,i=i+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0,i=i+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=i+Math.imul(y,ae)|0,i=i+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(l,le)|0,i=i+Math.imul(l,he)|0,i=i+Math.imul(h,le)|0,o=o+Math.imul(h,he)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=Math.imul(L,q),i=i+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(D,H)|0,i=i+Math.imul(D,G)|0,i=i+Math.imul(B,H)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(R,Y)|0,i=i+Math.imul(R,W)|0,i=i+Math.imul(I,Y)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(C,X)|0,i=i+Math.imul(C,Z)|0,i=i+Math.imul(O,X)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(j,Q)|0,i=i+Math.imul(j,ee)|0,i=i+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,i=i+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(m,oe)|0,i=i+Math.imul(m,ae)|0,i=i+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(y,ue)|0,i=i+Math.imul(y,ce)|0,i=i+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=i+Math.imul(p,he)|0,i=i+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0,n=n+Math.imul(l,pe)|0,i=i+Math.imul(l,be)|0,i=i+Math.imul(h,pe)|0,o=o+Math.imul(h,be)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,H),i=Math.imul(L,G),i=i+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(D,Y)|0,i=i+Math.imul(D,W)|0,i=i+Math.imul(B,Y)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,i=i+Math.imul(I,X)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,Q)|0,i=i+Math.imul(C,ee)|0,i=i+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(j,re)|0,i=i+Math.imul(j,ne)|0,i=i+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(S,oe)|0,i=i+Math.imul(S,ae)|0,i=i+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(m,ue)|0,i=i+Math.imul(m,ce)|0,i=i+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(y,le)|0,i=i+Math.imul(y,he)|0,i=i+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,be)|0,i=i+Math.imul(b,pe)|0,o=o+Math.imul(b,be)|0;var je=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(L,Y),i=Math.imul(L,W),i=i+Math.imul(F,Y)|0,o=Math.imul(F,W),n=n+Math.imul(D,X)|0,i=i+Math.imul(D,Z)|0,i=i+Math.imul(B,X)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(R,Q)|0,i=i+Math.imul(R,ee)|0,i=i+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,i=i+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(j,oe)|0,i=i+Math.imul(j,ae)|0,i=i+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(S,ue)|0,i=i+Math.imul(S,ce)|0,i=i+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(m,le)|0,i=i+Math.imul(m,he)|0,i=i+Math.imul(w,le)|0,o=o+Math.imul(w,he)|0,n=n+Math.imul(y,pe)|0,i=i+Math.imul(y,be)|0,i=i+Math.imul(g,pe)|0,o=o+Math.imul(g,be)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,X),i=Math.imul(L,Z),i=i+Math.imul(F,X)|0,o=Math.imul(F,Z),n=n+Math.imul(D,Q)|0,i=i+Math.imul(D,ee)|0,i=i+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,i=i+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=i+Math.imul(C,ae)|0,i=i+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(j,ue)|0,i=i+Math.imul(j,ce)|0,i=i+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(S,le)|0,i=i+Math.imul(S,he)|0,i=i+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0,n=n+Math.imul(m,pe)|0,i=i+Math.imul(m,be)|0,i=i+Math.imul(w,pe)|0,o=o+Math.imul(w,be)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,Q),i=Math.imul(L,ee),i=i+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=i+Math.imul(D,ne)|0,i=i+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=i+Math.imul(R,ae)|0,i=i+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=i+Math.imul(C,ce)|0,i=i+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(j,le)|0,i=i+Math.imul(j,he)|0,i=i+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0,n=n+Math.imul(S,pe)|0,i=i+Math.imul(S,be)|0,i=i+Math.imul(k,pe)|0,o=o+Math.imul(k,be)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,re),i=Math.imul(L,ne),i=i+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=i+Math.imul(D,ae)|0,i=i+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=i+Math.imul(R,ce)|0,i=i+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,le)|0,i=i+Math.imul(C,he)|0,i=i+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0,n=n+Math.imul(j,pe)|0,i=i+Math.imul(j,be)|0,i=i+Math.imul(A,pe)|0,o=o+Math.imul(A,be)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,oe),i=Math.imul(L,ae),i=i+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(D,ue)|0,i=i+Math.imul(D,ce)|0,i=i+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(R,le)|0,i=i+Math.imul(R,he)|0,i=i+Math.imul(I,le)|0,o=o+Math.imul(I,he)|0,n=n+Math.imul(C,pe)|0,i=i+Math.imul(C,be)|0,i=i+Math.imul(O,pe)|0,o=o+Math.imul(O,be)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,ue),i=Math.imul(L,ce),i=i+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(D,le)|0,i=i+Math.imul(D,he)|0,i=i+Math.imul(B,le)|0,o=o+Math.imul(B,he)|0,n=n+Math.imul(R,pe)|0,i=i+Math.imul(R,be)|0,i=i+Math.imul(I,pe)|0,o=o+Math.imul(I,be)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,le),i=Math.imul(L,he),i=i+Math.imul(F,le)|0,o=Math.imul(F,he),n=n+Math.imul(D,pe)|0,i=i+Math.imul(D,be)|0,i=i+Math.imul(B,pe)|0,o=o+Math.imul(B,be)|0;var Ie=(c+n|0)+((8191&i)<<13)|0;c=(o+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,pe),i=Math.imul(L,be),i=i+Math.imul(F,pe)|0,o=Math.imul(F,be);var Pe=(c+n|0)+((8191&i)<<13)|0;return c=(o+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,u[0]=ve,u[1]=ye,u[2]=ge,u[3]=_e,u[4]=me,u[5]=we,u[6]=xe,u[7]=Se,u[8]=ke,u[9]=Ee,u[10]=je,u[11]=Ae,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Te,u[16]=Re,u[17]=Ie,u[18]=Pe,0!==c&&(u[19]=c,r.length++),r};Math.imul||(k=c),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?k(this,e,t):r<63?c(this,e,t):r<1024?f(this,e,t):l(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},h.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=u(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i;i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){s=new o(null),s.length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,a,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a)):(r.isub(t),a.isub(i))}var h;return h=0===t.cmpn(1)?i:a,h.cmpn(0)<0&&h.iadd(e),h},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return this.cmpn(e)===-1},o.prototype.lt=function(e){return this.cmp(e)===-1},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new g(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var E={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},d.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},d.prototype.split=function(e,t){e.iushrn(this.n,0,t)},d.prototype.imulK=function(e){return e.imul(this.k)},i(p,d),p.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function e(t){if(E[t])return E[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return E[t]=e,e},g.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},g.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},g.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},g.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},g.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},g.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},g.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},g.prototype.isqr=function(e){return this.imul(e,e.clone())},g.prototype.sqr=function(e){return this.mul(e,e)},g.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},g.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},g.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},i(_,g),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)}, +_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],39:[function(e,t,r){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;rs||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function n(e){for(;0>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,o=e[i],a=e[o],s=e[a],n=257*e[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*a^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^e[e[e[s^o]]],u^=e[e[u]]);return!0};var u=new i;a.blockSize=16,a.prototype.blockSize=a.blockSize,a.keySize=32,a.prototype.keySize=a.keySize,a.prototype._doReset=function(){var e,t,r,n,i,o;for(r=this._key,t=r.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=u.RCON[n/t|0]<<24):t>6&&n%t==4&&(o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]),this._keySchedule[n-t]^o);for(this._invKeySchedule=[],e=0;e>>24]]^u.INV_SUB_MIX[1][u.SBOX[o>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[o>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&o]];return!0},a.prototype.encryptBlock=function(t){t=o(new e(t));var r=this._doCryptBlock(t,this._keySchedule,u.SUB_MIX,u.SBOX),n=new e(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},a.prototype.decryptBlock=function(t){t=o(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var n=this._doCryptBlock(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX),i=new e(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},a.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},a.prototype._doCryptBlock=function(e,r,n,i){var o,a,s,u,c,f,l,h,d;a=e[0]^r[0],s=e[1]^r[1],u=e[2]^r[2],c=e[3]^r[3],o=4;for(var p=1;p>>24]^n[1][s>>>16&255]^n[2][u>>>8&255]^n[3][255&c]^r[o++],l=n[0][s>>>24]^n[1][u>>>16&255]^n[2][c>>>8&255]^n[3][255&a]^r[o++],h=n[0][u>>>24]^n[1][c>>>16&255]^n[2][a>>>8&255]^n[3][255&s]^r[o++],d=n[0][c>>>24]^n[1][a>>>16&255]^n[2][s>>>8&255]^n[3][255&u]^r[o++],a=f,s=l,u=h,c=d;return f=(i[a>>>24]<<24|i[s>>>16&255]<<16|i[u>>>8&255]<<8|i[255&c])^r[o++],l=(i[s>>>24]<<24|i[u>>>16&255]<<16|i[c>>>8&255]<<8|i[255&a])^r[o++],h=(i[u>>>24]<<24|i[c>>>16&255]<<16|i[a>>>8&255]<<8|i[255&s])^r[o++],d=(i[c>>>24]<<24|i[a>>>16&255]<<16|i[s>>>8&255]<<8|i[255&u])^r[o++],[t(f),t(l),t(h),t(d)]},r.AES=a}).call(this,e("buffer").Buffer)},{buffer:67}],42:[function(e,t,r){(function(r){function n(e,t,i,s){if(!(this instanceof n))return new n(e,t,i);a.call(this),this._finID=r.concat([i,new r([0,0,0,1])]),i=r.concat([i,new r([0,0,0,2])]),this._cipher=new o.AES(t),this._prev=new r(i.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=s,this._alen=0,this._len=0,i.copy(this._prev),this._mode=e;var c=new r(4);c.fill(0),this._ghash=new u(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}function i(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=-1;++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=s,r.createDecipheriv=a}).call(this,e("buffer").Buffer)},{"./aes":41,"./authCipher":42,"./modes":47,"./modes/cbc":48,"./modes/cfb":49,"./modes/cfb1":50,"./modes/cfb8":51,"./modes/ctr":52,"./modes/ecb":53,"./modes/ofb":54,"./streamCipher":55,buffer:67,"cipher-base":68,evp_bytestokey:153,inherits:164}],45:[function(e,t,r){(function(t){function n(e,r,o){if(!(this instanceof n))return new n(e,r,o);u.call(this),this._cache=new i,this._cipher=new s.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function i(){if(!(this instanceof i))return new i;this.cache=new t("")}function o(e,r,i){var o=f[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof r&&(r=new t(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new h(p[o.mode],r,i):"auth"===o.type?new d(p[o.mode],r,i):new n(p[o.mode],r,i)}function a(e,t){var r=f[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=l(t,!1,r.key,r.iv);return o(e,n.key,n.iv)}var s=e("./aes"),u=e("cipher-base"),c=e("inherits"),f=e("./modes"),l=e("evp_bytestokey"),h=e("./streamCipher"),d=e("./authCipher");c(n,u),n.prototype._update=function(e){this._cache.add(e);for(var r,n,i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++nu||e<0?(t=Math.abs(e)%u,e<0?u-t:t):e}function a(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var s=new e(16);s.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t0;e--)o[e]=o[e]>>>1|(1&o[e-1])<<31;o[0]=o[0]>>>1,r&&(o[0]=o[0]^225<<24)}this.state=i(s)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,s],16)),this.ghash(i([0,t,0,r])),this.state};var u=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:67}],47:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],48:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;return e._prev=t,n(e._cipher.decryptBlock(t),r)}},{"buffer-xor":66}],49:[function(e,t,r){(function(t){function n(e,r,n){var o=r.length,a=i(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,n?r:a]),a}var i=e("buffer-xor");r.encrypt=function(e,r,i){for(var o,a=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){a=t.concat([a,n(e,r,i)]);break}o=e._cache.length,a=t.concat([a,n(e,r.slice(0,o),i)]),r=r.slice(o)}return a}}).call(this,e("buffer").Buffer)},{buffer:67,"buffer-xor":66}],50:[function(e,t,r){(function(e){function t(e,t,r){for(var i,o,a,s=-1,u=0;++s<8;)i=e._cipher.encryptBlock(e._prev),o=t&1<<7-s?128:0,a=i[0]^o,u+=(128&a)>>s%8,e._prev=n(e._prev,r?o:a);return u}function n(t,r){var n=t.length,i=-1,o=new e(t.length);for(t=e.concat([t,new e([r])]);++i>7;return o}r.encrypt=function(r,n,i){for(var o=n.length,a=new e(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new a(s(t));return r}var a=e("bn.js"),s=e("randombytes");t.exports=i,i.getr=o}).call(this,e("buffer").Buffer)},{"bn.js":38,buffer:67,randombytes:448}],60:[function(e,t,r){(function(e){"use strict";r["RSA-SHA224"]=r.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new e("302d300d06096086480165030402040500041c","hex")},r["RSA-SHA256"]=r.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new e("3031300d060960864801650304020105000420","hex")},r["RSA-SHA384"]=r.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new e("3041300d060960864801650304020205000430","hex")},r["RSA-SHA512"]=r.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new e("3051300d060960864801650304020305000440","hex")},r["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new e("3021300906052b0e03021a05000414","hex")},r["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new e("","hex")},r.DSA=r["DSA-SHA1"]=r["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new e("","hex")},r["DSA-SHA224"]=r["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new e("","hex")},r["DSA-SHA256"]=r["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new e("","hex")},r["DSA-SHA384"]=r["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new e("","hex")},r["DSA-SHA512"]=r["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new e("","hex")},r["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new e("","hex")},r["RSA-RIPEMD160"]=r.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new e("3021300906052b2403020105000414","hex")},r["RSA-MD5"]=r.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new e("3020300c06082a864886f70d020505000410","hex")}}).call(this,e("buffer").Buffer)},{buffer:67}],61:[function(e,t,r){(function(r){function n(e){l.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=u(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){l.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=u(t.hash),this._tag=t.id,this._signType=t.sign}function o(e){return new n(e)}function a(e){return new i(e)}var s=e("./algos"),u=e("create-hash"),c=e("inherits"),f=e("./sign"),l=e("stream"),h=e("./verify"),d={};Object.keys(s).forEach(function(e){d[e]=d[e.toLowerCase()]=s[e]}),c(n,l.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=f(r.concat([this._tag,n]),e,this._hashType,this._signType);return t?i.toString(t):i},c(i,l.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return h(t,r.concat([this._tag,i]),e,this._signType)},t.exports={Sign:o,Verify:a,createSign:o,createVerify:a}}).call(this,e("buffer").Buffer)},{"./algos":60,"./sign":63,"./verify":64,buffer:67,"create-hash":71,inherits:164,stream:490}],62:[function(e,t,r){"use strict";r["1.3.132.0.10"]="secp256k1",r["1.3.132.0.33"]="p224",r["1.2.840.10045.3.1.1"]="p192",r["1.2.840.10045.3.1.7"]="p256",r["1.3.132.0.34"]="p384",r["1.3.132.0.35"]="p521"},{}],63:[function(e,t,r){(function(r){function n(e,t,r,n){var a=v(t);if(a.curve){if("ecdsa"!==n)throw new Error("wrong private key type");return i(e,a)}if("dsa"===a.type){if("dsa"!==n)throw new Error("wrong private key type");return o(e,a,r)}if("rsa"!==n)throw new Error("wrong private key type");for(var s=a.modulus.byteLength(),u=[0,1];e.length+u.length+10&&r.ishrn(n),r}function c(e,t){e=u(e,t),e=e.mod(t);var n=new r(e.toArray());if(n.length=t)throw new Error("invalid sig")}var s=e("./curves"),u=e("elliptic"),c=e("parse-asn1"),f=e("bn.js"),l=u.ec;t.exports=n}).call(this,e("buffer").Buffer)},{"./curves":62,"bn.js":38,buffer:67,elliptic:87,"parse-asn1":423}],65:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,o=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var n=r,o=t;void 0===o&&(n=void 0,o=0);var s=new i(e);if("string"==typeof o)for(var u=new i(o,n),c=u.length,f=-1;++fa)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r;if(1===arguments.length)return new i(e);void 0===o&&(o=0);var a=n;if(void 0===a&&(a=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+a))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new o(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:67}],66:[function(e,t,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o$)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return o(e,t,r)}function o(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?l(e,t,r):"string"==typeof e?c(e,t):h(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function s(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|d(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|b(e,t),o=n(r),a=o.write(e,t);return a!==r&&(o=o.slice(0,a)),o}function f(e){for(var t=e.length<0?0:0|d(e.length),r=n(t),i=0;i=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|e}function p(e){return+e!=e&&(e=0),i.alloc(+e)}function b(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex": +return r>>>1;case"base64":return H(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}var c;if(i){var f=-1;for(c=r;cs&&(r=s-u),c=r;c>=0;c--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,f,l;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128==(192&u)&&(l=(31&o)<<6|63&u)>127&&(a=l);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:u=e[i+1],c=e[i+2],f=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return M(n)}function M(e){var t=e.length;if(t<=X)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,i){return t=+t,r>>>=0,i||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(e,t,r,n,52,8),r+8}function L(e){if(e=F(e).replace(Z,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function H(e){return Y.toByteArray(L(e))}function G(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e){return e!==e}var Y=e("base64-js"),W=e("ieee754");r.Buffer=i,r.SlowBuffer=p,r.INSPECT_MAX_BYTES=50;var $=2147483647;r.kMaxLength=$,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return o(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return s(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&e._isBuffer===!0},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var a=o-n,s=r-t,u=Math.min(a,s),c=this.slice(n,o),f=e.slice(t,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},i.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),W.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),W.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),W.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),W.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,f=271733878,l=0;l>16)+(t>>16)+(r>>16)<<16|65535&r}function f(e,t){return e<>>32-t}var l=e("./helpers");t.exports=function(e){return l.hash(e,n,16)}},{"./helpers":72}],74:[function(e,t,r){(function(r){"use strict";function n(e,t){a.call(this),e=e.toLowerCase(),"string"==typeof t&&(t=new r(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=i(e).update(t).digest():t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},n.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=u.r28shl(r,a),n=u.r28shl(n,a),u.pc2(r,n,e.keys,i)}},i.prototype._update=function(e,t,r,n){var i=this._desState,o=u.readUInt32BE(e,t),a=u.readUInt32BE(e,t+4);u.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1], +"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],u.writeUInt32BE(r,o,n),u.writeUInt32BE(r,a,n+4)},i.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=d}u.rip(a,o,n,i)},i.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],f=e.keys[s+1];u.expand(o,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=u.substitute(c,f),h=u.permute(l),d=o;o=(a^h)>>>0,a=d}u.rip(o,a,n,i)}},{"../des":77,inherits:164,"minimalistic-assert":415}],81:[function(e,t,r){"use strict";function n(e,t){o.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[c.create({type:"encrypt",key:r}),c.create({type:"decrypt",key:n}),c.create({type:"encrypt",key:i})]:[c.create({type:"decrypt",key:i}),c.create({type:"encrypt",key:n}),c.create({type:"decrypt",key:r})]}function i(e){u.call(this,e);var t=new n(this.type,this.options.key);this._edeState=t}var o=e("minimalistic-assert"),a=e("inherits"),s=e("../des"),u=s.Cipher,c=s.DES;a(i,u),t.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},i.prototype._pad=c.prototype._pad,i.prototype._unpad=c.prototype._unpad},{"../des":77,inherits:164,"minimalistic-assert":415}],82:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(var a=6;a>=0;a-=2){for(var s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(var s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(var a=4;a<8;a++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(var a=1;a<=3;a++){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(var u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(var o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){var o=e>>>18-6*n&63,a=i[64*n+o];r<<=4,r|=a}for(var n=0;n<4;n++){var o=t>>>18-6*n&63,a=i[256+64*n+o];r<<=4,r|=a}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(h),r.testn(1)||r.iadd(d),t.cmp(d)){if(!t.cmp(p))for(;r.mod(b).cmp(v);)r.iadd(g)}else for(;r.mod(c).cmp(y);)r.iadd(g);if(n=r.shrn(1),i(n)&&i(r)&&o(n)&&o(r)&&l.test(n)&&l.test(r))return r}}var s=e("randombytes");t.exports=a,a.simpleSieve=i,a.fermatTest=o;var u=e("bn.js"),c=new u(24),f=e("miller-rabin"),l=new f,h=new u(1),d=new u(2),p=new u(5),b=(new u(16),new u(8),new u(10)),v=new u(3),y=(new u(7),new u(11)),g=new u(4),_=(new u(12),null)},{"bn.js":38,"miller-rabin":414,randombytes:448}],86:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],87:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":102,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:39}],88:[function(e,t,r){"use strict";function n(e,t){this.type=e,this.p=new o(t.p,16),this.red=t.prime?o.red(t.prime):o.mont(this.p),this.zero=new o(0).toRed(this.red),this.one=new o(1).toRed(this.red),this.two=new o(2).toRed(this.red),this.n=t.n&&new o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var o=e("bn.js"),a=e("../../elliptic"),s=a.utils,u=s.getNAF,c=s.getJSF,f=s.assert;t.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(e,t){f(e.precomputed);var r=e._getDoubles(),n=u(t,1),i=(1<=a;t--)s=(s<<1)+n[t];o.push(s)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(var a=0;a=0;s--){for(var t=0;s>=0&&0===o[s];s--)t++;if(s>=0&&t++,a=a.dblp(t),s<0)break;var c=o[s];f(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},n.prototype._wnafMulAdd=function(e,t,r,n,i){for(var o=this._wnafT1,a=this._wnafT2,s=this._wnafT3,f=0,l=0;l=1;l-=2){var p=l-1,b=l;if(1===o[p]&&1===o[b]){var v=[t[p],null,null,t[b]];0===t[p].y.cmp(t[b].y)?(v[1]=t[p].add(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg())):0===t[p].y.cmp(t[b].y.redNeg())?(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].add(t[b].neg())):(v[1]=t[p].toJ().mixedAdd(t[b]),v[2]=t[p].toJ().mixedAdd(t[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=c(r[p],r[b]);f=Math.max(g[0].length,f),s[p]=new Array(f),s[b]=new Array(f);for(var _=0;_=0;l--){for(var k=0;l>=0;){for(var E=!0,_=0;_=0&&k++,x=x.dblp(k),l<0)break;for(var _=0;_0?h=a[_][j-1>>1]:j<0&&(h=a[_][-j-1>>1].neg()),x="affine"===h.type?x.mixedAdd(h):x.add(h))}}for(var l=0;l=Math.ceil((e.bitLength()+1)/t.step)},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},i.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=this.curve._mulA(i),s=a.redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),t=s.redMul(a.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),c=s.redSub(u).redISub(u);e=n.redSub(i).redISub(o).redMul(c),t=s.redMul(a.redSub(o)),r=s.redMul(c)}}else{var a=i.redAdd(o),u=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=a.redSub(u).redSub(u);e=this.curve._mulC(n.redISub(a)).redMul(c),t=this.curve._mulC(a).redMul(i.redISub(o)),r=a.redMul(c)}return this.curve.point(e,t,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},i.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},i.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":87,"../curve":90,"bn.js":38,inherits:164}],90:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,r){"use strict";function n(e){u.call(this,"mont",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,r){u.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(t,16),this.z=new a(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var o=e("../curve"),a=e("bn.js"),s=e("inherits"),u=o.base,c=e("../../elliptic"),f=c.utils;s(n,u),t.exports=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},s(i,u.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},n.prototype.point=function(e,t){return new i(this,e,t)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),o=t.redMul(n),a=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,a)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),a=o.redMul(r),s=i.redMul(n),u=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(u,c)},i.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":87,"../curve":90,"bn.js":38,inherits:164}],92:[function(e,t,r){"use strict";function n(e){f.call(this,"short",e),this.a=new u(e.a,16).toRed(this.red),this.b=new u(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new u(t,16),this.y=new u(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new u(0)):(this.x=new u(t,16),this.y=new u(r,16),this.z=new u(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var a=e("../curve"),s=e("../../elliptic"),u=e("bn.js"),c=e("inherits"),f=a.base,l=s.utils.assert;c(n,f),t.exports=n,n.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new u(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=n[0].cmp(n[1])<0?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new u(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],l(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new u(e.a,16),b:new u(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:o}}},n.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:u.mont(e),r=new u(2).toRed(t).redInvm(),n=r.redNeg(),i=new u(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]}, +n.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,a,s,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new u(1),b=new u(0),v=new u(0),y=new u(1),g=0;0!==h.cmpn(0);){var _=d.div(h);c=d.sub(_.mul(h)),f=v.sub(_.mul(p));var m=y.sub(_.mul(b));if(!n&&c.cmp(l)<0)t=s.neg(),r=p,n=c.neg(),i=f;else if(n&&2==++g)break;s=c,d=h,h=c,v=p,p=f,y=b,b=m}o=c.neg(),a=f;var w=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},n.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},n.prototype.pointFromX=function(e,t){e=new u(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new u(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(o,f.BasePoint),n.prototype.jpoint=function(e,t,r){return new o(this,e,t,r)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":87,"../curve":90,"bn.js":38,inherits:164}],93:[function(e,t,r){"use strict";function n(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:r}),r}})}var o=r,a=e("hash.js"),s=e("../elliptic"),u=s.utils.assert;o.PresetCurve=n,i("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:a.sha384,gRed:!1,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"]}),i("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:a.sha512,gRed:!1,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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var c;try{c=e("./precomputed/secp256k1")}catch(e){c=void 0}i("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},{"../elliptic":87,"./precomputed/secp256k1":100,"hash.js":155}],94:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);"string"==typeof e&&(u(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var i=e("bn.js"),o=e("hmac-drbg"),a=e("../../elliptic"),s=a.utils,u=s.assert,c=e("./key"),f=e("./signature");t.exports=n,n.prototype.keyPair=function(e){return new c(this,e)},n.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(n)>0))return s.iaddn(1),this.keyFromPrivate(s)}},n.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},n.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new o({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;!0;h++){var d=n.k?n.k(h):new i(c.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=d.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(y=y.umod(this.n),0!==y.cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new f({r:v,s:y,recoveryParam:g})}}}}}},n.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n),t=new f(t,"hex");var o=t.r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick){var l=this.g.mulAdd(u,r.getPublic(),c);return!l.isInfinity()&&0===l.getX().umod(this.n).cmp(o)}var l=this.g.jmulAdd(u,r.getPublic(),c);return!l.isInfinity()&&l.eqXToP(o)},n.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,n);var o=this.n,a=new i(e),s=t.r,c=t.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),b=c.mul(d).umod(o);return this.g.mulAdd(p,s,b)},n.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new f(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":87,"./key":95,"./signature":96,"bn.js":38,"hmac-drbg":161}],95:[function(e,t,r){"use strict";function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=e("bn.js"),o=e("../../elliptic"),a=o.utils,s=a.assert;t.exports=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},n.prototype.derive=function(e){return e.mul(this.priv).getX()},n.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},n.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},n.prototype.inspect=function(){return""}},{"../../elliptic":87,"bn.js":38}],96:[function(e,t,r){"use strict";function n(e,t){if(e instanceof n)return e;this._importDER(e,t)||(l(e.r&&e.s,"Signature without r or s"),this.r=new u(e.r,16),this.s=new u(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function i(){this.place=0}function o(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var u=e("bn.js"),c=e("../../elliptic"),f=c.utils,l=f.assert;t.exports=n,n.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new i;if(48!==e[r.place++])return!1;if(o(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var n=o(e,r),a=e.slice(r.place,n+r.place);if(r.place+=n,2!==e[r.place++])return!1;var s=o(e,r);if(e.length!==s+r.place)return!1;var c=e.slice(r.place,s+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new u(a),this.s=new u(c),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=a(t),r=a(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];s(n,t.length),n=n.concat(t),n.push(2),s(n,r.length);var i=n.concat(r),o=[48];return s(o,i.length),o=o.concat(i),f.encode(o,e)}},{"../../elliptic":87,"bn.js":38}],97:[function(e,t,r){"use strict";function n(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof n))return new n(e);var e=o.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=e("hash.js"),o=e("../../elliptic"),a=o.utils,s=a.assert,u=a.parseBytes,c=e("./key"),f=e("./signature");t.exports=n,n.prototype.sign=function(e,t){e=u(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},n.prototype.verify=function(e,t,r){e=u(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},n.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var o=e.andln(3)+n&3,a=t.andln(3)+i&3;3===o&&(o=-1),3===a&&(a=-1);var s;if(0==(1&o))s=0;else{var u=e.andln(7)+n&7;s=3!==u&&5!==u||2!==a?o:-o}r[0].push(s);var c;if(0==(1&a))c=0;else{var u=t.andln(7)+i&7;c=3!==u&&5!==u||2!==o?a:-a}r[1].push(c),2*n===s+1&&(n=1-n),2*i===c+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function o(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function a(e){return"string"==typeof e?u.toArray(e,"hex"):e}function s(e){return new c(e,"hex","le")}var u=r,c=e("bn.js"),f=e("minimalistic-assert"),l=e("minimalistic-crypto-utils");u.assert=f,u.toArray=l.toArray,u.zero2=l.zero2,u.toHex=l.toHex,u.encode=l.encode,u.getNAF=n,u.getJSF=i,u.cachedProperty=o,u.parseBytes=a,u.intFromLE=s},{"bn.js":38,"minimalistic-assert":415,"minimalistic-crypto-utils":416}],102:[function(e,t,r){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],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",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","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":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},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"}}},{}],103:[function(e,t,r){"use strict";var n=e("../../number/is-nan"),i=e("../../number/to-pos-integer"),o=e("../../object/valid-value"),a=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,u=Math.abs,c=Math.floor;t.exports=function(e){var t,r,f,l;if(!n(e))return a.apply(this,arguments);for(r=i(o(this).length),f=arguments[1],f=isNaN(f)?0:f>=0?c(f):i(this.length)-c(u(f)),t=f;t=55296&&g<=56319&&(x+=e[++r]),x=S?h.call(S,k,x,b):x,t?(d.value=x,p(v,b,d)):v[b]=x,++b;y=b}if(void 0===y)for(y=a(e.length),t&&(v=new t(y)),r=0;r0?1:-1}},{}],116:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Number.isNaN:e("./shim")},{"./is-implemented":117,"./shim":118}],117:[function(e,t,r){"use strict";t.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},{}],118:[function(e,t,r){"use strict";t.exports=function(e){return e!==e}},{}],119:[function(e,t,r){"use strict";var n=e("../math/sign"),i=Math.abs,o=Math.floor;t.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?n(e)*o(i(e)):e)}},{"../math/sign":113}],120:[function(e,t,r){"use strict";var n=e("./to-integer"),i=Math.max;t.exports=function(e){return i(0,n(e))}},{"./to-integer":119}],121:[function(e,t,r){"use strict";var n=e("./valid-callable"),i=e("./valid-value"),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(r,c){var f,l=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),f=s(r),h&&f.sort("function"==typeof h?o.call(h,r):void 0),"function"!=typeof e&&(e=f[e]),a.call(e,f,function(e,n){return u.call(r,e)?a.call(c,l,r[e],e,r,n):t})}}},{"./valid-callable":136,"./valid-value":137}],122:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":123,"./shim":124}],123:[function(e,t,r){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],124:[function(e,t,r){"use strict";var n=e("../keys"),i=e("../valid-value"),o=Math.max;t.exports=function(e,t){var r,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},a=1;a"}}},{"./object/is-callable":126}],141:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?String.prototype.contains:e("./shim")},{"./is-implemented":142,"./shim":143}],142:[function(e,t,r){"use strict";var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&(n.contains("dwa")===!0&&n.contains("foo")===!1)}},{}],143:[function(e,t,r){"use strict";var n=String.prototype.indexOf;t.exports=function(e){return n.call(this,e,arguments[1])>-1}},{}],144:[function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||n.call(e)===i)||!1}},{}],145:[function(e,t,r){"use strict";var n=e("./safe-to-string");t.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(/[\n\r\u2028\u2029]/g,function(e){return JSON.stringify(e).slice(1,-1)})}},{"./safe-to-string":140}],146:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Symbol:e("./polyfill")},{"./is-implemented":147,"./polyfill":149}],147:[function(e,t,r){"use strict";var n={object:!0,symbol:!0};t.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return!!n[typeof Symbol.iterator]&&(!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag])}},{}],148:[function(e,t,r){"use strict";t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},{}],149:[function(e,t,r){"use strict";var n,i,o,a,s=e("d"),u=e("./validate-symbol"),c=Object.create,f=Object.defineProperties,l=Object.defineProperty,h=Object.prototype,d=c(null);if("function"==typeof Symbol){n=Symbol;try{String(n()),a=!0}catch(e){}}var p=function(){var e=c(null);return function(t){for(var r,n,i=0;e[t+(i||"")];)++i;return t+=i||"",e[t]=!0,r="@@"+t,l(h,r,s.gs(null,function(e){n||(n=!0,l(this,r,s(e)),n=!1)})),r}}();o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},t.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return a?n(t):(r=c(o.prototype),t=void 0===t?"":String(t),f(r,{__description__:s("",t),__name__:s("",p(t))}))},f(i,{for:s(function(e){return d[e]?d[e]:d[e]=i(String(e))}),keyFor:s(function(e){var t;u(e);for(t in d)if(d[t]===e)return t}),hasInstance:s("",n&&n.hasInstance||i("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||i("isConcatSpreadable")),iterator:s("",n&&n.iterator||i("iterator")),match:s("",n&&n.match||i("match")),replace:s("",n&&n.replace||i("replace")),search:s("",n&&n.search||i("search")),species:s("",n&&n.species||i("species")),split:s("",n&&n.split||i("split")),toPrimitive:s("",n&&n.toPrimitive||i("toPrimitive")),toStringTag:s("",n&&n.toStringTag||i("toStringTag")),unscopables:s("",n&&n.unscopables||i("unscopables"))}),f(o.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),f(i.prototype,{toString:s(function(){return"Symbol ("+u(this).__description__+")"}),valueOf:s(function(){return u(this)})}),l(i.prototype,i.toPrimitive,s("",function(){var e=u(this);return"symbol"==typeof e?e:e.toString()})),l(i.prototype,i.toStringTag,s("c","Symbol")),l(o.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),l(o.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},{"./validate-symbol":150,d:76}],150:[function(e,t,r){"use strict";var n=e("./is-symbol");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},{"./is-symbol":148}],151:[function(e,t,r){"use strict";var n,i,o,a,s,u,c,f=e("d"),l=e("es5-ext/object/valid-callable"),h=Function.prototype.apply,d=Function.prototype.call,p=Object.create,b=Object.defineProperty,v=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var r;return l(t),y.call(this,"__ee__")?r=this.__ee__:(r=g.value=p(null),b(this,"__ee__",g),g.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},i=function(e,t){var r,i;return l(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),h.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var r,n,i,o;if(l(t),!y.call(this,"__ee__"))return this;if(r=this.__ee__,!r[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},a=function(e){var t,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),t=1;t0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],153:[function(e,t,r){(function(r){function n(e,t,n,o){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),n/=8,o=o||0;for(var a,s,u=0,c=0,f=new r(n),l=new r(o),h=0,d=[];;){if(h++>0&&d.push(a),d.push(e),t&&d.push(t),a=i(r.concat(d)),d=[],s=0,n>0)for(;;){if(0===n)break;if(s===a.length)break;f[u++]=a[s],n--,s++}if(o>0&&s!==a.length)for(;;){if(0===o)break;if(s===a.length)break;l[c++]=a[s],o--,s++}if(0===n&&0===o)break}for(s=0;s-1?t:e}function b(e,t){t=t||{};var r=t.body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new a(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new a(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function y(e){var t=new a;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var _={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(_.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=function(e){return e&&DataView.prototype.isPrototypeOf(e)},x=ArrayBuffer.isView||function(e){return e&&m.indexOf(Object.prototype.toString.call(e))>-1};a.prototype.append=function(e,r){e=t(e),r=i(r);var n=this.map[e];this.map[e]=n?n+","+r:r},a.prototype.delete=function(e){delete this.map[t(e)]},a.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},a.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},a.prototype.set=function(e,r){this.map[t(e)]=i(r)},a.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},a.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),o(e)},a.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},a.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),o(e)},_.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},d.call(b.prototype),d.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];g.redirect=function(e,t){if(k.indexOf(t)===-1)throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=a,e.Request=b,e.Response=g,e.fetch=function(e,t){return new r(function(r,i){var o=new b(e,t),a=new n;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:y(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL"),r(new g("response"in a?a.response:a.responseText,e))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&_.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}(void 0!==e?e:this),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response}}()}"function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof r?t.exports=n:e.fetchPonyfill=n}("undefined"==typeof self?this:self)},{}],155:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":156,"./hash/hmac":157,"./hash/ripemd":158,"./hash/sha":159,"./hash/utils":160}],156:[function(e,t,r){function n(){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}var i=e("../hash"),o=i.utils,a=o.assert;r.BlockHash=n,n.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t>>3}function p(e){return T(e,17)^T(e,19)^e>>>10}function b(e,t,r,n){return 0===e?u(t,r,n):1===e||3===e?f(t,r,n):2===e?c(t,r,n):void 0}function v(e,t,r,n,i,o){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function y(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function g(e,t,r,n,i,o){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function m(e,t){var r=B(e,t,28),n=B(t,e,2),i=B(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function w(e,t){var r=N(e,t,28),n=N(t,e,2),i=N(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function x(e,t){var r=B(e,t,14),n=B(e,t,18),i=B(t,e,9),o=r^n^i;return o<0&&(o+=4294967296),o}function S(e,t){var r=N(e,t,14),n=N(e,t,18),i=N(t,e,9),o=r^n^i;return o<0&&(o+=4294967296),o}function k(e,t){var r=B(e,t,1),n=B(e,t,8),i=L(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function E(e,t){var r=N(e,t,1),n=N(e,t,8),i=F(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function j(e,t){var r=B(e,t,19),n=B(t,e,29),i=L(e,t,6),o=r^n^i;return o<0&&(o+=4294967296),o}function A(e,t){var r=N(e,t,19),n=N(t,e,29),i=F(e,t,6),o=r^n^i;return o<0&&(o+=4294967296),o} +var M=e("../hash"),C=M.utils,O=C.assert,T=C.rotr32,R=C.rotl32,I=C.sum32,P=C.sum32_4,D=C.sum32_5,B=C.rotr64_hi,N=C.rotr64_lo,L=C.shr64_hi,F=C.shr64_lo,U=C.sum64,z=C.sum64_hi,q=C.sum64_lo,K=C.sum64_4_hi,H=C.sum64_4_lo,G=C.sum64_5_hi,V=C.sum64_5_lo,Y=M.common.BlockHash,W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],X=[1518500249,1859775393,2400959708,3395469782];C.inherits(n,Y),r.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(var n=0;n>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e,t){for(var r="",n=0;n>>0}return o}function f(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function l(e,t){return e>>>t|e<<32-t}function h(e,t){return e<>>32-t}function d(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function b(e,t,r,n){return e+t+r+n>>>0}function v(e,t,r,n,i){return e+t+r+n+i>>>0}function y(e,t){if(!e)throw new Error(t||"Assertion failed")}function g(e,t,r,n){var i=e[t],o=e[t+1],a=n+o>>>0,s=(a>>0,e[t+1]=a}function _(e,t,r,n){return(t+n>>>0>>0}function m(e,t,r,n){return t+n>>>0}function w(e,t,r,n,i,o,a,s){var u=0,c=t;return c=c+n>>>0,u+=c>>0,u+=c>>0,u+=c>>0}function x(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function S(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return l=l+n>>>0,f+=l>>0,f+=l>>0,f+=l>>0,f+=l>>0}function k(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0}function E(e,t,r){return(t<<32-r|e>>>r)>>>0}function j(e,t,r){return(e<<32-r|t>>>r)>>>0}function A(e,t,r){return e>>>r}function M(e,t,r){return(e<<32-r|t>>>r)>>>0}var C=r,O=e("inherits");C.toArray=n,C.toHex=i,C.htonl=o,C.toHex32=a,C.zero2=s,C.zero8=u,C.join32=c,C.split32=f,C.rotr32=l,C.rotl32=h,C.sum32=d,C.sum32_3=p,C.sum32_4=b,C.sum32_5=v,C.assert=y,C.inherits=O,r.sum64=g,r.sum64_hi=_,r.sum64_lo=m,r.sum64_4_hi=w,r.sum64_4_lo=x,r.sum64_5_hi=S,r.sum64_5_lo=k,r.rotr64_hi=E,r.rotr64_lo=j,r.shr64_hi=A,r.shr64_lo=M},{inherits:164}],161:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),i=o.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var i=e("hash.js"),o=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");t.exports=n,n.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},n.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=o.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*b}},{}],163:[function(e,t,r){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r>(-2*a&6)):0)i=o.indexOf(i);return u}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||i},{}],168:[function(e,t,r){function n(e){return decodeURIComponent(i(e).replace(/(.)/g,function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}var i=e("./atob");t.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return n(t)}catch(e){return i(t)}}},{"./atob":167}],169:[function(e,t,r){"use strict";function n(e){this.message=e}var i=e("./base64_url_decode");n.prototype=new Error,n.prototype.name="InvalidTokenError",t.exports=function(e,t){if("string"!=typeof e)throw new n("Invalid token specified");t=t||{};var r=t.header===!0?0:1;try{return JSON.parse(i(e.split(".")[r]))}catch(e){throw new n("Invalid token specified: "+e.message)}},t.exports.InvalidTokenError=n},{"./base64_url_decode":168}],170:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),o=n(i,"DataView");t.exports=o},{"./_getNative":272,"./_root":317}],171:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":215}],189:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n=f&&(h=c,d=!1,t=new i(t));e:for(;++l0&&r(f)?t>1?n(f,t-1,r,a,s):i(s,f):a||(s[s.length]=f)}return s}var i=e("./_arrayPush"),o=e("./_isFlattenable");t.exports=n},{"./_arrayPush":192,"./_isFlattenable":289}],209:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":259}],210:[function(e,t,r){function n(e,t){return e&&i(e,t,o)}var i=e("./_baseFor"),o=e("./keys");t.exports=n},{"./_baseFor":209,"./keys":369}],211:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r=f){var v=t?null:u(e);if(v)return c(v);d=!1,l=s,b=new i}else b=t?[]:p;e:for(;++n1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1?s[u?t[c]:c]:void 0}}var i=e("./_baseIteratee"),o=e("./isArrayLike"),a=e("./keys");t.exports=n},{"./_baseIteratee":224,"./isArrayLike":354,"./keys":369}],261:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),o=e("./_setToArray"),a=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":176,"./_setToArray":320,"./noop":376}],262:[function(e,t,r){function n(e,t,r,n){return void 0===e||i(e,o[r])&&!a.call(n,r)?t:e}var i=e("./eq"),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},{"./eq":341}],263:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":272}],264:[function(e,t,r){function n(e,t,r,n,c,f){var l=r&s,h=e.length,d=t.length;if(h!=d&&!(l&&d>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var b=-1,v=!0,y=r&u?new i:void 0;for(f.set(e,t),f.set(t,e);++b-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":197}],301:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":197}],302:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}var i=e("./_Hash"),o=e("./_ListCache"),a=e("./_Map");t.exports=n},{"./_Hash":171,"./_ListCache":172,"./_Map":173}],303:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":270}],304:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":270}],305:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":270}],306:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":270}],307:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],308:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],309:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===o&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),o=500;t.exports=n},{"./memoize":374}],310:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":272}],311:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":315}],312:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],313:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&n.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=u},{"./_freeGlobal":267}],314:[function(e,t,r){function n(e){return o.call(e)}var i=Object.prototype,o=i.toString;t.exports=n},{}],315:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],316:[function(e,t,r){function n(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,s=o(n.length-t,0),u=Array(s);++a0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;t.exports=n},{}],323:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":172}],324:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],325:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],326:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],327:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!o||n.length0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var i=e("./toInteger"),o="Expected a function";t.exports=n},{"./toInteger":389}],337:[function(e,t,r){function n(e){return i(e,o|a)}var i=e("./_baseClone"),o=1,a=4;t.exports=n},{"./_baseClone":202}],338:[function(e,t,r){function n(e){return function(){return e}}t.exports=n},{}],339:[function(e,t,r){function n(e,t,r){function n(t){var r=g,n=_;return g=_=void 0,k=t,w=e.apply(n,r)}function f(e){return k=e,x=setTimeout(d,t),E?n(e):w}function l(e){var r=e-S,n=e-k,i=t-r;return j?c(i,m-n):i}function h(e){var r=e-S,n=e-k;return void 0===S||r>=t||r<0||j&&n>=m}function d(){var e=o();if(h(e))return p(e);x=setTimeout(d,l(e))}function p(e){return x=void 0,A&&g?n(e):(g=_=void 0,w)}function b(){void 0!==x&&clearTimeout(x),k=0,g=S=_=x=void 0}function v(){return void 0===x?w:p(o())}function y(){var e=o(),r=h(e);if(g=arguments,_=this,S=e,r){if(void 0===x)return f(S);if(j)return x=setTimeout(d,t),n(S)}return void 0===x&&(x=setTimeout(d,t)),w}var g,_,m,w,x,S,k=0,E=!1,j=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return t=a(t)||0,i(r)&&(E=!!r.leading,j="maxWait"in r,m=j?u(a(r.maxWait)||0,t):m,A="trailing"in r?!!r.trailing:A),y.cancel=b,y.flush=v,y}var i=e("./isObject"),o=e("./now"),a=e("./toNumber"),s="Expected a function",u=Math.max,c=Math.min;t.exports=n},{"./isObject":364,"./now":377,"./toNumber":390}],340:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),o=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),s=o(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=s},{"./_apply":184,"./_baseRest":232,"./_customDefaultsAssignIn":262,"./assignInWith":335}],341:[function(e,t,r){function n(e,t){return e===t||e!==e&&t!==t}t.exports=n},{}],342:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,a(t,3))}var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),s=e("./isArray");t.exports=n},{"./_arrayFilter":187,"./_baseFilter":206,"./_baseIteratee":224,"./isArray":353}],343:[function(e,t,r){var n=e("./_createFind"),i=e("./findIndex"),o=n(i);t.exports=o},{"./_createFind":260,"./findIndex":344}],344:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=s(n+u,0)),i(e,o(t,3),u)}var i=e("./_baseFindIndex"),o=e("./_baseIteratee"),a=e("./toInteger"),s=Math.max;t.exports=n},{"./_baseFindIndex":207,"./_baseIteratee":224,"./toInteger":389}],345:[function(e,t,r){function n(e){return(null==e?0:e.length)?i(e,1):[]}var i=e("./_baseFlatten");t.exports=n},{"./_baseFlatten":208}],346:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,a(t))}var i=e("./_arrayEach"),o=e("./_baseEach"),a=e("./_castFunction"),s=e("./isArray");t.exports=n},{"./_arrayEach":186,"./_baseEach":205,"./_castFunction":241,"./isArray":353}],347:[function(e,t,r){function n(e){for(var t=-1,r=null==e?0:e.length,n={};++t-1:!!f&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),o=e("./isArrayLike"),a=e("./isString"),s=e("./toInteger"),u=e("./values"),c=Math.max;t.exports=n},{"./_baseIndexOf":215,"./isArrayLike":354,"./isString":366,"./toInteger":389,"./values":393}],352:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":216,"./isObjectLike":365}],353:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],354:[function(e,t,r){function n(e){return null!=e&&o(e.length)&&!i(e)}var i=e("./isFunction"),o=e("./isLength");t.exports=n},{"./isFunction":361,"./isLength":362}],355:[function(e,t,r){function n(e){return o(e)&&i(e)}var i=e("./isArrayLike"),o=e("./isObjectLike");t.exports=n},{"./isArrayLike":354,"./isObjectLike":365}],356:[function(e,t,r){function n(e){return e===!0||e===!1||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Boolean]";t.exports=n},{"./_baseGetTag":213,"./isObjectLike":365}],357:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),o="object"==typeof r&&r&&!r.nodeType&&r,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||i;t.exports=f},{"./_root":317,"./stubFalse":386}],358:[function(e,t,r){var n=e("./_baseIsDate"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isDate,s=a?i(a):n;t.exports=s},{"./_baseIsDate":217,"./_baseUnary":237,"./_nodeUtil":313}],359:[function(e,t,r){function n(e){if(null==e)return!0;if(u(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||a(e)))return!e.length;var t=o(e);if(t==h||t==d)return!e.size;if(f(e))return!i(e).length;for(var r in e)if(b.call(e,r))return!1;return!0}var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArguments"),s=e("./isArray"),u=e("./isArrayLike"),c=e("./isBuffer"),f=e("./_isPrototype"),l=e("./isTypedArray"),h="[object Map]",d="[object Set]",p=Object.prototype,b=p.hasOwnProperty;t.exports=n},{"./_baseKeys":225,"./_getTag":277,"./_isPrototype":295,"./isArguments":352,"./isArray":353,"./isArrayLike":354,"./isBuffer":357,"./isTypedArray":368}],360:[function(e,t,r){function n(e){return"number"==typeof e&&o(e)}var i=e("./_root"),o=i.isFinite;t.exports=n},{"./_root":317}],361:[function(e,t,r){function n(e){if(!o(e))return!1;var t=i(e);return t==s||t==u||t==a||t==c}var i=e("./_baseGetTag"),o=e("./isObject"),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=n},{"./_baseGetTag":213,"./isObject":364}],362:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],363:[function(e,t,r){function n(e){return"number"==typeof e||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Number]";t.exports=n},{"./_baseGetTag":213,"./isObjectLike":365}],364:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],365:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],366:[function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&i(e)==s}var i=e("./_baseGetTag"),o=e("./isArray"),a=e("./isObjectLike"),s="[object String]";t.exports=n},{"./_baseGetTag":213,"./isArray":353,"./isObjectLike":365}],367:[function(e,t,r){function n(e){return"symbol"==typeof e||o(e)&&i(e)==a}var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Symbol]";t.exports=n},{"./_baseGetTag":213,"./isObjectLike":365}],368:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},{"./_baseIsTypedArray":223,"./_baseUnary":237,"./_nodeUtil":313}],369:[function(e,t,r){function n(e){return a(e)?i(e):o(e)}var i=e("./_arrayLikeKeys"),o=e("./_baseKeys"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":190,"./_baseKeys":225,"./isArrayLike":354}],370:[function(e,t,r){function n(e){return a(e)?i(e,!0):o(e)}var i=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":190,"./_baseKeysIn":226,"./isArrayLike":354}],371:[function(e,t,r){(function(e){(function(){function n(e,t){return e.set(t[0],t[1]),e}function i(e,t){return e.add(t),e}function o(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function a(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function h(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function N(e,t){for(var r=e.length;r--&&x(t,e[r],0)>-1;);return r}function L(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function F(e){return"\\"+_r[e]}function U(e,t){return null==e?re:e[t]}function z(e){return fr.test(e)}function q(e){return lr.test(e)} +function K(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function H(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function G(e,t){return function(r){return e(t(r))}}function V(e,t){for(var r=-1,n=e.length,i=0,o=[];++r>>1,Ne=[["ary",we],["bind",pe],["bindKey",be],["curry",ye],["curryRight",ge],["flip",Se],["partial",_e],["partialRight",me],["rearg",xe]],Le="[object Arguments]",Fe="[object Array]",Ue="[object AsyncFunction]",ze="[object Boolean]",qe="[object Date]",Ke="[object DOMException]",He="[object Error]",Ge="[object Function]",Ve="[object GeneratorFunction]",Ye="[object Map]",We="[object Number]",$e="[object Null]",Xe="[object Object]",Ze="[object Proxy]",Je="[object RegExp]",Qe="[object Set]",et="[object String]",tt="[object Symbol]",rt="[object Undefined]",nt="[object WeakMap]",it="[object WeakSet]",ot="[object ArrayBuffer]",at="[object DataView]",st="[object Float32Array]",ut="[object Float64Array]",ct="[object Int8Array]",ft="[object Int16Array]",lt="[object Int32Array]",ht="[object Uint8Array]",dt="[object Uint8ClampedArray]",pt="[object Uint16Array]",bt="[object Uint32Array]",vt=/\b__p \+= '';/g,yt=/\b(__p \+=) '' \+/g,gt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,mt=/[&<>"']/g,wt=RegExp(_t.source),xt=RegExp(mt.source),St=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Et=/^\w*$/,jt=/^\./,At=/[\\^$.*+?()[\]{}|]/g,Mt=RegExp(At.source),Ct=/^\s+|\s+$/g,Ot=/^\s+/,Tt=/\s+$/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,It=/\{\n\/\* \[wrapped with (.+)\] \*/,Pt=/,? & /,Dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Lt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Ut=/^\[object .+?Constructor\]$/,zt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Gt=/['\n\r\u2028\u2029\\]/g,Vt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Yt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Wt="["+Vt+"]",$t="[a-z\\xdf-\\xf6\\xf8-\\xff]",Xt="[^\\ud800-\\udfff"+Yt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Zt="\\ud83c[\\udffb-\\udfff]",Jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Qt="[\\ud800-\\udbff][\\udc00-\\udfff]",er="[A-Z\\xc0-\\xd6\\xd8-\\xde]",tr="(?:"+Wt+"|"+Zt+")?",rr="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Jt,Qt].join("|")+")[\\ufe0e\\ufe0f]?"+tr+")*",nr="[\\ufe0e\\ufe0f]?"+tr+rr,ir="(?:"+["[\\u2700-\\u27bf]",Jt,Qt].join("|")+")"+nr,or="(?:"+["[^\\ud800-\\udfff]"+Wt+"?",Wt,Jt,Qt,"[\\ud800-\\udfff]"].join("|")+")",ar=RegExp("['’]","g"),sr=RegExp(Wt,"g"),ur=RegExp(Zt+"(?="+Zt+")|"+or+nr,"g"),cr=RegExp([er+"?"+$t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+["["+Yt+"]",er,"$"].join("|")+")","(?:"+er+"|"+Xt+")+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+["["+Yt+"]",er+"(?:"+$t+"|"+Xt+")","$"].join("|")+")",er+"?(?:"+$t+"|"+Xt+")+(?:['’](?:d|ll|m|re|s|t|ve))?",er+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",ir].join("|"),"g"),fr=RegExp("[\\u200d\\ud800-\\udfff"+Vt+"\\ufe0e\\ufe0f]"),lr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],dr=-1,pr={};pr[st]=pr[ut]=pr[ct]=pr[ft]=pr[lt]=pr[ht]=pr[dt]=pr[pt]=pr[bt]=!0,pr[Le]=pr[Fe]=pr[ot]=pr[ze]=pr[at]=pr[qe]=pr[He]=pr[Ge]=pr[Ye]=pr[We]=pr[Xe]=pr[Je]=pr[Qe]=pr[et]=pr[nt]=!1;var br={};br[Le]=br[Fe]=br[ot]=br[at]=br[ze]=br[qe]=br[st]=br[ut]=br[ct]=br[ft]=br[lt]=br[Ye]=br[We]=br[Xe]=br[Je]=br[Qe]=br[et]=br[tt]=br[ht]=br[dt]=br[pt]=br[bt]=!0,br[He]=br[Ge]=br[nt]=!1;var vr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},yr={"&":"&","<":"<",">":">",'"':""","'":"'"},gr={"&":"&","<":"<",">":">",""":'"',"'":"'"},_r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mr=parseFloat,wr=parseInt,xr="object"==typeof e&&e&&e.Object===Object&&e,Sr="object"==typeof self&&self&&self.Object===Object&&self,kr=xr||Sr||Function("return this")(),Er="object"==typeof r&&r&&!r.nodeType&&r,jr=Er&&"object"==typeof t&&t&&!t.nodeType&&t,Ar=jr&&jr.exports===Er,Mr=Ar&&xr.process,Cr=function(){try{return Mr&&Mr.binding&&Mr.binding("util")}catch(e){}}(),Or=Cr&&Cr.isArrayBuffer,Tr=Cr&&Cr.isDate,Rr=Cr&&Cr.isMap,Ir=Cr&&Cr.isRegExp,Pr=Cr&&Cr.isSet,Dr=Cr&&Cr.isTypedArray,Br=j("length"),Nr=A(vr),Lr=A(yr),Fr=A(gr),Ur=function e(t){function r(e){if(tu(e)&&!dh(e)&&!(e instanceof $)){if(e instanceof A)return e;if(df.call(e,"__wrapped__"))return Jo(e)}return new A(e)}function g(){}function A(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=re}function $(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Pe,this.__views__=[]}function Q(){var e=new $(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e}function ee(){if(this.__filtered__){var e=new $(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Dt(){var e=this.__wrapped__.value(),t=this.__dir__,r=dh(e),n=t<0,i=r?e.length:0,o=So(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,f=this.__iteratees__,l=f.length,h=0,d=Kf(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&h-1}function nr(e,t){var r=this.__data__,n=Gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ir(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Jr(e,t,r,n,i,o){var a,u=t&ce,c=t&fe,f=t≤if(r&&(a=i?r(e,n,i,o):r(e)),a!==re)return a;if(!eu(e))return e;var l=dh(e);if(l){if(a=jo(e),!u)return Ii(e,a)}else{var h=Sl(e),d=h==Ge||h==Ve;if(bh(e))return wi(e,u);if(h==Xe||h==Le||d&&!i){if(a=c||d?{}:Ao(e),!u)return c?Bi(e,Wr(a,e)):Di(e,Yr(a,e))}else{if(!br[h])return i?e:{};a=Mo(e,h,Jr,u)}}o||(o=new _r);var p=o.get(e);if(p)return p;o.set(e,a);var b=f?c?bo:po:c?Nu:Bu,v=l?re:b(e);return s(v||e,function(n,i){v&&(i=n,n=e[i]),Hr(a,i,Jr(n,t,r,i,e,o))}),a}function Qr(e){var t=Bu(e);return function(r){return en(r,e,t)}}function en(e,t,r){var n=r.length;if(null==e)return!n;for(e=nf(e);n--;){var i=r[n],o=t[i],a=e[i];if(a===re&&!(i in e)||!o(a))return!1}return!0}function tn(e,t,r){if("function"!=typeof e)throw new sf(oe);return jl(function(){e.apply(re,r)},t)}function rn(e,t,r,n){var i=-1,o=l,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=d(t,I(r))),n?(o=h,a=!1):t.length>=ne&&(o=D,a=!1,t=new vr(t));e:for(;++ii?0:i+r),n=n===re||n>i?i:gu(n),n<0&&(n+=i),n=r>n?0:_u(n);r0&&r(s)?t>1?un(s,t-1,r,n,i):p(i,s):n||(i[i.length]=s)}return i}function cn(e,t){return e&&dl(e,t,Bu)}function fn(e,t){return e&&pl(e,t,Bu)}function ln(e,t){return f(t,function(t){return Zs(e[t])})}function hn(e,t){t=_i(t,e);for(var r=0,n=t.length;null!=e&&rt}function vn(e,t){return null!=e&&df.call(e,t)}function yn(e,t){return null!=e&&t in nf(e)}function gn(e,t,r){return e>=Kf(t,r)&&e=120&&f.length>=120)?new vr(a&&f):re}f=e[0];var p=-1,b=s[0];e:for(;++p-1;)s!==e&&Af.call(s,u,1),Af.call(e,u,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;To(i)?Af.call(e,i,1):li(e,i)}}return e}function $n(e,t){return e+Bf(Vf()*(t-e+1))}function Xn(e,t,r,n){for(var i=-1,o=qf(Df((t-e)/(r||1)),0),a=Jc(o);o--;)a[n?o:++i]=e,e+=r;return a}function Zn(e,t){var r="";if(!e||t<1||t>Te)return r;do{t%2&&(r+=e),(t=Bf(t/2))&&(e+=e)}while(t);return r}function Jn(e,t){return Al(Ko(e,t,jc),e+"")}function Qn(e){return Br($u(e))}function ei(e,t){var r=$u(e);return Wo(r,Zr(t,0,r.length))}function ti(e,t,r,n){if(!eu(e))return e;t=_i(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Jc(i);++n>>1,a=e[o];null!==a&&!hu(a)&&(r?a<=t:a=ne){var c=t?null:_l(e);if(c)return Y(c);a=!1,i=D,u=new vr}else u=t?[]:s;e:for(;++n=n?e:ni(e,t,r)}function wi(e,t){if(t)return e.slice();var r=e.length,n=Sf?Sf(r):new e.constructor(r);return e.copy(n),n}function xi(e){var t=new e.constructor(e.byteLength);return new xf(t).set(new xf(e)),t}function Si(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function ki(e,t,r){return b(t?r(H(e),ce):H(e),n,new e.constructor)}function Ei(e){var t=new e.constructor(e.source,Nt.exec(e));return t.lastIndex=e.lastIndex,t}function ji(e,t,r){return b(t?r(Y(e),ce):Y(e),i,new e.constructor)}function Ai(e){return ul?nf(ul.call(e)):{}}function Mi(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var r=e!==re,n=null===e,i=e===e,o=hu(e),a=t!==re,s=null===t,u=t===t,c=hu(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!i)return 1;if(!n&&!o&&!c&&e=s)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}function Ti(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,u=t.length,c=qf(o-a,0),f=Jc(u+c),l=!n;++s1?r[i-1]:re,a=i>2?r[2]:re;for(o=e.length>3&&"function"==typeof o?(i--,o):re,a&&Ro(r[0],r[1],a)&&(o=i<3?re:o,i=1),t=nf(t);++n-1?i[o?t[a]:a]:re}}function Yi(e){return ho(function(t){var r=t.length,n=r,i=A.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new sf(oe);if(i&&!a&&"wrapper"==vo(o))var a=new A([],!0)}for(n=a?n:r;++n1&&g.reverse(),l&&us))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var f=-1,l=!0,h=r&de?new vr:re;for(o.set(e,t),o.set(t,e);++f1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Rt,"{\n/* [wrapped with "+t+"] */\n")}function Oo(e){return dh(e)||hh(e)||!!(Mf&&e&&e[Mf])}function To(e,t){return!!(t=null==t?Te:t)&&("number"==typeof e||qt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=je)return arguments[0]}else t=0;return e.apply(re,arguments)}}function Wo(e,t){var r=-1,n=e.length,i=n-1;for(t=t===re?n:t;++r=this.__values__.length;return{done:e,value:e?re:this.__values__[this.__index__++]}}function Ja(){return this}function Qa(e){for(var t,r=this;r instanceof g;){var n=Jo(r);n.__index__=0,n.__values__=re,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t}function es(){var e=this.__wrapped__;if(e instanceof $){var t=e;return this.__actions__.length&&(t=new $(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ka],thisArg:re}),new A(t,this.__chain__)}return this.thru(ka)}function ts(){return pi(this.__wrapped__,this.__actions__)}function rs(e,t,r){var n=dh(e)?c:nn;return r&&Ro(e,t,r)&&(t=re),n(e,go(t,3))}function ns(e,t){return(dh(e)?f:sn)(e,go(t,3))}function is(e,t){return un(fs(e,t),1)}function os(e,t){return un(fs(e,t),Oe)}function as(e,t,r){return r=r===re?1:gu(r),un(fs(e,t),r)}function ss(e,t){return(dh(e)?s:ll)(e,go(t,3))}function us(e,t){return(dh(e)?u:hl)(e,go(t,3))}function cs(e,t,r,n){e=qs(e)?e:$u(e),r=r&&!n?gu(r):0;var i=e.length;return r<0&&(r=qf(i+r,0)),lu(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&x(e,t,r)>-1}function fs(e,t){return(dh(e)?d:Nn)(e,go(t,3))}function ls(e,t,r,n){return null==e?[]:(dh(t)||(t=null==t?[]:[t]),r=n?re:r,dh(r)||(r=null==r?[]:[r]),Kn(e,t,r))}function hs(e,t,r){var n=dh(e)?b:M,i=arguments.length<3;return n(e,go(t,4),r,i,ll)}function ds(e,t,r){var n=dh(e)?v:M,i=arguments.length<3;return n(e,go(t,4),r,i,hl)}function ps(e,t){return(dh(e)?f:sn)(e,Ms(go(t,3)))}function bs(e){return(dh(e)?Br:Qn)(e)}function vs(e,t,r){return t=(r?Ro(e,t,r):t===re)?1:gu(t),(dh(e)?zr:ei)(e,t)}function ys(e){return(dh(e)?qr:ri)(e)}function gs(e){if(null==e)return 0;if(qs(e))return lu(e)?Z(e):e.length;var t=Sl(e);return t==Ye||t==Qe?e.size:Pn(e).length}function _s(e,t,r){var n=dh(e)?y:ii;return r&&Ro(e,t,r)&&(t=re),n(e,go(t,3))}function ms(e,t){if("function"!=typeof t)throw new sf(oe);return e=gu(e),function(){if(--e<1)return t.apply(this,arguments)}}function ws(e,t,r){return t=r?re:t,t=e&&null==t?e.length:t,oo(e,we,re,re,re,re,t)}function xs(e,t){var r;if("function"!=typeof t)throw new sf(oe);return e=gu(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=re),r}}function Ss(e,t,r){t=r?re:t;var n=oo(e,ye,re,re,re,re,re,t);return n.placeholder=Ss.placeholder,n}function ks(e,t,r){t=r?re:t;var n=oo(e,ge,re,re,re,re,re,t);return n.placeholder=ks.placeholder,n}function Es(e,t,r){function n(t){var r=h,n=d;return h=d=re,g=t,b=e.apply(n,r)}function i(e){return g=e,v=jl(s,t),_?n(e):b}function o(e){var r=e-y,n=e-g,i=t-r;return m?Kf(i,p-n):i}function a(e){var r=e-y,n=e-g;return y===re||r>=t||r<0||m&&n>=p}function s(){var e=th();if(a(e))return u(e);v=jl(s,o(e))}function u(e){return v=re,w&&h?n(e):(h=d=re,b)}function c(){v!==re&&gl(v),g=0,h=y=d=v=re}function f(){return v===re?b:u(th())}function l(){var e=th(),r=a(e);if(h=arguments,d=this,y=e,r){if(v===re)return i(y);if(m)return v=jl(s,t),n(y)}return v===re&&(v=jl(s,t)),b}var h,d,p,b,v,y,g=0,_=!1,m=!1,w=!0;if("function"!=typeof e)throw new sf(oe);return t=mu(t)||0,eu(r)&&(_=!!r.leading,m="maxWait"in r,p=m?qf(mu(r.maxWait)||0,t):p,w="trailing"in r?!!r.trailing:w),l.cancel=c,l.flush=f,l}function js(e){return oo(e,Se)}function As(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new sf(oe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(As.Cache||ir),r}function Ms(e){if("function"!=typeof e)throw new sf(oe);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Cs(e){return xs(2,e)}function Os(e,t){if("function"!=typeof e)throw new sf(oe);return t=t===re?t:gu(t),Jn(e,t)}function Ts(e,t){if("function"!=typeof e)throw new sf(oe);return t=null==t?0:qf(gu(t),0),Jn(function(r){var n=r[t],i=mi(r,0,t);return n&&p(i,n),o(e,this,i)})}function Rs(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new sf(oe);return eu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Es(e,t,{leading:n,maxWait:t,trailing:i})}function Is(e){return ws(e,1)}function Ps(e,t){return sh(gi(t),e)}function Ds(){if(!arguments.length)return[];var e=arguments[0];return dh(e)?e:[e]}function Bs(e){return Jr(e,le)}function Ns(e,t){return t="function"==typeof t?t:re,Jr(e,le,t)}function Ls(e){return Jr(e,ce|le)}function Fs(e,t){return t="function"==typeof t?t:re,Jr(e,ce|le,t)}function Us(e,t){return null==t||en(e,t,Bu(t))}function zs(e,t){return e===t||e!==e&&t!==t}function qs(e){return null!=e&&Qs(e.length)&&!Zs(e)}function Ks(e){return tu(e)&&qs(e)}function Hs(e){return e===!0||e===!1||tu(e)&&pn(e)==ze}function Gs(e){return tu(e)&&1===e.nodeType&&!cu(e)}function Vs(e){if(null==e)return!0;if(qs(e)&&(dh(e)||"string"==typeof e||"function"==typeof e.splice||bh(e)||mh(e)||hh(e)))return!e.length;var t=Sl(e);if(t==Ye||t==Qe)return!e.size;if(No(e))return!Pn(e).length;for(var r in e)if(df.call(e,r))return!1;return!0}function Ys(e,t){return En(e,t)}function Ws(e,t,r){r="function"==typeof r?r:re;var n=r?r(e,t):re;return n===re?En(e,t,re,r):!!n}function $s(e){if(!tu(e))return!1;var t=pn(e);return t==He||t==Ke||"string"==typeof e.message&&"string"==typeof e.name&&!cu(e)}function Xs(e){return"number"==typeof e&&Ff(e)}function Zs(e){if(!eu(e))return!1;var t=pn(e);return t==Ge||t==Ve||t==Ue||t==Ze}function Js(e){return"number"==typeof e&&e==gu(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Te}function eu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function tu(e){return null!=e&&"object"==typeof e}function ru(e,t){return e===t||Mn(e,t,mo(t))}function nu(e,t,r){return r="function"==typeof r?r:re,Mn(e,t,mo(t),r)}function iu(e){return uu(e)&&e!=+e}function ou(e){if(kl(e))throw new ef(ie);return Cn(e)}function au(e){return null===e}function su(e){return null==e}function uu(e){return"number"==typeof e||tu(e)&&pn(e)==We}function cu(e){if(!tu(e)||pn(e)!=Xe)return!1;var t=kf(e);if(null===t)return!0;var r=df.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&hf.call(r)==yf}function fu(e){return Js(e)&&e>=-Te&&e<=Te}function lu(e){return"string"==typeof e||!dh(e)&&tu(e)&&pn(e)==et}function hu(e){return"symbol"==typeof e||tu(e)&&pn(e)==tt}function du(e){return e===re}function pu(e){return tu(e)&&Sl(e)==nt}function bu(e){return tu(e)&&pn(e)==it}function vu(e){if(!e)return[];if(qs(e))return lu(e)?J(e):Ii(e);if(Cf&&e[Cf])return K(e[Cf]());var t=Sl(e);return(t==Ye?H:t==Qe?Y:$u)(e)}function yu(e){if(!e)return 0===e?e:0;if((e=mu(e))===Oe||e===-Oe){return(e<0?-1:1)*Re}return e===e?e:0}function gu(e){var t=yu(e),r=t%1;return t===t?r?t-r:t:0}function _u(e){return e?Zr(gu(e),0,Pe):0}function mu(e){if("number"==typeof e)return e;if(hu(e))return Ie;if(eu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ct,"");var r=Ft.test(e);return r||zt.test(e)?wr(e.slice(2),r?2:8):Lt.test(e)?Ie:+e}function wu(e){return Pi(e,Nu(e))}function xu(e){return e?Zr(gu(e),-Te,Te):0===e?e:0}function Su(e){return null==e?"":ci(e)}function ku(e,t){var r=fl(e);return null==t?r:Yr(r,t)}function Eu(e,t){return m(e,go(t,3),cn)}function ju(e,t){return m(e,go(t,3),fn)}function Au(e,t){return null==e?e:dl(e,go(t,3),Nu)}function Mu(e,t){return null==e?e:pl(e,go(t,3),Nu)}function Cu(e,t){return e&&cn(e,go(t,3))}function Ou(e,t){return e&&fn(e,go(t,3))}function Tu(e){return null==e?[]:ln(e,Bu(e))}function Ru(e){return null==e?[]:ln(e,Nu(e))}function Iu(e,t,r){var n=null==e?re:hn(e,t);return n===re?r:n}function Pu(e,t){return null!=e&&Eo(e,t,vn)}function Du(e,t){return null!=e&&Eo(e,t,yn)}function Bu(e){return qs(e)?Cr(e):Pn(e)}function Nu(e){return qs(e)?Cr(e,!0):Dn(e)}function Lu(e,t){var r={};return t=go(t,3),cn(e,function(e,n,i){$r(r,t(e,n,i),e)}),r}function Fu(e,t){var r={};return t=go(t,3),cn(e,function(e,n,i){$r(r,n,t(e,n,i))}),r}function Uu(e,t){return zu(e,Ms(go(t)))}function zu(e,t){if(null==e)return{};var r=d(bo(e),function(e){return[e]});return t=go(t),Gn(e,r,function(e,r){return t(e,r[0])})}function qu(e,t,r){t=_i(t,e);var n=-1,i=t.length;for(i||(i=1,e=re);++nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=Vf();return Kf(e+i*(t-e+mr("1e-"+((i+"").length-1))),t)}return $n(e,t)}function ec(e){return Vh(Su(e).toLowerCase())}function tc(e){return(e=Su(e))&&e.replace(Kt,Nr).replace(sr,"")}function rc(e,t,r){e=Su(e),t=ci(t);var n=e.length;r=r===re?n:Zr(gu(r),0,n);var i=r;return(r-=t.length)>=0&&e.slice(r,i)==t}function nc(e){return e=Su(e),e&&xt.test(e)?e.replace(mt,Lr):e}function ic(e){return e=Su(e),e&&Mt.test(e)?e.replace(At,"\\$&"):e}function oc(e,t,r){e=Su(e),t=gu(t);var n=t?Z(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ji(Bf(i),r)+e+Ji(Df(i),r)}function ac(e,t,r){e=Su(e),t=gu(t);var n=t?Z(e):0;return t&&n>>0)?(e=Su(e),e&&("string"==typeof t||null!=t&&!gh(t))&&!(t=ci(t))&&z(e)?mi(J(e),0,r):e.split(t,r)):[]}function hc(e,t,r){return e=Su(e),r=null==r?0:Zr(gu(r),0,e.length),t=ci(t),e.slice(r,r+t.length)==t}function dc(e,t,n){var i=r.templateSettings;n&&Ro(e,t,n)&&(t=re),e=Su(e),t=Eh({},t,i,ao);var o,a,s=Eh({},t.imports,i.imports,ao),u=Bu(s),c=P(s,u),f=0,l=t.interpolate||Ht,h="__p += '",d=of((t.escape||Ht).source+"|"+l.source+"|"+(l===St?Bt:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++dr+"]")+"\n";e.replace(d,function(t,r,n,i,s,u){return n||(n=i),h+=e.slice(f,u).replace(Gt,F),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=u+t.length,t}),h+="';\n";var b=t.variable;b||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(vt,""):h).replace(yt,"$1").replace(gt,"$1;"),h="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Yh(function(){return tf(u,p+"return "+h).apply(re,c)});if(v.source=h,$s(v))throw v;return v}function pc(e){return Su(e).toLowerCase()}function bc(e){return Su(e).toUpperCase()}function vc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Ct,"");if(!e||!(t=ci(t)))return e;var n=J(e),i=J(t);return mi(n,B(n,i),N(n,i)+1).join("")}function yc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Tt,"");if(!e||!(t=ci(t)))return e;var n=J(e);return mi(n,0,N(n,J(t))+1).join("")}function gc(e,t,r){if((e=Su(e))&&(r||t===re))return e.replace(Ot,"");if(!e||!(t=ci(t)))return e;var n=J(e);return mi(n,B(n,J(t))).join("")}function _c(e,t){var r=ke,n=Ee;if(eu(t)){var i="separator"in t?t.separator:i;r="length"in t?gu(t.length):r,n="omission"in t?ci(t.omission):n}e=Su(e);var o=e.length;if(z(e)){var a=J(e);o=a.length}if(r>=o)return e;var s=r-Z(n);if(s<1)return n;var u=a?mi(a,0,s).join(""):e.slice(0,s);if(i===re)return u+n;if(a&&(s+=u.length-s),gh(i)){if(e.slice(s).search(i)){var c,f=u;for(i.global||(i=of(i.source,Su(Nt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var l=c.index;u=u.slice(0,l===re?s:l)}}else if(e.indexOf(ci(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+n}function mc(e){return e=Su(e),e&&wt.test(e)?e.replace(_t,Fr):e}function wc(e,t,r){return e=Su(e),t=r?re:t,t===re?q(e)?te(e):_(e):e.match(t)||[]}function xc(e){var t=null==e?0:e.length,r=go();return e=t?d(e,function(e){if("function"!=typeof e[1])throw new sf(oe);return[r(e[0]),e[1]]}):[],Jn(function(r){for(var n=-1;++nTe)return[];var r=Pe,n=Kf(e,Pe);t=go(t),e-=Pe;for(var i=T(n,t);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:St,variable:"",imports:{_:r}},r.prototype=g.prototype,r.prototype.constructor=r,A.prototype=fl(g.prototype),A.prototype.constructor=A,$.prototype=fl(g.prototype),$.prototype.constructor=$,Vt.prototype.clear=Yt,Vt.prototype.delete=Wt,Vt.prototype.get=$t,Vt.prototype.has=Xt,Vt.prototype.set=Zt,Jt.prototype.clear=Qt,Jt.prototype.delete=er,Jt.prototype.get=tr,Jt.prototype.has=rr,Jt.prototype.set=nr,ir.prototype.clear=or,ir.prototype.delete=ur,ir.prototype.get=cr,ir.prototype.has=fr,ir.prototype.set=lr,vr.prototype.add=vr.prototype.push=yr,vr.prototype.has=gr,_r.prototype.clear=xr,_r.prototype.delete=Sr,_r.prototype.get=Er,_r.prototype.has=jr,_r.prototype.set=Mr;var ll=Fi(cn),hl=Fi(fn,!0),dl=Ui(),pl=Ui(!0),bl=el?function(e,t){return el.set(e,t),e}:jc,vl=Tf?function(e,t){return Tf(e,"toString",{configurable:!0,enumerable:!1,value:kc(t),writable:!0})}:jc,yl=Jn,gl=Rf||function(e){return kr.clearTimeout(e)},_l=Zf&&1/Y(new Zf([,-0]))[1]==Oe?function(e){return new Zf(e)}:Rc,ml=el?function(e){return el.get(e)}:Rc,wl=Nf?function(e){return null==e?[]:(e=nf(e),f(Nf(e),function(t){return jf.call(e,t)}))}:Bc,xl=Nf?function(e){for(var t=[];e;)p(t,wl(e)),e=kf(e);return t}:Bc,Sl=pn;(Wf&&Sl(new Wf(new ArrayBuffer(1)))!=at||$f&&Sl(new $f)!=Ye||Xf&&"[object Promise]"!=Sl(Xf.resolve())||Zf&&Sl(new Zf)!=Qe||Jf&&Sl(new Jf)!=nt)&&(Sl=function(e){var t=pn(e),r=t==Xe?e.constructor:re,n=r?Xo(r):"";if(n)switch(n){case rl:return at;case nl:return Ye;case il:return"[object Promise]";case ol:return Qe;case al:return nt}return t});var kl=lf?Zs:Nc,El=Yo(bl),jl=Pf||function(e,t){return kr.setTimeout(e,t)},Al=Yo(vl),Ml=function(e){var t=As(e,function(e){return r.size===se&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return jt.test(e)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,r,n,i){t.push(n?i.replace(/\\(\\)?/g,"$1"):r||e)}),t}),Cl=Jn(function(e,t){return Ks(e)?rn(e,un(t,1,Ks,!0)):[]}),Ol=Jn(function(e,t){var r=ya(t);return Ks(r)&&(r=re),Ks(e)?rn(e,un(t,1,Ks,!0),go(r,2)):[]}),Tl=Jn(function(e,t){var r=ya(t);return Ks(r)&&(r=re),Ks(e)?rn(e,un(t,1,Ks,!0),re,r):[]}),Rl=Jn(function(e){var t=d(e,yi);return t.length&&t[0]===e[0]?_n(t):[]}),Il=Jn(function(e){var t=ya(e),r=d(e,yi);return t===ya(r)?t=re:r.pop(),r.length&&r[0]===e[0]?_n(r,go(t,2)):[]}),Pl=Jn(function(e){var t=ya(e),r=d(e,yi);return t="function"==typeof t?t:re,t&&r.pop(),r.length&&r[0]===e[0]?_n(r,re,t):[]}),Dl=Jn(ma),Bl=ho(function(e,t){var r=null==e?0:e.length,n=Xr(e,t);return Wn(e,d(t,function(e){return To(e,r)?+e:e}).sort(Ci)),n}),Nl=Jn(function(e){return fi(un(e,1,Ks,!0))}),Ll=Jn(function(e){var t=ya(e);return Ks(t)&&(t=re),fi(un(e,1,Ks,!0),go(t,2))}),Fl=Jn(function(e){var t=ya(e);return t="function"==typeof t?t:re,fi(un(e,1,Ks,!0),re,t)}),Ul=Jn(function(e,t){return Ks(e)?rn(e,t):[]}),zl=Jn(function(e){return bi(f(e,Ks))}),ql=Jn(function(e){var t=ya(e);return Ks(t)&&(t=re),bi(f(e,Ks),go(t,2))}),Kl=Jn(function(e){var t=ya(e);return t="function"==typeof t?t:re,bi(f(e,Ks),re,t)}),Hl=Jn(qa),Gl=Jn(function(e){var t=e.length,r=t>1?e[t-1]:re;return r="function"==typeof r?(e.pop(),r):re,Ka(e,r)}),Vl=ho(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return Xr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof $&&To(r)?(n=n.slice(r,+r+(t?1:0)),n.__actions__.push({func:Wa,args:[i],thisArg:re}),new A(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(re),e})):this.thru(i)}),Yl=Ni(function(e,t,r){df.call(e,r)?++e[r]:$r(e,r,1)}),Wl=Vi(sa),$l=Vi(ua),Xl=Ni(function(e,t,r){df.call(e,r)?e[r].push(t):$r(e,r,[t])}),Zl=Jn(function(e,t,r){var n=-1,i="function"==typeof t,a=qs(e)?Jc(e.length):[];return ll(e,function(e){a[++n]=i?o(t,e,r):wn(e,t,r)}),a}),Jl=Ni(function(e,t,r){$r(e,r,t)}),Ql=Ni(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),eh=Jn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ro(e,t[0],t[1])?t=[]:r>2&&Ro(t[0],t[1],t[2])&&(t=[t[0]]),Kn(e,un(t,1),[])}),th=If||function(){return kr.Date.now()},rh=Jn(function(e,t,r){var n=pe;if(r.length){var i=V(r,yo(rh));n|=_e}return oo(e,n,t,r,i)}),nh=Jn(function(e,t,r){var n=pe|be;if(r.length){var i=V(r,yo(nh));n|=_e}return oo(t,n,e,r,i)}),ih=Jn(function(e,t){return tn(e,1,t)}),oh=Jn(function(e,t,r){return tn(e,mu(t)||0,r)});As.Cache=ir;var ah=yl(function(e,t){t=1==t.length&&dh(t[0])?d(t[0],I(go())):d(un(t,1),I(go()));var r=t.length;return Jn(function(n){for(var i=-1,a=Kf(n.length,r);++i=t}),hh=xn(function(){return arguments}())?xn:function(e){return tu(e)&&df.call(e,"callee")&&!jf.call(e,"callee")},dh=Jc.isArray,ph=Or?I(Or):Sn,bh=Lf||Nc,vh=Tr?I(Tr):kn,yh=Rr?I(Rr):An,gh=Ir?I(Ir):On,_h=Pr?I(Pr):Tn,mh=Dr?I(Dr):Rn,wh=to(Bn),xh=to(function(e,t){return e<=t}),Sh=Li(function(e,t){if(No(t)||qs(t))return void Pi(t,Bu(t),e);for(var r in t)df.call(t,r)&&Hr(e,r,t[r])}),kh=Li(function(e,t){Pi(t,Nu(t),e)}),Eh=Li(function(e,t,r,n){Pi(t,Nu(t),e,n)}),jh=Li(function(e,t,r,n){Pi(t,Bu(t),e,n)}),Ah=ho(Xr),Mh=Jn(function(e){return e.push(re,ao),o(Eh,re,e)}),Ch=Jn(function(e){return e.push(re,so),o(Ph,re,e)}),Oh=$i(function(e,t,r){e[t]=r},kc(jc)),Th=$i(function(e,t,r){df.call(e,t)?e[t].push(r):e[t]=[r]},go),Rh=Jn(wn),Ih=Li(function(e,t,r){Un(e,t,r)}),Ph=Li(function(e,t,r,n){Un(e,t,r,n)}),Dh=ho(function(e,t){var r={};if(null==e)return r;var n=!1;t=d(t,function(t){return t=_i(t,e),n||(n=t.length>1),t}),Pi(e,bo(e),r),n&&(r=Jr(r,ce|fe|le,uo));for(var i=t.length;i--;)li(r,t[i]);return r}),Bh=ho(function(e,t){return null==e?{}:Hn(e,t)}),Nh=io(Bu),Lh=io(Nu),Fh=Ki(function(e,t,r){return t=t.toLowerCase(),e+(r?ec(t):t)}),Uh=Ki(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),zh=Ki(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),qh=qi("toLowerCase"),Kh=Ki(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),Hh=Ki(function(e,t,r){return e+(r?" ":"")+Vh(t)}),Gh=Ki(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Vh=qi("toUpperCase"),Yh=Jn(function(e,t){try{return o(e,re,t)}catch(e){return $s(e)?e:new ef(e)}}),Wh=ho(function(e,t){return s(t,function(t){t=$o(t),$r(e,t,rh(e[t],e))}),e}),$h=Yi(),Xh=Yi(!0),Zh=Jn(function(e,t){return function(r){return wn(r,e,t)}}),Jh=Jn(function(e,t){return function(r){return wn(e,r,t)}}),Qh=Zi(d),ed=Zi(c),td=Zi(y),rd=eo(),nd=eo(!0),id=Xi(function(e,t){return e+t},0),od=no("ceil"),ad=Xi(function(e,t){return e/t},1),sd=no("floor"),ud=Xi(function(e,t){return e*t},1),cd=no("round"),fd=Xi(function(e,t){return e-t},0);return r.after=ms,r.ary=ws,r.assign=Sh,r.assignIn=kh,r.assignInWith=Eh,r.assignWith=jh,r.at=Ah,r.before=xs,r.bind=rh,r.bindAll=Wh,r.bindKey=nh,r.castArray=Ds,r.chain=Va,r.chunk=Qo,r.compact=ea,r.concat=ta,r.cond=xc,r.conforms=Sc,r.constant=kc,r.countBy=Yl,r.create=ku,r.curry=Ss,r.curryRight=ks,r.debounce=Es,r.defaults=Mh,r.defaultsDeep=Ch,r.defer=ih,r.delay=oh,r.difference=Cl,r.differenceBy=Ol,r.differenceWith=Tl,r.drop=ra,r.dropRight=na,r.dropRightWhile=ia,r.dropWhile=oa,r.fill=aa,r.filter=ns,r.flatMap=is,r.flatMapDeep=os,r.flatMapDepth=as,r.flatten=ca,r.flattenDeep=fa,r.flattenDepth=la,r.flip=js,r.flow=$h,r.flowRight=Xh,r.fromPairs=ha,r.functions=Tu,r.functionsIn=Ru,r.groupBy=Xl,r.initial=ba,r.intersection=Rl,r.intersectionBy=Il,r.intersectionWith=Pl,r.invert=Oh,r.invertBy=Th,r.invokeMap=Zl,r.iteratee=Ac,r.keyBy=Jl,r.keys=Bu,r.keysIn=Nu,r.map=fs,r.mapKeys=Lu,r.mapValues=Fu,r.matches=Mc,r.matchesProperty=Cc,r.memoize=As,r.merge=Ih,r.mergeWith=Ph,r.method=Zh,r.methodOf=Jh,r.mixin=Oc,r.negate=Ms,r.nthArg=Ic,r.omit=Dh,r.omitBy=Uu,r.once=Cs,r.orderBy=ls,r.over=Qh,r.overArgs=ah,r.overEvery=ed,r.overSome=td,r.partial=sh,r.partialRight=uh,r.partition=Ql,r.pick=Bh,r.pickBy=zu,r.property=Pc,r.propertyOf=Dc,r.pull=Dl,r.pullAll=ma,r.pullAllBy=wa,r.pullAllWith=xa,r.pullAt=Bl,r.range=rd,r.rangeRight=nd,r.rearg=ch,r.reject=ps,r.remove=Sa,r.rest=Os,r.reverse=ka,r.sampleSize=vs,r.set=Ku,r.setWith=Hu,r.shuffle=ys,r.slice=Ea,r.sortBy=eh,r.sortedUniq=Ra,r.sortedUniqBy=Ia,r.split=lc,r.spread=Ts,r.tail=Pa,r.take=Da,r.takeRight=Ba,r.takeRightWhile=Na,r.takeWhile=La,r.tap=Ya,r.throttle=Rs,r.thru=Wa,r.toArray=vu,r.toPairs=Nh,r.toPairsIn=Lh,r.toPath=qc,r.toPlainObject=wu,r.transform=Gu,r.unary=Is,r.union=Nl,r.unionBy=Ll,r.unionWith=Fl,r.uniq=Fa,r.uniqBy=Ua,r.uniqWith=za,r.unset=Vu,r.unzip=qa,r.unzipWith=Ka,r.update=Yu,r.updateWith=Wu,r.values=$u,r.valuesIn=Xu,r.without=Ul,r.words=wc,r.wrap=Ps,r.xor=zl,r.xorBy=ql,r.xorWith=Kl,r.zip=Hl,r.zipObject=Ha,r.zipObjectDeep=Ga,r.zipWith=Gl,r.entries=Nh,r.entriesIn=Lh,r.extend=kh,r.extendWith=Eh,Oc(r,r),r.add=id,r.attempt=Yh,r.camelCase=Fh,r.capitalize=ec,r.ceil=od,r.clamp=Zu,r.clone=Bs,r.cloneDeep=Ls,r.cloneDeepWith=Fs,r.cloneWith=Ns,r.conformsTo=Us,r.deburr=tc,r.defaultTo=Ec,r.divide=ad,r.endsWith=rc,r.eq=zs,r.escape=nc,r.escapeRegExp=ic,r.every=rs,r.find=Wl,r.findIndex=sa,r.findKey=Eu,r.findLast=$l,r.findLastIndex=ua,r.findLastKey=ju,r.floor=sd,r.forEach=ss,r.forEachRight=us,r.forIn=Au,r.forInRight=Mu,r.forOwn=Cu,r.forOwnRight=Ou,r.get=Iu,r.gt=fh,r.gte=lh,r.has=Pu,r.hasIn=Du,r.head=da,r.identity=jc,r.includes=cs,r.indexOf=pa,r.inRange=Ju,r.invoke=Rh,r.isArguments=hh,r.isArray=dh,r.isArrayBuffer=ph,r.isArrayLike=qs,r.isArrayLikeObject=Ks,r.isBoolean=Hs,r.isBuffer=bh,r.isDate=vh,r.isElement=Gs,r.isEmpty=Vs,r.isEqual=Ys,r.isEqualWith=Ws,r.isError=$s,r.isFinite=Xs,r.isFunction=Zs,r.isInteger=Js,r.isLength=Qs,r.isMap=yh,r.isMatch=ru,r.isMatchWith=nu,r.isNaN=iu,r.isNative=ou,r.isNil=su,r.isNull=au,r.isNumber=uu,r.isObject=eu,r.isObjectLike=tu,r.isPlainObject=cu,r.isRegExp=gh,r.isSafeInteger=fu,r.isSet=_h,r.isString=lu,r.isSymbol=hu,r.isTypedArray=mh,r.isUndefined=du,r.isWeakMap=pu,r.isWeakSet=bu,r.join=va,r.kebabCase=Uh,r.last=ya,r.lastIndexOf=ga, +r.lowerCase=zh,r.lowerFirst=qh,r.lt=wh,r.lte=xh,r.max=Hc,r.maxBy=Gc,r.mean=Vc,r.meanBy=Yc,r.min=Wc,r.minBy=$c,r.stubArray=Bc,r.stubFalse=Nc,r.stubObject=Lc,r.stubString=Fc,r.stubTrue=Uc,r.multiply=ud,r.nth=_a,r.noConflict=Tc,r.noop=Rc,r.now=th,r.pad=oc,r.padEnd=ac,r.padStart=sc,r.parseInt=uc,r.random=Qu,r.reduce=hs,r.reduceRight=ds,r.repeat=cc,r.replace=fc,r.result=qu,r.round=cd,r.runInContext=e,r.sample=bs,r.size=gs,r.snakeCase=Kh,r.some=_s,r.sortedIndex=ja,r.sortedIndexBy=Aa,r.sortedIndexOf=Ma,r.sortedLastIndex=Ca,r.sortedLastIndexBy=Oa,r.sortedLastIndexOf=Ta,r.startCase=Hh,r.startsWith=hc,r.subtract=fd,r.sum=Xc,r.sumBy=Zc,r.template=dc,r.times=zc,r.toFinite=yu,r.toInteger=gu,r.toLength=_u,r.toLower=pc,r.toNumber=mu,r.toSafeInteger=xu,r.toString=Su,r.toUpper=bc,r.trim=vc,r.trimEnd=yc,r.trimStart=gc,r.truncate=_c,r.unescape=mc,r.uniqueId=Kc,r.upperCase=Gh,r.upperFirst=Vh,r.each=ss,r.eachRight=us,r.first=da,Oc(r,function(){var e={};return cn(r,function(t,n){df.call(r.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),r.VERSION="4.17.4",s(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){r[e].placeholder=r}),s(["drop","take"],function(e,t){$.prototype[e]=function(r){r=r===re?1:qf(gu(r),0);var n=this.__filtered__&&!t?new $(this):this.clone();return n.__filtered__?n.__takeCount__=Kf(r,n.__takeCount__):n.__views__.push({size:Kf(r,Pe),type:e+(n.__dir__<0?"Right":"")}),n},$.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),s(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r==Me||3==r;$.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:go(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),s(["head","last"],function(e,t){var r="take"+(t?"Right":"");$.prototype[e]=function(){return this[r](1).value()[0]}}),s(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");$.prototype[e]=function(){return this.__filtered__?new $(this):this[r](1)}}),$.prototype.compact=function(){return this.filter(jc)},$.prototype.find=function(e){return this.filter(e).head()},$.prototype.findLast=function(e){return this.reverse().find(e)},$.prototype.invokeMap=Jn(function(e,t){return"function"==typeof e?new $(this):this.map(function(r){return wn(r,e,t)})}),$.prototype.reject=function(e){return this.filter(Ms(go(e)))},$.prototype.slice=function(e,t){e=gu(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==re&&(t=gu(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},$.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$.prototype.toArray=function(){return this.take(Pe)},cn($.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=r[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(r.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof $,c=s[0],f=u||dh(t),l=function(e){var t=o.apply(r,p([e],s));return i&&h?t[0]:t};f&&n&&"function"==typeof c&&1!=c.length&&(u=f=!1);var h=this.__chain__,d=!!this.__actions__.length,b=a&&!h,v=u&&!d;if(!a&&f){t=v?t:new $(this);var y=e.apply(t,s);return y.__actions__.push({func:Wa,args:[l],thisArg:re}),new A(y,h)}return b&&v?e.apply(this,s):(y=this.thru(l),b?i?y.value()[0]:y.value():y)})}),s(["pop","push","shift","sort","splice","unshift"],function(e){var t=uf[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);r.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(dh(r)?r:[],e)}return this[n](function(r){return t.apply(dh(r)?r:[],e)})}}),cn($.prototype,function(e,t){var n=r[t];if(n){var i=n.name+"";(tl[i]||(tl[i]=[])).push({name:t,func:n})}}),tl[Wi(re,be).name]=[{name:"wrapper",func:re}],$.prototype.clone=Q,$.prototype.reverse=ee,$.prototype.value=Dt,r.prototype.at=Vl,r.prototype.chain=$a,r.prototype.commit=Xa,r.prototype.next=Za,r.prototype.plant=Qa,r.prototype.reverse=es,r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=ts,r.prototype.first=r.prototype.head,Cf&&(r.prototype[Cf]=Ja),r}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(kr._=Ur,define(function(){return Ur})):jr?((jr.exports=Ur)._=Ur,Er._=Ur):kr._=Ur}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],372:[function(e,t,r){function n(e,t){return(s(e)?i:a)(e,o(t,3))}var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),s=e("./isArray");t.exports=n},{"./_arrayMap":191,"./_baseIteratee":224,"./_baseMap":227,"./isArray":353}],373:[function(e,t,r){function n(e,t){var r={};return t=a(t,3),o(e,function(e,n,o){i(r,n,t(e,n,o))}),r}var i=e("./_baseAssignValue"),o=e("./_baseForOwn"),a=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":201,"./_baseForOwn":210,"./_baseIteratee":224}],374:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),o="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":174}],375:[function(e,t,r){function n(e){if("function"!=typeof e)throw new TypeError(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var i="Expected a function";t.exports=n},{}],376:[function(e,t,r){function n(){}t.exports=n},{}],377:[function(e,t,r){var n=e("./_root"),i=function(){return n.Date.now()};t.exports=i},{"./_root":317}],378:[function(e,t,r){function n(e){return i(2,e)}var i=e("./before");t.exports=n},{"./before":336}],379:[function(e,t,r){function n(e,t,r){return r||null==t?t=0:t&&(t=+t),s(o(e).replace(a,""),t||0)}var i=e("./_root"),o=e("./toString"),a=/^\s+/,s=i.parseInt;t.exports=n},{"./_root":317,"./toString":391}],380:[function(e,t,r){var n=e("./_createAggregator"),i=n(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});t.exports=i},{"./_createAggregator":256}],381:[function(e,t,r){function n(e){return a(e)?i(s(e)):o(e)}var i=e("./_baseProperty"),o=e("./_basePropertyDeep"),a=e("./_isKey"),s=e("./_toKey");t.exports=n},{"./_baseProperty":230,"./_basePropertyDeep":231,"./_isKey":292,"./_toKey":331}],382:[function(e,t,r){function n(e,t){return(s(e)?i:o)(e,u(a(t,3)))}var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),s=e("./isArray"),u=e("./negate");t.exports=n},{"./_arrayFilter":187,"./_baseFilter":206,"./_baseIteratee":224,"./isArray":353,"./negate":375}],383:[function(e,t,r){function n(e){if(null==e)return 0;if(a(e))return s(e)?u(e):e.length;var t=o(e);return t==c||t==f?e.size:i(e).length}var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArrayLike"),s=e("./isString"),u=e("./_stringSize"),c="[object Map]",f="[object Set]";t.exports=n},{"./_baseKeys":225,"./_getTag":277,"./_stringSize":329,"./isArrayLike":354,"./isString":366}],384:[function(e,t,r){function n(e,t,r){var n=s(e)?i:a;return r&&u(e,t,r)&&(t=void 0),n(e,o(t,3))}var i=e("./_arraySome"),o=e("./_baseIteratee"),a=e("./_baseSome"),s=e("./isArray"),u=e("./_isIterateeCall");t.exports=n},{"./_arraySome":194,"./_baseIteratee":224,"./_baseSome":234,"./_isIterateeCall":291,"./isArray":353}],385:[function(e,t,r){function n(){return[]}t.exports=n},{}],386:[function(e,t,r){function n(){return!1}t.exports=n},{}],387:[function(e,t,r){function n(e,t,r){var n=!0,s=!0;if("function"!=typeof e)throw new TypeError(a);return o(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),i(e,t,{leading:n,maxWait:t,trailing:s})}var i=e("./debounce"),o=e("./isObject"),a="Expected a function";t.exports=n},{"./debounce":339,"./isObject":364}],388:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===o||e===-o){return(e<0?-1:1)*a}return e===e?e:0}var i=e("./toNumber"),o=1/0,a=1.7976931348623157e308;t.exports=n},{"./toNumber":390}],389:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":388}],390:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var r=c.test(e);return r||f.test(e)?l(e.slice(2),r?2:8):u.test(e)?a:+e}var i=e("./isObject"),o=e("./isSymbol"),a=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=n},{"./isObject":364,"./isSymbol":367}],391:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":236}],392:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseRest"),o=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=i(function(e){return o(n(e,1,a,!0))});t.exports=s},{"./_baseFlatten":208,"./_baseRest":232,"./_baseUniq":238,"./isArrayLikeObject":355}],393:[function(e,t,r){function n(e){return null==e?[]:i(e,o(e))}var i=e("./_baseValues"),o=e("./keys");t.exports=n},{"./_baseValues":239,"./keys":369}],394:[function(e,t,r){var n=e("./_baseDifference"),i=e("./_baseRest"),o=e("./isArrayLikeObject"),a=i(function(e,t){return o(e)?n(e,t):[]});t.exports=a},{"./_baseDifference":204,"./_baseRest":232,"./isArrayLikeObject":355}],395:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=Object.create,o=Object.prototype.hasOwnProperty;t.exports=function(e){var t,r=0,a=1,s=i(null),u=i(null),c=0;return e=n(e),{hit:function(n){var i=u[n],f=++c;if(s[f]=n,u[n]=f,!i){if(++r<=e)return;return n=s[a],t(n),n}if(delete s[i],a===i)for(;!o.call(s,++a);)continue},delete:t=function(e){var t=u[e];if(t&&(delete s[t],delete u[e],--r,a===t)){if(!r)return c=0,void(a=1);for(;!o.call(s,++a);)continue}},clear:function(){r=0,a=1,s=i(null),u=i(null),c=0}}}},{"es5-ext/number/to-pos-integer":120}],396:[function(e,t,r){"use strict";var n=e("es5-ext/array/from"),i=e("es5-ext/object/map"),o=e("es5-ext/object/mixin"),a=e("es5-ext/function/_define-length"),s=e("next-tick"),u=Array.prototype.slice,c=Function.prototype.apply,f=Object.create;e("../lib/registered-extensions").async=function(e,t){var r,l,h,d=f(null),p=f(null),b=t.memoized,v=t.original;t.memoized=a(function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=u.call(t,0,-1)),b.apply(l=this,h=t)},b);try{o(t.memoized,b)}catch(e){}t.on("get",function(e){var n,i,o;if(r){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],r]:d[e].push(r),void(r=null);n=r,i=l,o=h,r=l=h=null,s(function(){var a;hasOwnProperty.call(p,e)?(a=p[e],t.emit("getasync",e,o,i),c.call(n,a.context,a.args)):(r=n,l=i,h=o,b.apply(i,o))})}}),t.original=function(){var e,i,o,a;return r?(e=n(arguments),i=function e(r){var i,o,u=e.id;return null==u?void s(c.bind(e,this,arguments)):(delete e.id,i=d[u],delete d[u],i?(o=n(arguments),t.has(u)&&(r?t.delete(u):(p[u]={context:this,args:o},t.emit("setasync",u,"function"==typeof i?1:i.length))),"function"==typeof i?a=c.call(i,this,o):i.forEach(function(e){a=c.call(e,this,o)},this),a):void 0)},o=r,r=l=h=null,e.push(i),a=c.call(v,this,e),i.cb=o,r=i,a):c.call(v,this,arguments)},t.on("set",function(e){if(!r)return void t.delete(e);d[e]?"function"==typeof d[e]?d[e]=[d[e],r.cb]:d[e].push(r.cb):d[e]=r.cb,delete r.cb,r.id=e,r=null}),t.on("delete",function(e){var r;hasOwnProperty.call(d,e)||p[e]&&(r=p[e],delete p[e],t.emit("deleteasync",e,u.call(r.args,1)))}),t.on("clear",function(){var e=p;p=f(null),t.emit("clearasync",i(e,function(e){return u.call(e.args,1)}))})}},{"../lib/registered-extensions":404,"es5-ext/array/from":104,"es5-ext/function/_define-length":109,"es5-ext/object/map":132,"es5-ext/object/mixin":133,"next-tick":418}],397:[function(e,t,r){"use strict";var n=e("es5-ext/object/valid-callable"),i=e("es5-ext/object/for-each"),o=e("../lib/registered-extensions"),a=Function.prototype.apply;o.dispose=function(e,t,r){var s;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",s=function(t,r){a.call(e,null,r)}),void t.on("clearasync",function(e){i(e,function(e,t){s(t,e)})});t.on("delete",s=function(t,r){e(r)}),t.on("clear",function(e){i(e,function(e,t){s(t,e)})})}},{"../lib/registered-extensions":404,"es5-ext/object/for-each":125,"es5-ext/object/valid-callable":136}],398:[function(e,t,r){"use strict";var n=e("es5-ext/array/from"),i=e("es5-ext/object/for-each"),o=e("next-tick"),a=e("is-promise"),s=e("timers-ext/valid-timeout"),u=e("../lib/registered-extensions"),c=Function.prototype,f=Math.max,l=Math.min,h=Object.create;u.maxAge=function(e,t,r){var d,p,b,v;(e=s(e))&&(d=h(null),p=r.async&&u.async||r.promise&&u.promise?"async":"",t.on("set"+p,function(r){d[r]=setTimeout(function(){t.delete(r)},e),v&&(v[r]&&"nextTick"!==v[r]&&clearTimeout(v[r]),v[r]=setTimeout(function(){delete v[r]},b))}),t.on("delete"+p,function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])}),r.preFetch&&(b=r.preFetch===!0||isNaN(r.preFetch)?.333:f(l(Number(r.preFetch),1),0))&&(v={},b=(1-b)*e,t.on("get"+p,function(e,i,s){v[e]||(v[e]="nextTick",o(function(){var o;"nextTick"===v[e]&&(delete v[e],t.delete(e),r.async&&(i=n(i),i.push(c)),o=t.memoized.apply(s,i),r.promise&&a(o)&&("function"==typeof o.done?o.done(c,c):o.then(c,c)))}))})),t.on("clear"+p,function(){i(d,function(e){clearTimeout(e)}),d={},v&&(i(v,function(e){"nextTick"!==e&&clearTimeout(e)}),v={})}))}},{"../lib/registered-extensions":404,"es5-ext/array/from":104,"es5-ext/object/for-each":125,"is-promise":166,"next-tick":418,"timers-ext/valid-timeout":493}],399:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=e("lru-queue"),o=e("../lib/registered-extensions");o.max=function(e,t,r){var a,s,u;(e=n(e))&&(s=i(e),a=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+a,u=function(e){void 0!==(e=s.hit(e))&&t.delete(e)}),t.on("get"+a,u),t.on("delete"+a,s.delete),t.on("clear"+a,s.clear))}},{"../lib/registered-extensions":404,"es5-ext/number/to-pos-integer":120,"lru-queue":395}],400:[function(e,t,r){"use strict";var n=e("es5-ext/object/map"),i=e("es5-ext/object/primitive-set"),o=e("es5-ext/object/validate-stringifiable-value"),a=e("es5-ext/to-short-string-representation"),s=e("is-promise"),u=e("next-tick"),c=Object.create,f=i("then","then:finally","done","done:finally");e("../lib/registered-extensions").promise=function(e,t){var r=c(null),i=c(null),l=c(null);if(e===!0)e=null;else if(e=o(e),!f[e])throw new TypeError("'"+a(e)+"' is not valid promise mode");t.on("set",function(n,o,a){var c=!1,f=!1;if(!s(a))return i[n]=a,void t.emit("setasync",n,1);r[n]=1,l[n]=a;var h=function(e){var o=r[n];if(c)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'then:finally' or 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},d=function(){c=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},p=e;if(p||(p="function"==typeof a.finally?"then:finally":"then"),"then"===p)a.then(function(e){u(h.bind(this,e))},function(){u(d)});else if("then:finally"===p){if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'then:finally' mode");a.then(function(e){f=!0,u(h.bind(this,e))}),a.finally(function(){f||d()})}else if("done"===p){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");a.done(h,d)}else if("done:finally"===p){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");a.done(h),a.finally(d)}}),t.on("get",function(e,n,i){var o;if(r[e])return void++r[e];o=l[e];var a=function(){t.emit("getasync",e,n,i)};s(o)?"function"==typeof o.done?o.done(a):o.then(function(){u(a)}):a()}),t.on("delete",function(e){if(delete l[e],r[e])return void delete r[e];if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}}),t.on("clear",function(){var e=i;i=c(null),r=c(null),l=c(null),t.emit("clearasync",n(e,function(e){return[e]}))})}},{"../lib/registered-extensions":404,"es5-ext/object/map":132,"es5-ext/object/primitive-set":135,"es5-ext/object/validate-stringifiable-value":138,"es5-ext/to-short-string-representation":145,"is-promise":166,"next-tick":418}],401:[function(e,t,r){"use strict";var n=e("d"),i=e("../lib/registered-extensions"),o=Object.create,a=Object.defineProperties;i.refCounter=function(e,t,r){var s,u;s=o(null),u=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+u,function(e,t){s[e]=t||1}),t.on("get"+u,function(e){++s[e]}),t.on("delete"+u,function(e){delete s[e]}),t.on("clear"+u,function(){s={}}),a(t.memoized,{deleteRef:n(function(){var e=t.get(arguments);return null===e?null:s[e]?!--s[e]&&(t.delete(e),!0):null}),getRefCount:n(function(){var e=t.get(arguments);return null===e?0:s[e]?s[e]:0})})}},{"../lib/registered-extensions":404,d:76}],402:[function(e,t,r){"use strict";var n=e("es5-ext/object/normalize-options"),i=e("./lib/resolve-length"),o=e("./plain");t.exports=function(t){var r,a=n(arguments[1]);return a.normalizer||0!==(r=a.length=i(a.length,t.length,a.async))&&(a.primitive?r===!1?a.normalizer=e("./normalizers/primitive"):r>1&&(a.normalizer=e("./normalizers/get-primitive-fixed")(r)):a.normalizer=r===!1?e("./normalizers/get")():1===r?e("./normalizers/get-1")():e("./normalizers/get-fixed")(r)),a.async&&e("./ext/async"),a.promise&&e("./ext/promise"),a.dispose&&e("./ext/dispose"),a.maxAge&&e("./ext/max-age"),a.max&&e("./ext/max"),a.refCounter&&e("./ext/ref-counter"),o(t,a)}},{"./ext/async":396,"./ext/dispose":397,"./ext/max":399,"./ext/max-age":398,"./ext/promise":400,"./ext/ref-counter":401,"./lib/resolve-length":405,"./normalizers/get":411,"./normalizers/get-1":408,"./normalizers/get-fixed":409,"./normalizers/get-primitive-fixed":410,"./normalizers/primitive":412,"./plain":413,"es5-ext/object/normalize-options":134}],403:[function(e,t,r){"use strict";var n=e("es5-ext/error/custom"),i=e("es5-ext/function/_define-length"),o=e("d"),a=e("event-emitter").methods,s=e("./resolve-resolve"),u=e("./resolve-normalize"),c=Function.prototype.apply,f=Function.prototype.call,l=Object.create,h=Object.defineProperties,d=a.on,p=a.emit;t.exports=function(e,t,r){var a,b,v,y,g,_,m,w,x,S,k,E,j,A,M,C=l(null);return b=t!==!1?t:isNaN(e.length)?1:e.length,r.normalizer&&(S=u(r.normalizer),v=S.get,y=S.set,g=S.delete,_=S.clear),null!=r.resolvers&&(M=s(r.resolvers)),A=v?i(function(t){var r,i,o=arguments;if(M&&(o=M(o)),null!==(r=v(o))&&hasOwnProperty.call(C,r))return k&&a.emit("get",r,o,this),C[r];if(i=1===o.length?f.call(e,this,o[0]):c.call(e,this,o),null===r){if(null!==(r=v(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=y(o)}else if(hasOwnProperty.call(C,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return C[r]=i,E&&a.emit("set",r,null,i),i},b):0===t?function(){var t;if(hasOwnProperty.call(C,"data"))return k&&a.emit("get","data",arguments,this),C.data;if(t=arguments.length?c.call(e,this,arguments):f.call(e,this),hasOwnProperty.call(C,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return C.data=t,E&&a.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(M&&(o=M(arguments)),i=String(o[0]),hasOwnProperty.call(C,i))return k&&a.emit("get",i,o,this),C[i];if(r=1===o.length?f.call(e,this,o[0]):c.call(e,this,o),hasOwnProperty.call(C,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return C[i]=r,E&&a.emit("set",i,null,r),r},a={original:e,memoized:A,profileName:r.profileName,get:function(e){return M&&(e=M(e)),v?v(e):String(e[0])},has:function(e){return hasOwnProperty.call(C,e)},delete:function(e){var t;hasOwnProperty.call(C,e)&&(g&&g(e),t=C[e],delete C[e],j&&a.emit("delete",e,t))},clear:function(){var e=C;_&&_(),C=l(null),a.emit("clear",e)},on:function(e,t){return"get"===e?k=!0:"set"===e?E=!0:"delete"===e&&(j=!0),d.call(this,e,t)},emit:p,updateEnv:function(){e=a.original}},m=v?i(function(e){var t,r=arguments;M&&(r=M(r)),null!==(t=v(r))&&a.delete(t)},b):0===t?function(){return a.delete("data")}:function(e){return M&&(e=M(arguments)[0]),a.delete(e)},w=i(function(){var e,t=arguments;return M&&(t=M(t)),e=v(t),C[e]}),x=i(function(){var e,t=arguments;return M&&(t=M(t)),null!==(e=v(t))&&a.has(e)}),h(A,{__memoized__:o(!0),delete:o(m),clear:o(a.clear),_get:o(w),_has:o(x)}),a}},{"./resolve-normalize":406,"./resolve-resolve":407,d:76,"es5-ext/error/custom":108,"es5-ext/function/_define-length":109,"event-emitter":151}],404:[function(e,t,r){"use strict"},{}],405:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer");t.exports=function(e,t,r){var i;return isNaN(e)?(i=t,i>=0?r&&i?i-1:i:1):e!==!1&&n(e)}},{"es5-ext/number/to-pos-integer":120}],406:[function(e,t,r){"use strict";var n=e("es5-ext/object/valid-callable");t.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},{"es5-ext/object/valid-callable":136}],407:[function(e,t,r){"use strict";var n,i=e("es5-ext/array/to-array"),o=e("es5-ext/object/is-value"),a=e("es5-ext/object/valid-callable"),s=Array.prototype.slice;n=function(e){return this.map(function(t,r){return t?t(e[r]):e[r]}).concat(s.call(e,this.length))},t.exports=function(e){return e=i(e),e.forEach(function(e){o(e)&&a(e)}),n.bind(e)}},{"es5-ext/array/to-array":107,"es5-ext/object/is-value":128,"es5-ext/object/valid-callable":136}],408:[function(e,t,r){"use strict";var n=e("es5-ext/array/#/e-index-of");t.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return i===-1?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);i!==-1&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},{"es5-ext/array/#/e-index-of":103}],409:[function(e,t,r){"use strict";var n=e("es5-ext/array/#/e-index-of"),i=Object.create;t.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,a=r;o>=7-n),new i(r)},n.prototype.test=function(e,t,r){var n=e.bitLength(),o=i.mont(e),a=new i(1).toRed(o);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),u=s.subn(1),c=0;!s.testn(c);c++);for(var f=e.shrn(c),l=s.toRed(o);t>0;t--){var h=this._rand(u);r&&r(h);var d=h.toRed(o).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var p=1;p0;t--){var l=this._rand(s),h=e.gcd(l);if(0!==h.cmpn(1))return h;var d=l.toRed(n).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var p=1;p>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r0)for(r=0;r0?"future":"past"];return j(r)?r(t):r.replace(/%s/i,t)}function B(e,t){var r=e.toLowerCase();Rn[r]=Rn[r+"s"]=Rn[t]=e}function N(e){return"string"==typeof e?Rn[e]||Rn[e.toLowerCase()]:void 0}function L(e){var t,r,n={};for(r in e)f(e,r)&&(t=N(r))&&(n[t]=e[r]);return n}function F(e,t){In[e]=t}function U(e){var t=[];for(var r in e)t.push({unit:r,priority:In[r]});return t.sort(function(e,t){return e.priority-t.priority +}),t}function z(e,t){return function(n){return null!=n?(K(this,e,n),r.updateOffset(this,t),this):q(this,e)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,r){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](r)}function H(e){return e=N(e),j(this[e])?this[e]():this}function G(e,t){if("object"==typeof e){e=L(e);for(var r=U(e),n=0;n=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}function Y(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(Nn[e]=i),t&&(Nn[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])}),r&&(Nn[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,r,n=e.match(Pn);for(t=0,r=n.length;t=0&&Dn.test(e);)e=e.replace(Dn,r),Dn.lastIndex=0,n-=1;return e}function J(e,t,r){qn[e]=j(t)?t:function(e,n){return e&&r?r:t}}function Q(e,t){return f(qn,e)?qn[e](t._strict,t._locale):new RegExp(ee(e))}function ee(e){return te(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))}function te(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),s(t)&&(n=function(e,r){r[t]=w(e)}),r=0;r=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function me(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function we(e,t,r){var n=7+t-r;return-((7+me(e,0,n).getUTCDay()-t)%7)+n-1}function xe(e,t,r,n,i){var o,a,s=(7+r-n)%7,u=we(e,n,i),c=1+7*(t-1)+s+u;return c<=0?(o=e-1,a=ve(o)+c):c>ve(e)?(o=e+1,a=c-ve(e)):(o=e,a=c),{year:o,dayOfYear:a}}function Se(e,t,r){var n,i,o=we(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,n=a+ke(i,t,r)):a>ke(e.year(),t,r)?(n=a-ke(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function ke(e,t,r){var n=we(e,t,r),i=we(e+1,t,r);return(ve(e)-n+i)/7}function Ee(e){return Se(e,this._week.dow,this._week.doy).week}function je(){return this._week.dow}function Ae(){return this._week.doy}function Me(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ce(e){var t=Se(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Oe(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Te(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Re(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function Ie(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Pe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function De(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?(i=Qn.call(this._weekdaysParse,a),i!==-1?i:null):"ddd"===t?(i=Qn.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):"dddd"===t?(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._shortWeekdaysParse,a))!==-1?i:(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):"ddd"===t?(i=Qn.call(this._shortWeekdaysParse,a))!==-1?i:(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._minWeekdaysParse,a),i!==-1?i:null):(i=Qn.call(this._minWeekdaysParse,a))!==-1?i:(i=Qn.call(this._weekdaysParse,a))!==-1?i:(i=Qn.call(this._shortWeekdaysParse,a),i!==-1?i:null)}function Be(e,t,r){var n,i,o;if(this._weekdaysParseExact)return De.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=h([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Ne(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Oe(e,this.localeData()),this.add(e-t,"d")):t}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Fe(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Te(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ue(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=fi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ze(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=li),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qe(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ke(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)r=h([2e3,1]).day(t),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),o=this.weekdays(r,""),a.push(n),s.push(i),u.push(o),c.push(n),c.push(i),c.push(o);for(a.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=te(s[t]),u[t]=te(u[t]),c[t]=te(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function He(){return this.hours()%12||12}function Ge(){return this.hours()||24}function Ve(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ye(e,t){return t._meridiemParse}function We(e){return"p"===(e+"").toLowerCase().charAt(0)}function $e(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}function Xe(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,r,n,i,o=0;o0;){if(n=Je(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&x(i,r,!0)>=t-1)break;t--}o++}return null}function Je(r){var n=null;if(!vi[r]&&void 0!==t&&t&&t.exports)try{n=di._abbr,e("./locale/"+r),Qe(n)}catch(e){}return vi[r]}function Qe(e,t){var r;return e&&(r=a(t)?rt(e):et(e,t))&&(di=r),di._abbr}function et(e,t){if(null!==t){var r=bi;if(t.abbr=e,null!=vi[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=vi[e]._config;else if(null!=t.parentLocale){if(null==vi[t.parentLocale])return yi[t.parentLocale]||(yi[t.parentLocale]=[]),yi[t.parentLocale].push({name:e,config:t}),null;r=vi[t.parentLocale]._config}return vi[e]=new C(M(r,t)),yi[e]&&yi[e].forEach(function(e){et(e.name,e.config)}),Qe(e),vi[e]}return delete vi[e],null}function tt(e,t){if(null!=t){var r,n=bi;null!=vi[e]&&(n=vi[e]._config),t=M(n,t),r=new C(t),r.parentLocale=vi[e],vi[e]=r,Qe(e)}else null!=vi[e]&&(null!=vi[e].parentLocale?vi[e]=vi[e].parentLocale:null!=vi[e]&&delete vi[e]);return vi[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return di;if(!n(e)){if(t=Je(e))return t;e=[e]}return Ze(e)}function nt(){return Mn(vi)}function it(e){var t,r=e._a;return r&&p(e).overflow===-2&&(t=r[Gn]<0||r[Gn]>11?Gn:r[Vn]<1||r[Vn]>oe(r[Hn],r[Gn])?Vn:r[Yn]<0||r[Yn]>24||24===r[Yn]&&(0!==r[Wn]||0!==r[$n]||0!==r[Xn])?Yn:r[Wn]<0||r[Wn]>59?Wn:r[$n]<0||r[$n]>59?$n:r[Xn]<0||r[Xn]>999?Xn:-1,p(e)._overflowDayOfYear&&(tVn)&&(t=Vn),p(e)._overflowWeeks&&t===-1&&(t=Zn),p(e)._overflowWeekday&&t===-1&&(t=Jn),p(e).overflow=t),e}function ot(e){var t,r,n,i,o,a,s=e._i,u=gi.exec(s)||_i.exec(s);if(u){for(p(e).iso=!0,t=0,r=wi.length;t10?"YYYY ":"YY "),o="HH:mm"+(r[4]?":ss":""),r[1]){var l=new Date(r[2]),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()];if(r[1].substr(0,3)!==h)return p(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(r[5].length){case 2:0===u?s=" +0000":(u=f.indexOf(r[5][1].toUpperCase())-12,s=(u<0?" -":" +")+(""+u).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:s=c[r[5]];break;default:s=c[" GMT"]}r[5]=s,e._i=r.splice(1).join(""),a=" ZZ",e._f=n+i+o+a,ht(e),p(e).rfc2822=!0}else e._isValid=!1}function st(e){var t=Si.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));ot(e),e._isValid===!1&&(delete e._isValid,at(e),e._isValid===!1&&(delete e._isValid,r.createFromInputFallback(e)))}function ut(e,t,r){return null!=e?e:null!=t?t:r}function ct(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ft(e){var t,r,n,i,o=[];if(!e._d){for(n=ct(e),e._w&&null==e._a[Vn]&&null==e._a[Gn]&<(e),null!=e._dayOfYear&&(i=ut(e._a[Hn],n[Hn]),(e._dayOfYear>ve(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),r=me(i,0,e._dayOfYear),e._a[Gn]=r.getUTCMonth(),e._a[Vn]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Yn]&&0===e._a[Wn]&&0===e._a[$n]&&0===e._a[Xn]&&(e._nextDay=!0,e._a[Yn]=0),e._d=(e._useUTC?me:_e).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Yn]=24)}}function lt(e){var t,r,n,i,o,a,s,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)o=1,a=4,r=ut(t.GG,e._a[Hn],Se(mt(),1,4).year),n=ut(t.W,1),((i=ut(t.E,1))<1||i>7)&&(u=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var c=Se(mt(),o,a);r=ut(t.gg,e._a[Hn],c.year),n=ut(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(u=!0)):i=o}n<1||n>ke(r,o,a)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=xe(r,n,i,o,a),e._a[Hn]=s.year,e._dayOfYear=s.dayOfYear)}function ht(e){if(e._f===r.ISO_8601)return void ot(e);if(e._f===r.RFC_2822)return void at(e);e._a=[],p(e).empty=!0;var t,n,i,o,a,s=""+e._i,u=s.length,c=0;for(i=Z(e._f,e._locale).match(Pn)||[],t=0;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),Nn[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),ie(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=u-c,s.length>0&&p(e).unusedInput.push(s),e._a[Yn]<=12&&p(e).bigHour===!0&&e._a[Yn]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Yn]=dt(e._locale,e._a[Yn],e._meridiem),ft(e),it(e)}function dt(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?(n=e.isPM(r),n&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function pt(e){var t,r,n,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=yt(e),e._a){var t=e._isUTC?h(e._a):mt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qt(){return!!this.isValid()&&!this._isUTC}function Kt(){return!!this.isValid()&&this._isUTC}function Ht(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Gt(e,t){var r,n,i,o=e,a=null;return Mt(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(o={},t?o[t]=e:o.milliseconds=e):(a=Oi.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:w(a[Vn])*r,h:w(a[Yn])*r,m:w(a[Wn])*r,s:w(a[$n])*r,ms:w(Ct(1e3*a[Xn]))*r}):(a=Ti.exec(e))?(r="-"===a[1]?-1:1,o={y:Vt(a[2],r),M:Vt(a[3],r),w:Vt(a[4],r),d:Vt(a[5],r),h:Vt(a[6],r),m:Vt(a[7],r),s:Vt(a[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Wt(mt(o.from),mt(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),n=new At(o),Mt(e)&&f(e,"_locale")&&(n._locale=e._locale),n}function Vt(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Yt(e,t){var r={milliseconds:0,months:0};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Wt(e,t){var r;return e.isValid()&&t.isValid()?(t=Rt(t,e),e.isBefore(t)?r=Yt(e,t):(r=Yt(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function $t(e,t){return function(r,n){var i,o;return null===n||isNaN(+n)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),r="string"==typeof r?+r:r,i=Gt(r,n),Xt(this,i,e),this}}function Xt(e,t,n,i){var o=t._milliseconds,a=Ct(t._days),s=Ct(t._months);e.isValid()&&(i=null==i||i,o&&e._d.setTime(e._d.valueOf()+o*n),a&&K(e,"Date",q(e,"Date")+a*n),s&&fe(e,q(e,"Month")+s*n),i&&r.updateOffset(e,a||s))}function Zt(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Jt(e,t){var n=e||mt(),i=Rt(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,mt(n)))}function Qt(){return new g(this)}function er(e,t){var r=_(e)?e:mt(e);return!(!this.isValid()||!r.isValid())&&(t=N(a(t)?"millisecond":t),"millisecond"===t?this.valueOf()>r.valueOf():r.valueOf()9999?X(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):j(Date.prototype.toISOString)?this.toDate().toISOString():X(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function fr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+i)}function lr(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=X(this,e);return this.localeData().postformat(t)}function hr(e,t){return this.isValid()&&(_(e)&&e.isValid()||mt(e).isValid())?Gt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function dr(e){return this.from(mt(),e)}function pr(e,t){return this.isValid()&&(_(e)&&e.isValid()||mt(e).isValid())?Gt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function br(e){return this.to(mt(),e)}function vr(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function yr(){return this._locale}function gr(e){switch(e=N(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function _r(e){return void 0===(e=N(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function mr(){return this._d.valueOf()-6e4*(this._offset||0)}function wr(){return Math.floor(this.valueOf()/1e3)}function xr(){return new Date(this.valueOf())}function Sr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function kr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Er(){return this.isValid()?this.toISOString():null}function jr(){return b(this)}function Ar(){return l({},p(this))}function Mr(){return p(this).overflow}function Cr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Or(e,t){Y(0,[e,e.length],0,t)}function Tr(e){return Dr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Rr(e){return Dr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Ir(){return ke(this.year(),1,4)}function Pr(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function Dr(e,t,r,n,i){var o;return null==e?Se(this,n,i).year:(o=ke(e,n,i),t>o&&(t=o),Br.call(this,e,t,r,n,i))}function Br(e,t,r,n,i){var o=xe(e,t,r,n,i),a=me(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Nr(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Lr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Fr(e,t){t[Xn]=w(1e3*("0."+e))}function Ur(){return this._isUTC?"UTC":""}function zr(){return this._isUTC?"Coordinated Universal Time":""}function qr(e){return mt(1e3*e)}function Kr(){return mt.apply(null,arguments).parseZone()}function Hr(e){return e}function Gr(e,t,r,n){var i=rt(),o=h().set(n,t);return i[r](o,e)}function Vr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Gr(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Gr(e,n,r,"month");return i}function Yr(e,t,r,n){"boolean"==typeof e?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var i=rt(),o=e?i._week.dow:0;if(null!=r)return Gr(t,(r+o)%7,n,"day");var a,u=[];for(a=0;a<7;a++)u[a]=Gr(t,(a+o)%7,n,"day");return u}function Wr(e,t){return Vr(e,t,"months")}function $r(e,t){return Vr(e,t,"monthsShort")}function Xr(e,t,r){return Yr(e,t,r,"weekdays")}function Zr(e,t,r){return Yr(e,t,r,"weekdaysShort")}function Jr(e,t,r){return Yr(e,t,r,"weekdaysMin")}function Qr(){var e=this._data;return this._milliseconds=qi(this._milliseconds),this._days=qi(this._days),this._months=qi(this._months),e.milliseconds=qi(e.milliseconds),e.seconds=qi(e.seconds),e.minutes=qi(e.minutes),e.hours=qi(e.hours),e.months=qi(e.months),e.years=qi(e.years),this}function en(e,t,r,n){var i=Gt(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function tn(e,t){return en(this,e,t,1)}function rn(e,t){return en(this,e,t,-1)}function nn(e){return e<0?Math.floor(e):Math.ceil(e)}function on(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*nn(sn(s)+a),a=0,s=0),u.milliseconds=o%1e3,e=m(o/1e3),u.seconds=e%60,t=m(e/60),u.minutes=t%60,r=m(t/60),u.hours=r%24,a+=m(r/24),i=m(an(a)),s+=i,a-=nn(sn(i)),n=m(s/12),s%=12,u.days=a,u.months=s,u.years=n,this}function an(e){return 4800*e/146097}function sn(e){return 146097*e/4800}function un(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=N(e))||"year"===e)return t=this._days+n/864e5,r=this._months+an(t),"month"===e?r:r/12;switch(t=this._days+Math.round(sn(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function cn(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN}function fn(e){return function(){return this.as(e)}}function ln(e){return e=N(e),this.isValid()?this[e+"s"]():NaN}function hn(e){return function(){return this.isValid()?this._data[e]:NaN}}function dn(){return m(this.days()/7)}function pn(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function bn(e,t,r){var n=Gt(e).abs(),i=io(n.as("s")),o=io(n.as("m")),a=io(n.as("h")),s=io(n.as("d")),u=io(n.as("M")),c=io(n.as("y")),f=i<=oo.ss&&["s",i]||i0,f[4]=r,pn.apply(null,f)}function vn(e){return void 0===e?io:"function"==typeof e&&(io=e,!0)}function yn(e,t){return void 0!==oo[e]&&(void 0===t?oo[e]:(oo[e]=t,"s"===e&&(oo.ss=t-1),!0))}function gn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=bn(this,!e,t);return e&&(r=t.pastFuture(+this,r)),t.postformat(r)}function _n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n=ao(this._milliseconds)/1e3,i=ao(this._days),o=ao(this._months);e=m(n/60),t=m(e/60),n%=60,e%=60,r=m(o/12),o%=12;var a=r,s=o,u=i,c=t,f=e,l=n,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||f||l?"T":"")+(c?c+"H":"")+(f?f+"M":"")+(l?l+"S":""):"P0D"}var mn,wn;wn=Array.prototype.some?Array.prototype.some:function(e){ +for(var t=Object(this),r=t.length>>>0,n=0;n68?1900:2e3)};var oi=z("FullYear",!0);Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),F("week",5),F("isoWeek",5),J("w",/\d\d?/),J("ww",/\d\d?/,/\d\d/),J("W",/\d\d?/),J("WW",/\d\d?/,/\d\d/),ne(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=w(e)});var ai={dow:0,doy:6};Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),J("d",/\d\d?/),J("e",/\d\d?/),J("E",/\d\d?/),J("dd",function(e,t){return t.weekdaysMinRegex(e)}),J("ddd",function(e,t){return t.weekdaysShortRegex(e)}),J("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:p(r).invalidWeekday=e}),ne(["d","e","E"],function(e,t,r,n){t[n]=w(e)});var si="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ui="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ci="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fi=zn,li=zn,hi=zn;Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,He),Y("k",["kk",2],0,Ge),Y("hmm",0,0,function(){return""+He.apply(this)+V(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+He.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Ve("a",!0),Ve("A",!1),B("hour","h"),F("hour",13),J("a",Ye),J("A",Ye),J("H",/\d\d?/),J("h",/\d\d?/),J("k",/\d\d?/),J("HH",/\d\d?/,/\d\d/),J("hh",/\d\d?/,/\d\d/),J("kk",/\d\d?/,/\d\d/),J("hmm",/\d\d\d\d?/),J("hmmss",/\d\d\d\d\d\d?/),J("Hmm",/\d\d\d\d?/),J("Hmmss",/\d\d\d\d\d\d?/),re(["H","HH"],Yn),re(["k","kk"],function(e,t,r){var n=w(e);t[Yn]=24===n?0:n}),re(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),re(["h","hh"],function(e,t,r){t[Yn]=w(e),p(r).bigHour=!0}),re("hmm",function(e,t,r){var n=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n)),p(r).bigHour=!0}),re("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n,2)),t[$n]=w(e.substr(i)),p(r).bigHour=!0}),re("Hmm",function(e,t,r){var n=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n))}),re("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Yn]=w(e.substr(0,n)),t[Wn]=w(e.substr(n,2)),t[$n]=w(e.substr(i))});var di,pi=z("Hours",!0),bi={calendar:Cn,longDateFormat:On,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:Tn,months:ti,monthsShort:ri,week:ai,weekdays:si,weekdaysMin:ci,weekdaysShort:ui,meridiemParse:/[ap]\.?m?\.?/i},vi={},yi={},gi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_i=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mi=/Z|[+-]\d\d(?::?\d\d)?/,wi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Si=/^\/?Date\((\-?\d+)/i,ki=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Ei=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=mt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:v()}),Ai=function(){return Date.now?Date.now():+new Date},Mi=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ot("Z",":"),Ot("ZZ",""),J("Z",Un),J("ZZ",Un),re(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Tt(Un,e)});var Ci=/([\+\-]|\d\d)/gi;r.updateOffset=function(){};var Oi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ti=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Gt.fn=At.prototype,Gt.invalid=jt;var Ri=$t(1,"add"),Ii=$t(-1,"subtract");r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Pi=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Or("gggg","weekYear"),Or("ggggg","weekYear"),Or("GGGG","isoWeekYear"),Or("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),J("G",/[+-]?\d+/),J("g",/[+-]?\d+/),J("GG",/\d\d?/,/\d\d/),J("gg",/\d\d?/,/\d\d/),J("GGGG",/\d{1,4}/,/\d{4}/),J("gggg",/\d{1,4}/,/\d{4}/),J("GGGGG",/[+-]?\d{1,6}/,Ln),J("ggggg",/[+-]?\d{1,6}/,Ln),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=w(e)}),ne(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),B("quarter","Q"),F("quarter",7),J("Q",/\d/),re("Q",function(e,t){t[Gn]=3*(w(e)-1)}),Y("D",["DD",2],"Do","date"),B("date","D"),F("date",9),J("D",/\d\d?/),J("DD",/\d\d?/,/\d\d/),J("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),re(["D","DD"],Vn),re("Do",function(e,t){t[Vn]=w(e.match(/\d\d?/)[0],10)});var Di=z("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),F("dayOfYear",4),J("DDD",/\d{1,3}/),J("DDDD",/\d{3}/),re(["DDD","DDDD"],function(e,t,r){r._dayOfYear=w(e)}),Y("m",["mm",2],0,"minute"),B("minute","m"),F("minute",14),J("m",/\d\d?/),J("mm",/\d\d?/,/\d\d/),re(["m","mm"],Wn);var Bi=z("Minutes",!1);Y("s",["ss",2],0,"second"),B("second","s"),F("second",15),J("s",/\d\d?/),J("ss",/\d\d?/,/\d\d/),re(["s","ss"],$n);var Ni=z("Seconds",!1);Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),B("millisecond","ms"),F("millisecond",16),J("S",/\d{1,3}/,/\d/),J("SS",/\d{1,3}/,/\d\d/),J("SSS",/\d{1,3}/,/\d{3}/);var Li;for(Li="SSSS";Li.length<=9;Li+="S")J(Li,/\d+/);for(Li="S";Li.length<=9;Li+="S")re(Li,Fr);var Fi=z("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var Ui=g.prototype;Ui.add=Ri,Ui.calendar=Jt,Ui.clone=Qt,Ui.diff=ar,Ui.endOf=_r,Ui.format=lr,Ui.from=hr,Ui.fromNow=dr,Ui.to=pr,Ui.toNow=br,Ui.get=H,Ui.invalidAt=Mr,Ui.isAfter=er,Ui.isBefore=tr,Ui.isBetween=rr,Ui.isSame=nr,Ui.isSameOrAfter=ir,Ui.isSameOrBefore=or,Ui.isValid=jr,Ui.lang=Pi,Ui.locale=vr,Ui.localeData=yr,Ui.max=ji,Ui.min=Ei,Ui.parsingFlags=Ar,Ui.set=G,Ui.startOf=gr,Ui.subtract=Ii,Ui.toArray=Sr,Ui.toObject=kr,Ui.toDate=xr,Ui.toISOString=cr,Ui.inspect=fr,Ui.toJSON=Er,Ui.toString=ur,Ui.unix=wr,Ui.valueOf=mr,Ui.creationData=Cr,Ui.year=oi,Ui.isLeapYear=ge,Ui.weekYear=Tr,Ui.isoWeekYear=Rr,Ui.quarter=Ui.quarters=Nr,Ui.month=le,Ui.daysInMonth=he,Ui.week=Ui.weeks=Me,Ui.isoWeek=Ui.isoWeeks=Ce,Ui.weeksInYear=Pr,Ui.isoWeeksInYear=Ir,Ui.date=Di,Ui.day=Ui.days=Ne,Ui.weekday=Le,Ui.isoWeekday=Fe,Ui.dayOfYear=Lr,Ui.hour=Ui.hours=pi,Ui.minute=Ui.minutes=Bi,Ui.second=Ui.seconds=Ni,Ui.millisecond=Ui.milliseconds=Fi,Ui.utcOffset=Pt,Ui.utc=Bt,Ui.local=Nt,Ui.parseZone=Lt,Ui.hasAlignedHourOffset=Ft,Ui.isDST=Ut,Ui.isLocal=qt,Ui.isUtcOffset=Kt,Ui.isUtc=Ht,Ui.isUTC=Ht,Ui.zoneAbbr=Ur,Ui.zoneName=zr,Ui.dates=k("dates accessor is deprecated. Use date instead.",Di),Ui.months=k("months accessor is deprecated. Use month instead",le),Ui.years=k("years accessor is deprecated. Use year instead",oi),Ui.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Dt),Ui.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zt);var zi=C.prototype;zi.calendar=O,zi.longDateFormat=T,zi.invalidDate=R,zi.ordinal=I,zi.preparse=Hr,zi.postformat=Hr,zi.relativeTime=P,zi.pastFuture=D,zi.set=A,zi.months=ae,zi.monthsShort=se,zi.monthsParse=ce,zi.monthsRegex=pe,zi.monthsShortRegex=de,zi.week=Ee,zi.firstDayOfYear=Ae,zi.firstDayOfWeek=je,zi.weekdays=Re,zi.weekdaysMin=Pe,zi.weekdaysShort=Ie,zi.weekdaysParse=Be,zi.weekdaysRegex=Ue,zi.weekdaysShortRegex=ze,zi.weekdaysMinRegex=qe,zi.isPM=We,zi.meridiem=$e,Qe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qe),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",rt);var qi=Math.abs,Ki=fn("ms"),Hi=fn("s"),Gi=fn("m"),Vi=fn("h"),Yi=fn("d"),Wi=fn("w"),$i=fn("M"),Xi=fn("y"),Zi=hn("milliseconds"),Ji=hn("seconds"),Qi=hn("minutes"),eo=hn("hours"),to=hn("days"),ro=hn("months"),no=hn("years"),io=Math.round,oo={ss:44,s:45,m:45,h:22,d:26,M:11},ao=Math.abs,so=At.prototype;return so.isValid=Et,so.abs=Qr,so.add=tn,so.subtract=rn,so.as=un,so.asMilliseconds=Ki,so.asSeconds=Hi,so.asMinutes=Gi,so.asHours=Vi,so.asDays=Yi,so.asWeeks=Wi,so.asMonths=$i,so.asYears=Xi,so.valueOf=cn,so._bubble=on,so.get=ln,so.milliseconds=Zi,so.seconds=Ji,so.minutes=Qi,so.hours=eo,so.days=to,so.weeks=dn,so.months=ro,so.years=no,so.humanize=gn,so.toISOString=_n,so.toString=_n,so.toJSON=_n,so.locale=vr,so.localeData=yr,so.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_n),so.lang=Pi,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),J("x",/[+-]?\d+/),J("X",/[+-]?\d+(\.\d{1,3})?/),re("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))}),re("x",function(e,t,r){r._d=new Date(w(e))}),r.version="2.18.1",function(e){mn=e}(mt),r.fn=Ui,r.min=xt,r.max=St,r.now=Ai,r.utc=h,r.unix=qr,r.months=Wr,r.isDate=u,r.locale=Qe,r.invalid=v,r.duration=Gt,r.isMoment=_,r.weekdays=Xr,r.parseZone=Kr,r.localeData=rt,r.isDuration=Mt,r.monthsShort=$r,r.weekdaysMin=Jr,r.defineLocale=et,r.updateLocale=tt,r.locales=nt,r.weekdaysShort=Zr,r.normalizeUnits=N,r.relativeTimeRounding=vn,r.relativeTimeThreshold=yn,r.calendarFormat=Zt,r.prototype=Ui,r})},{}],418:[function(e,t,r){(function(e){"use strict";var r,n;r=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},n=function(e){var t,n,i=document.createTextNode(""),o=0;return new e(function(){var e;if(t)n&&(t=n.concat(t));else{if(!n)return;t=n}if(n=t,t=null,"function"==typeof n)return e=n,n=null,void e();for(i.data=o=++o%2;n;)e=n.shift(),n.length||(n=null),e()}).observe(i,{characterData:!0}),function(e){if(r(e),t)return void("function"==typeof t?t=[t,e]:t.push(e));t=e,i.data=o=++o%2}},t.exports=function(){if("object"==typeof e&&e&&"function"==typeof e.nextTick)return e.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return n(MutationObserver);if("function"==typeof WebKitMutationObserver)return n(WebKitMutationObserver)}return"function"==typeof setImmediate?function(e){setImmediate(r(e))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(e){setTimeout(r(e),0)}:null}()}).call(this,e("_process"))},{_process:428}],419:[function(e,t,r){t.exports={"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"}},{}],420:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.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())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.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())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var c=n.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())});r.EncryptedPrivateKey=c;var f=n.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())});r.DSAPrivateKey=f,r.DSAparam=n.define("DSAparam",function(){this.int()});var l=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=l;var h=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":421,"asn1.js":22}],421:[function(e,t,r){"use strict";var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(u)}),f=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),l=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),h=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":22}],422:[function(e,t,r){(function(r){var n=e("evp_bytestokey"),i=e("browserify-aes");t.exports=function(e,t){var o,a=e.toString(),s=a.match(/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m);if(s){var u="aes"+s[1],c=new r(s[2],"hex"),f=new r(s[3].replace(/\r?\n/g,""),"base64"),l=n(t,c.slice(0,8),parseInt(s[1],10)).key,h=[],d=i.createDecipheriv(u,l,c);h.push(d.update(f)),h.push(d.final()),o=r.concat(h)}else{o=new r(a.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m)[2].replace(/\r?\n/g,""),"base64")}return{tag:a.match(/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m)[1],data:o}}}).call(this,e("buffer").Buffer)},{"browserify-aes":43,buffer:67,evp_bytestokey:153}],423:[function(e,t,r){(function(r){function n(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var n,a,u=s(e,t),c=u.tag,f=u.data;switch(c){case"CERTIFICATE":a=o.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=o.PublicKey.decode(f,"der")),n=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=o.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":f=o.EncryptedPrivateKey.decode(f,"der"),f=i(f,t);case"PRIVATE KEY":switch(a=o.PrivateKey.decode(f,"der"),n=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:o.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=o.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return f=o.ECPrivateKey.decode(f,"der"),{curve:f.parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+c)}}function i(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=a[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=c.pbkdf2Sync(t,n,i,l),d=u.createDecipheriv(o,h,s),p=[];return p.push(d.update(f)),p.push(d.final()),r.concat(p)}var o=e("./asn1"),a=e("./aesid.json"),s=e("./fixProc"),u=e("browserify-aes"),c=e("pbkdf2");t.exports=n,n.signature=o.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":419,"./asn1":420,"./fixProc":422,"browserify-aes":43,buffer:67,pbkdf2:424}],424:[function(e,t,r){(function(t,n){var i=e("create-hmac"),o=e("./precondition");r.pbkdf2=function(e,t,n,i,a,s){if("function"==typeof a&&(s=a,a=void 0),o(n,i),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");setTimeout(function(){s(null,r.pbkdf2Sync(e,t,n,i,a))})};var a;if(t.browser)a="utf-8";else{a=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}r.pbkdf2Sync=function(e,t,r,s,u){n.isBuffer(e)||(e=new n(e,a)),n.isBuffer(t)||(t=new n(t,a)),o(r,s),u=u||"sha1";var c,f=1,l=new n(s),h=new n(t.length+4);t.copy(h,0,0,t.length);for(var d,p,b=1;b<=f;b++){h.writeUInt32BE(b,t.length);var v=i(u,e).update(h).digest();c||(c=v.length,p=new n(c),f=Math.ceil(s/c),d=s-(f-1)*c),v.copy(p,0,0,c);for(var y=1;yn||t!==t)throw new TypeError("Bad key length")}},{}],426:[function(e,t,r){(function(){var e=[].slice,n={}.hasOwnProperty;!function(e,n){"function"==typeof define&&define.amd?define(function(){return e.PinejsClientCore=n()}):"object"==typeof r?t.exports=n():e.PinejsClientCore=n()}(this,function(){var t,r,i;return i=function(){},r={},t=function(e,t){return r[e]=function(){return console.warn("pinejs-client deprecated:",t),r[e]=i}},t("expandObject","`$expand: a: b: ...` is deprecated, please use `$expand: a: $expand: b: ...` instead."),t("expandPrimitive",'`$expand: a: "b"` is deprecated, please use `$expand: a: $expand: "b"` instead.'),t("expandFilter",'`$filter: a: b: ...` is deprecated, please use `$filter: a: $any: { $alias: "x", $expr: x: b: ... }` instead.'),function(t,i){var o,a,s,u,c,f,l,h,d,p;return function(){var e,r,n,o;for(o=["isString","isNumber","isBoolean","isObject","isArray","isDate"],e=0,r=o.length;e1?"(("+n+"))":r?"("+n+")":n},o=function(e,t,r){return null==r&&(r=" eq "),null!=t?f(t)+r+e:e},a=function(e,t,r){var n,i;for(n in t)i=t[n],i="("+c(i)+")",i=i.replace(/\$/g,"$$$$"),e=e.replace(new RegExp("\\$"+n+"([^a-zA-Z0-9]|$)","g"),i+"$1");return o(e,r)},c=function(){var i,u,d;return d=function(n,d,p){var b,v,y,g,_,m,w,x,S,k,E,j;switch(p=p.slice(1)){case"ne":case"eq":case"gt":case"ge":case"lt":case"le":case"add":case"sub":case"mul":case"div":case"mod":if(p=" "+p+" ",h(n))return n=l(n),o(n,d,p);if(t.isArray(n))return n=i(n),n=s(n,p),o(n,d);if(t.isObject(n)){if(j=u(n),j.length<1)throw new Error(p+" objects must have at least 1 property, got: "+JSON.stringify(n));return 1===j.length?o(j[0],d,p):(n=s(j,p),o(n,d))}throw new Error("Expected null/string/number/bool/obj/array, got: "+typeof n);case"contains":case"endswith":case"startswith":case"length":case"indexof":case"substring":case"tolower":case"toupper":case"trim":case"concat":case"year":case"month":case"day":case"hour":case"minute":case"second":case"fractionalseconds":case"date":case"time":case"totaloffsetminutes":case"now":case"maxdatetime":case"mindatetime":case"totalseconds":case"round":case"floor":case"ceiling":case"isof":case"cast":if(h(n))return x=[],null!=d&&x.push(f(d)),x.push(l(n)),p+"("+x.join()+")";if(t.isArray(n))return n=i(n),n=s(n,",",!0),n=p+n,o(n,d);if(t.isObject(n))return j=u(n),n=s(j,",",!0),n=p+n,o(n,d);throw new Error("Expected null/string/number/obj/array, got: "+typeof n);case"raw":if(t.isString(n))return o(n,d);if(t.isArray(n)){if(E=n,n=E[0],k=2<=E.length?e.call(E,1):[],!t.isString(n))throw new Error("First element of array for $"+p+" must be a string, got: "+typeof n);for(w={},_=g=0,m=k.length;g0&&r.expandFilter(),i=t.concat(i)),o.push(c(a,i))));return o},i=function(e,t,r){var n,i,o,a;if(null==r&&(r=2),e.length0&&r.expandPrimitive(),f(o.concat(n))):t.isArray(n)?(n=e(n,o),n=d(n)):t.isObject(n)?(n=i(n,o),d(n)):void 0}}(),p=["apiPrefix","passthrough","passthroughByMethod"],function(){function e(e,r){var n,i,o;if(t.isString(e)&&(e={apiPrefix:e}),t.isObject(e))for(n=0,i=p.length;n1)throw new Error("Returned multiple results when only one was expected.");return e.d[0]}return e.d})},e.prototype.put=function(e){return this.request(e,{method:"PUT"})},e.prototype.patch=function(e){return this.request(e,{method:"PATCH"})},e.prototype.post=function(e){return this.request(e,{method:"POST"})},e.prototype.delete=function(e){ +return this.request(e,{method:"DELETE"})},e.prototype.compile=function(e){var r,i,o,a,s,f;if(t.isString(e))return e;if(null!=e.url)return e.url;if(null==e.resource)throw new Error("Either the url or resource must be specified.");if(s=e.resource,e.hasOwnProperty("id")){if(null==e.id)throw new Error("If the id property is set it must be non-null");s+="("+l(e.id)+")"}if(i=[],null!=e.options){o=e.options;for(r in o)n.call(o,r)&&(f=o[r],f=function(){switch(r){case"filter":return c(f);case"expand":return u(f);default:if(t.isString(f)||t.isArray(f))return d(f);throw new Error("'"+r+"' option has no special handling so must be either a string or array")}}(),i.push("$"+r+"="+f))}if(null!=e.customOptions){a=e.customOptions;for(r in a)n.call(a,r)&&(f=a[r],i.push(r+"="+f))}return i.length>0&&(s+="?"+i.join("&")),s},e.prototype.request=function(e,r){var o,a,s,u,c,f,l,h,d,p,b,v,y,g,_,m;null==r&&(r={});try{for(l=e.method,a=e.body,b=e.passthrough,null==b&&(b={}),t.isString(e)&&(l="GET"),o=null!=(v=e.apiPrefix)?v:this.apiPrefix,_=o+this.compile(e),l=null!=(y=null!=l?l:r.method)?y:"GET",l=l.toUpperCase(),f=[this.passthrough,null!=(g=this.passthroughByMethod[l])?g:{},null!=b?b:{},{method:l,url:_,body:a},r],p={},u=0,c=f.length;u1)for(var r=1;r=0;r--)t.push(JSON.stringify(e[r]));return t.join("")}};t.exports=function(e){if(void 0===e)return i.simple;if("string"==typeof e&&i.hasOwnProperty(e))return i[e];if(Array.isArray(e))return n(e);if("[object Function]"===Object.prototype.toString.call(e))return e;throw new Error("promise-memoize: invalid resolve option")}},{}],432:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":434,"./publicEncrypt":435}],433:[function(e,t,r){(function(r){function n(e){var t=new r(4);return t.writeUInt32BE(e,0),t}var i=e("create-hash");t.exports=function(e,t){for(var o,a=new r(""),s=0;a.length=t.length){o++;break}var a=t.slice(2,i-1);t.slice(i-1,i);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}function o(e,t){e=new r(e),t=new r(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));for(var o=-1;++ol||new c(t).cmp(u.modulus)>=0)throw new Error("decryption error");var d;d=o?h(new c(t),u):f(t,u);var p=new r(l-d.length);if(p.fill(0),d=r.concat([p,d],l),4===s)return n(u,d);if(1===s)return i(u,d,o);if(3===s)return d;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":38,"browserify-rsa":59,buffer:67,"create-hash":71,"parse-asn1":423}],435:[function(e,t,r){(function(r){function n(e,t){var n=e.modulus.byteLength(),i=t.length,o=u("sha1").update(new r("")).digest(),a=o.length,h=2*a;if(i>n-h-2)throw new Error("message too long");var d=new r(n-i-h-2);d.fill(0);var p=n-a-1,b=s(a),v=f(r.concat([o,d,new r([1]),t],p),c(b,p)),y=f(b,c(v,a));return new l(r.concat([new r([0]),y,v],n))}function i(e,t,n){var i=t.length,a=e.modulus.byteLength();if(i>a-11)throw new Error("message too long");var s;return n?(s=new r(a-i-3),s.fill(255)):s=o(a-i-3),new l(r.concat([new r([0,n?1:2]),s,new r([0]),t],a))}function o(e,t){for(var n,i=new r(e),o=0,a=s(2*e),u=0;o=0)throw new Error("data too long for modulus")}return r?d(s,u):h(s,u)}}).call(this,e("buffer").Buffer)},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":38,"browserify-rsa":59,buffer:67,"create-hash":71,"parse-asn1":423,randombytes:448}],436:[function(e,t,r){(function(r){function n(e,t){return new r(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}var i=e("bn.js");t.exports=n}).call(this,e("buffer").Buffer)},{"bn.js":38,buffer:67}],437:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++nc)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=l,f=h,u=a,l+=122192928e5;var p=(1e4*(268435455&l)+h)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var b=l/4294967296*1e4&268435455;i[n++]=b>>>8&255,i[n++]=255&b,i[n++]=b>>>24&15|16,i[n++]=b>>>16&255,i[n++]=a>>>8|128,i[n++]=255&a;for(var v=e.node||s,y=0;y<6;++y)i[n+y]=v[y];return t?t:o(i)}var i=r(4),o=r(5),a=i(),s=[1|a[0],a[1],a[2],a[3],a[4],a[5]],u=16383&(a[6]<<8|a[7]),c=0,f=0;e.exports=n},function(e,t){(function(t){var r,n=t.crypto||t.msCrypto;if(n&&n.getRandomValues){var i=new Uint8Array(16);r=function(){return n.getRandomValues(i),i}}if(!r){var o=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=r}).call(t,function(){return this}())},function(e,t){function r(e,t){var r=t||0,i=n;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=r},function(e,t,r){function n(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[n+s]=a[s];return t||o(a)}var i=r(4),o=r(5);e.exports=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r>>2]|=(r[i>>>2]>>>24-i%4*8&255)<<24-(n+i)%4*8;else if(65535>>2]=r[i>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n>>2]>>>24-n%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},f=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*o,i=e.min(4*t,i),t){for(var u=0;uf;){var l;e:{l=c;for(var h=e.sqrt(l),d=2;d<=h;d++)if(!(l%d)){l=!1;break e}l=!0}l&&(8>f&&(a[f]=u(e.pow(c,.5))),s[f]=u(e.pow(c,1/3)),f++),c++}var p=[],n=n.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],u=r[4],c=r[5],f=r[6],l=r[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var d=p[h-15],b=p[h-2];p[h]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+p[h-7]+((b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10)+p[h-16]}d=l+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&f)+s[h]+p[h],b=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),l=f,f=c,c=u,u=a+d|0,a=o,o=i,i=n,n=d+b|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(n),t.HmacSHA256=o._createHmacHelper(n)}(Math),function(){var e=r,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,i=4*n;r.sigBytes>i&&(r=e.finalize(r)),r.clamp();for(var o=this._oKey=r.clone(),a=this._iKey=r.clone(),s=o.words,u=a.words,c=0;c>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a>>6*(3-a)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map,i=n.charAt(64);i&&-1!=(i=e.indexOf(i))&&(r=i);for(var i=[],o=0,a=0;a>>6-a%4*2;i[o>>>2]|=(s|u)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,r,n,i,o,a){return((e=e+(t&r|~t&n)+i+a)<>>32-o)+t}function n(e,t,r,n,i,o,a){return((e=e+(t&n|r&~n)+i+a)<>>32-o)+t}function i(e,t,r,n,i,o,a){return((e=e+(t^r^n)+i+a)<>>32-o)+t}function o(e,t,r,n,i,o,a){return((e=e+(r^(t|~n))+i+a)<>>32-o)+t}for(var a=r,s=a.lib,u=s.WordArray,c=s.Hasher,s=a.algo,f=[],l=0;64>l;l++)f[l]=4294967296*e.abs(e.sin(l+1))|0;s=s.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,r){for(var a=0;16>a;a++){var s=r+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var a=this._hash.words,s=e[r+0],u=e[r+1],c=e[r+2],l=e[r+3],h=e[r+4],d=e[r+5],p=e[r+6],b=e[r+7],v=e[r+8],y=e[r+9],g=e[r+10],_=e[r+11],m=e[r+12],w=e[r+13],x=e[r+14],S=e[r+15],k=a[0],E=a[1],j=a[2],A=a[3],k=t(k,E,j,A,s,7,f[0]),A=t(A,k,E,j,u,12,f[1]),j=t(j,A,k,E,c,17,f[2]),E=t(E,j,A,k,l,22,f[3]),k=t(k,E,j,A,h,7,f[4]),A=t(A,k,E,j,d,12,f[5]),j=t(j,A,k,E,p,17,f[6]),E=t(E,j,A,k,b,22,f[7]),k=t(k,E,j,A,v,7,f[8]),A=t(A,k,E,j,y,12,f[9]),j=t(j,A,k,E,g,17,f[10]),E=t(E,j,A,k,_,22,f[11]),k=t(k,E,j,A,m,7,f[12]),A=t(A,k,E,j,w,12,f[13]),j=t(j,A,k,E,x,17,f[14]),E=t(E,j,A,k,S,22,f[15]),k=n(k,E,j,A,u,5,f[16]),A=n(A,k,E,j,p,9,f[17]),j=n(j,A,k,E,_,14,f[18]),E=n(E,j,A,k,s,20,f[19]),k=n(k,E,j,A,d,5,f[20]),A=n(A,k,E,j,g,9,f[21]),j=n(j,A,k,E,S,14,f[22]),E=n(E,j,A,k,h,20,f[23]),k=n(k,E,j,A,y,5,f[24]),A=n(A,k,E,j,x,9,f[25]),j=n(j,A,k,E,l,14,f[26]),E=n(E,j,A,k,v,20,f[27]),k=n(k,E,j,A,w,5,f[28]),A=n(A,k,E,j,c,9,f[29]),j=n(j,A,k,E,b,14,f[30]),E=n(E,j,A,k,m,20,f[31]),k=i(k,E,j,A,d,4,f[32]),A=i(A,k,E,j,v,11,f[33]),j=i(j,A,k,E,_,16,f[34]),E=i(E,j,A,k,x,23,f[35]),k=i(k,E,j,A,u,4,f[36]),A=i(A,k,E,j,h,11,f[37]),j=i(j,A,k,E,b,16,f[38]),E=i(E,j,A,k,g,23,f[39]),k=i(k,E,j,A,w,4,f[40]),A=i(A,k,E,j,s,11,f[41]),j=i(j,A,k,E,l,16,f[42]),E=i(E,j,A,k,p,23,f[43]),k=i(k,E,j,A,y,4,f[44]),A=i(A,k,E,j,m,11,f[45]),j=i(j,A,k,E,S,16,f[46]),E=i(E,j,A,k,c,23,f[47]),k=o(k,E,j,A,s,6,f[48]),A=o(A,k,E,j,b,10,f[49]),j=o(j,A,k,E,x,15,f[50]),E=o(E,j,A,k,d,21,f[51]),k=o(k,E,j,A,m,6,f[52]),A=o(A,k,E,j,l,10,f[53]),j=o(j,A,k,E,g,15,f[54]),E=o(E,j,A,k,u,21,f[55]),k=o(k,E,j,A,v,6,f[56]),A=o(A,k,E,j,S,10,f[57]),j=o(j,A,k,E,p,15,f[58]),E=o(E,j,A,k,w,21,f[59]),k=o(k,E,j,A,h,6,f[60]),A=o(A,k,E,j,_,10,f[61]),j=o(j,A,k,E,c,15,f[62]),E=o(E,j,A,k,y,21,f[63]);a[0]=a[0]+k|0,a[1]=a[1]+E|0,a[2]=a[2]+j|0,a[3]=a[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296) +;for(r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(r.length+1),this._process(),t=this._hash,r=t.words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),a.MD5=c._createHelper(s),a.HmacMD5=c._createHmacHelper(s)}(Math),function(){var e=r,t=e.lib,n=t.Base,i=t.WordArray,t=e.algo,o=t.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),o=i.create(),a=o.words,s=r.keySize,r=r.iterations;a.length>>2]}},n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:h}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=e.createEncryptor;else r=e.createDecryptor,this._minBufferSize=1;this._mode=r.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),f=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?o.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){e=s.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var r=o.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:r})}},p=n.SerializableCipher=i.extend({cfg:i.extend({format:f}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n);return t=i.finalize(t),i=i.cfg,d.create({ciphertext:t,key:r,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){return n||(n=o.random(8)),e=u.create({keySize:t+r}).compute(e,n),r=o.create(e.words.slice(t),4*r),e.sigBytes=4*t,d.create({key:e,iv:r,salt:n})}},b=n.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:t}),encrypt:function(e,t,r,n){return n=this.cfg.extend(n),r=n.kdf.execute(r,e.keySize,e.ivSize),n.iv=r.iv,e=p.encrypt.call(this,e,t,r.key,n),e.mixIn(r),e},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),r=n.kdf.execute(r,e.keySize,e.ivSize,t.salt),n.iv=r.iv,p.decrypt.call(this,e,t,r.key,n)}})}(),function(){for(var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],f=[],l=[],h=[],d=[],p=[],b=0;256>b;b++)p[b]=128>b?b<<1:b<<1^283;for(var v=0,y=0,b=0;256>b;b++){var g=y^y<<1^y<<2^y<<3^y<<4,g=g>>>8^255&g^99;i[v]=g,o[g]=v;var _=p[v],m=p[_],w=p[m],x=257*p[g]^16843008*g;a[v]=x<<24|x>>>8,s[v]=x<<16|x>>>16,u[v]=x<<8|x>>>24,c[v]=x,x=16843009*w^65537*m^257*_^16843008*v,f[g]=x<<24|x>>>8,l[g]=x<<16|x>>>16,h[g]=x<<8|x>>>24,d[g]=x,v?(v=_^p[p[p[w^_]]],y^=p[p[y]]):v=y=1}var S=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes/4,e=4*((this._nRounds=r+6)+1),n=this._keySchedule=[],o=0;o>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=a<<8|a>>>24,a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=S[o/r|0]<<24),n[o]=n[o-r]^a}for(t=this._invKeySchedule=[],r=0;rr||4>=o?a:f[i[a>>>24]]^l[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,l,h,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],f=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&h]^r[d++],v=n[f>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&c]^r[d++],y=n[l>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&f]^r[d++],h=n[h>>>24]^i[c>>>16&255]^o[f>>>8&255]^a[255&l]^r[d++],c=b,f=v,l=y;b=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],v=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[d++],y=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^r[d++],h=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[d++],e[t]=b,e[t+1]=v,e[t+2]=y,e[t+3]=h},keySize:8});e.AES=t._createHelper(n)}(),r.mode.ECB=function(){var e=r.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,r,n){var i=s.default.post(this.getStandardOrigin()+r.url).query(e).send(t);return this._abstractedXDR(i,r,n)}},{key:"GET",value:function(e,t,r){var n=s.default.get(this.getStandardOrigin()+t.url).query(e);return this._abstractedXDR(n,t,r)}},{key:"_abstractedXDR",value:function(e,t,r){var n=this;return this._config.logVerbosity&&(e=e.use(this._attachSuperagentLogger)),this._config.proxy&&(e=e.proxy(this._config.proxy)),this._config.keepAlive&&this._agentKeepAlive&&(e=this._agentKeepAlive(e)),e.timeout(t.timeout).end(function(e,i){var o={};return o.error=null!==e,o.operation=t.operation,i&&i.status&&(o.statusCode=i.status),e?(o.errorData=e,o.category=n._detectErrorCategory(e),r(o,null)):r(o,JSON.parse(i.text))})}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return f.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return f.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return f.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return f.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return f.default.PNNetworkIssuesCategory;if(e.timeout)return f.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return f.default.PNBadRequestCategory;if(e.response.forbidden)return f.default.PNAccessDeniedCategory}return f.default.PNUnknownCategory}},{key:"_attachSuperagentLogger",value:function(e){var t=(new Date).getTime(),r=(new Date).toISOString(),n=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();n.log("<<<<<"),n.log("["+r+"]","\n",e.url,"\n",e.qs),n.log("-----"),e.on("response",function(r){var i=(new Date).getTime(),o=i-t,a=(new Date).toISOString();n.log(">>>>>>"),n.log("["+a+" / "+o+"]","\n",e.url,"\n",e.qs,"\n",r.text),n.log("-----")})}}]),e}());t.default=l,e.exports=t.default},function(e,t,r){function n(){}function i(e){if(!y(e))return e;var t=[];for(var r in e)o(t,r,e[r]);return t.join("&")}function o(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){o(e,t,r)});else if(y(r))for(var n in r)o(e,t+"["+n+"]",r[n]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function a(e){for(var t,r,n={},i=e.split("&"),o=0,a=i.length;o=300)&&(n=new Error(t.statusText||"Unsuccessful HTTP response"),n.original=e,n.response=t,n.status=t.status)}catch(e){n=e}n?r.callback(n,t):r.callback(null,t)})}function d(e,t){var r=g("DELETE",e);return t&&r.end(t),r}var p;"undefined"!=typeof window?p=window:"undefined"!=typeof self?p=self:(console.warn("Using browser-only version of superagent in non-browser environment"),p=this);var b=r(13),v=r(14),y=r(15),g=e.exports=r(16).bind(null,h);g.getXHR=function(){if(!(!p.XMLHttpRequest||p.location&&"file:"==p.location.protocol&&p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};g.serializeObject=i,g.parseString=a,g.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},g.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},g.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},l.prototype.get=function(e){return this.header[e.toLowerCase()]},l.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var r=f(t);for(var n in r)this[n]=r[n]},l.prototype._parseBody=function(e){var t=g.parse[this.type];return!t&&u(this.type)&&(t=g.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},l.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},l.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",i=new Error(n);return i.status=this.status,i.method=t,i.url=r,i},g.Response=l,b(h.prototype);for(var m in v)h.prototype[m]=v[m];h.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},h.prototype.responseType=function(e){return this._responseType=e,this},h.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},h.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var n=btoa(e+":"+t);this.set("Authorization","Basic "+n);break;case"auto":this.username=e,this.password=t}return this},h.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},h.prototype.end=function(e){var t=this,r=this.xhr=g.getXHR(),i=this._timeout,o=this._formData||this._data;this._callback=e||n,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var a=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{r.onprogress=a.bind(null,"download"),r.upload&&(r.upload.onprogress=a.bind(null,"upload"))}catch(e){}if(i&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},i)),this._appendQueryString(),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof o&&!this._isHost(o)){var s=this._header["content-type"],c=this._serializer||g.serialize[s?s.split(";")[0]:""];!c&&u(s)&&(c=g.serialize["application/json"]),c&&(o=c(o))}for(var f in this.header)null!=this.header[f]&&r.setRequestHeader(f,this.header[f]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==o?o:null),this},g.Request=h,g.get=function(e,t,r){var n=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},g.head=function(e,t,r){var n=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.options=function(e,t,r){var n=g("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.del=d,g.delete=d,g.patch=function(e,t,r){var n=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.post=function(e,t,r){var n=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.put=function(e,t,r){var n=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},function(e,t,r){function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,i=0;i=o){var a={};a.category=p.default.PNRequestMessageCountExceededCategory,a.operation=e.operation,this._listenerManager.announceStatus(a)}i.forEach(function(e){var t=e.channel,n=e.subscriptionMatch,i=e.publishMetaData;if(t===n&&(n=null),h.default.endsWith(e.channel,"-pnpres")){var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=n?t:null,o.subscribedChannel=null!=n?n:t,t&&(o.channel=t.substring(0,t.lastIndexOf("-pnpres"))),n&&(o.subscription=n.substring(0,n.lastIndexOf("-pnpres"))),o.action=e.payload.action,o.state=e.payload.data,o.timetoken=i.publishTimetoken,o.occupancy=e.payload.occupancy,o.uuid=e.payload.uuid,o.timestamp=e.payload.timestamp,r._listenerManager.announcePresence(o)}else{var a={};a.channel=null,a.subscription=null,a.actualChannel=null!=n?t:null,a.subscribedChannel=null!=n?n:t,a.channel=t,a.subscription=n,a.timetoken=i.publishTimetoken,a.publisher=e.issuingClientId,r._config.cipherKey?a.message=r._crypto.decrypt(e.payload):a.message=e.payload,r._listenerManager.announceMessage(a)}}),this._region=t.metadata.region,this._timetoken=t.metadata.timetoken,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&(this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/leave"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i={};return n.length>0&&(i["channel-group"]=n.join(",")),i}function f(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(){return l.default.PNWhereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var r=e.config,n=t.uuid,i=void 0===n?r.UUID:n;return"/v2/presence/sub-key/"+r.subscribeKey+"/uuid/"+i}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNHeartbeatOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/heartbeat"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i=t.state,o=void 0===i?{}:i,a=e.config,s={};return n.length>0&&(s["channel-group"]=n.join(",")),s.state=JSON.stringify(o),s.heartbeat=a.getPresenceTimeout(),s}function f(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNGetStateOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.uuid,i=void 0===n?r.UUID:n,o=t.channels,a=void 0===o?[]:o,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(s)+"/uuid/"+i}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i={};return n.length>0&&(i["channel-group"]=n.join(",")),i}function f(e,t,r){var n=r.channels,i=void 0===n?[]:n,o=r.channelGroups,a=void 0===o?[]:o,s={};return 1===i.length&&0===a.length?s[i[0]]=t.payload:s=t.payload,{channels:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNSetStateOperation}function o(e,t){var r=e.config,n=t.state,i=t.channels,o=void 0===i?[]:i,a=t.channelGroups,s=void 0===a?[]:a;return n?r.subscribeKey?0===o.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+r.subscribeKey+"/channel/"+p.default.encodeString(o)+"/uuid/"+r.UUID+"/data"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.state,n=t.channelGroups,i=void 0===n?[]:n,o={};return o.state=JSON.stringify(r),i.length>0&&(o["channel-group"]=i.join(",")),o}function f(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNHereNowOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=t.channelGroups,a=void 0===o?[]:o,s="/v2/presence/sub-key/"+r.subscribeKey;if(i.length>0||a.length>0){var u=i.length>0?i.join(","):",";s+="/channel/"+p.default.encodeString(u)}return s}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var r=t.channelGroups,n=void 0===r?[]:r,i=t.includeUUIDs,o=void 0===i||i,a=t.includeState,s=void 0!==a&&a,u={};return o||(u.disable_uuids=1),s&&(u.state=1),n.length>0&&(u["channel-group"]=n.join(",")),u}function f(e,t,r){var n=r.channels,i=void 0===n?[]:n,o=r.channelGroups,a=void 0===o?[]:o,s=r.includeUUIDs,u=void 0===s||s,c=r.includeState,f=void 0!==c&&c;return i.length>1||a.length>0||0===a.length&&0===i.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(r){var n=t.payload.channels[r],i=[];return e.channels[r]={occupants:i,name:r,occupancy:n.occupancy},u&&n.uuids.forEach(function(e){f?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e}():function(){var e={},r=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:r,name:i[0],occupancy:t.occupancy},u&&t.uuids.forEach(function(e){f?r.push({state:e.state,uuid:e.uuid}):r.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(){return l.default.PNAccessManagerAudit}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var r=t.channel,n=t.channelGroup,i=t.authKeys,o=void 0===i?[]:i,a={};return r&&(a.channel=r),n&&(a["channel-group"]=n),o.length>0&&(a.auth=o.join(",")),a}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(){return l.default.PNAccessManagerGrant}function i(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function o(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var r=t.channels,n=void 0===r?[]:r,i=t.channelGroups,o=void 0===i?[]:i,a=t.ttl,s=t.read,u=void 0!==s&&s,c=t.write,f=void 0!==c&&c,l=t.manage,h=void 0!==l&&l,d=t.authKeys,p=void 0===d?[]:d,b={};return b.r=u?"1":"0",b.w=f?"1":"0",b.m=h?"1":"0",n.length>0&&(b.channel=n.join(",")),o.length>0&&(b["channel-group"]=o.join(",")),p.length>0&&(b.auth=p.join(",")),(a||0===a)&&(b.ttl=a),b}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=n,t.validateParams=i,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var f=(r(8),r(22)),l=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.crypto,n=e.config,i=JSON.stringify(t);return n.cipherKey&&(i=r.encrypt(i),i=JSON.stringify(i)),i}function o(){return y.default.PNPublishOperation}function a(e,t){var r=e.config,n=t.message;return t.channel?n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function s(e,t){var r=t.sendByPost;return void 0!==r&&r}function u(e,t){var r=e.config,n=t.channel,o=t.message,a=i(e,o);return"/publish/"+r.publishKey+"/"+r.subscribeKey+"/0/"+_.default.encodeString(n)+"/0/"+_.default.encodeString(a)}function c(e,t){var r=e.config,n=t.channel;return"/publish/"+r.publishKey+"/"+r.subscribeKey+"/0/"+_.default.encodeString(n)+"/0"}function f(e){return e.config.getTransactionTimeout()}function l(){return!0}function h(e,t){return i(e,t.message)}function d(e,t){var r=t.meta,n=t.replicate,i=void 0===n||n,o=t.storeInHistory,a=t.ttl,s={};return null!=o&&(s.store=o?"1":"0"),a&&(s.ttl=a),i===!1&&(s.norep="true"),r&&"object"===(void 0===r?"undefined":b(r))&&(s.meta=JSON.stringify(r)),s}function p(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=o,t.validateParams=a,t.usePost=s,t.getURL=u,t.postURL=c,t.getRequestTimeout=f,t.isAuthSupported=l,t.postPayload=h,t.prepareParams=d,t.handleResponse=p;var v=(r(8),r(22)),y=n(v),g=r(23),_=n(g)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.config,n=e.crypto;if(!r.cipherKey)return t;try{return n.decrypt(t)}catch(e){return t}}function o(){return d.default.PNHistoryOperation}function a(e,t){var r=t.channel,n=e.config;return r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function s(e,t){var r=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+b.default.encodeString(r)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function f(e,t){var r=t.start,n=t.end,i=t.reverse,o=t.count,a=void 0===o?100:o,s=t.stringifiedTimeToken,u=void 0!==s&&s,c={include_token:"true"};return c.count=a,r&&(c.start=r),n&&(c.end=n),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function l(e,t){var r={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var n={timetoken:t.timetoken,entry:i(e,t.message)};r.messages.push(n)}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=f,t.handleResponse=l;var h=(r(8),r(22)),d=n(h),p=r(23),b=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.config,n=e.crypto;if(!r.cipherKey)return t;try{return n.decrypt(t)}catch(e){return t}}function o(){return d.default.PNFetchMessagesOperation}function a(e,t){var r=t.channels,n=e.config;return r&&0!==r.length?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function s(e,t){var r=t.channels,n=void 0===r?[]:r,i=e.config,o=n.length>0?n.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+b.default.encodeString(o)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function f(e,t){var r=t.start,n=t.end,i=t.count,o={};return i&&(o.max=i),r&&(o.start=r),n&&(o.end=n),o}function l(e,t){var r={channels:{}};return Object.keys(t.channels||{}).forEach(function(n){r.channels[n]=[],(t.channels[n]||[]).forEach(function(t){var o={};o.channel=n,o.subscription=null,o.timetoken=t.timetoken,o.message=i(e,t.message),r.channels[n].push(o)})}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=f,t.handleResponse=l;var h=(r(8),r(22)),d=n(h),p=r(23),b=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return h.default.PNSubscribeOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var r=e.config,n=t.channels,i=void 0===n?[]:n,o=i.length>0?i.join(","):",";return"/v2/subscribe/"+r.subscribeKey+"/"+p.default.encodeString(o)+"/0"}function s(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var r=e.config,n=t.channelGroups,i=void 0===n?[]:n,o=t.timetoken,a=t.filterExpression,s=t.region,u={heartbeat:r.getPresenceTimeout()};return i.length>0&&(u["channel-group"]=i.join(",")),a&&a.length>0&&(u["filter-expr"]=a),o&&(u.tt=o),s&&(u.tr=s),u}function f(e,t){var r=[];return t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},n={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:t};r.push(n)}),{messages:r,metadata:{timetoken:t.t.t,region:t.t.r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=f;var l=(r(8),r(22)),h=n(l),d=r(23),p=n(d)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return!(!navigator||!navigator.sendBeacon)&&void navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(11),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{sendBeaconModule:a}))}return o(t,e),t}(u.default);t.default=c,e.exports=t.default}])})},{}],439:[function(e,t,r){(function(e){!function(n){function i(e){throw new RangeError(I[e])}function o(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function a(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(R,"."),n+o(e.split("."),t).join(".")}function s(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=B(e>>>10&1023|55296),e=56320|1023&e),t+=B(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?D(e/j):e>>1,e+=D(e/t);e>P*k>>1;n+=x)e=D(e/P);return D(n+(P+1)*e/(e+E))}function h(e){var t,r,n,o,a,s,f,h,d,p,b=[],v=e.length,y=0,g=M,_=A;for(r=e.lastIndexOf(C),r<0&&(r=0),n=0;n=128&&i("not-basic"),b.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=v&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=x||h>D((w-y)/s))&&i("overflow"),y+=h*s,d=f<=_?S:f>=_+k?k:f-_,!(hD(w/p)&&i("overflow"),s*=p;t=b.length+1,_=l(y-a,t,0==a),D(y/t)>w-g&&i("overflow"),g+=D(y/t),y%=t,b.splice(y++,0,g)}return u(b)}function d(e){var t,r,n,o,a,u,c,h,d,p,b,v,y,g,_,m=[];for(e=s(e),v=e.length,t=M,r=0,a=A,u=0;u=t&&bD((w-r)/y)&&i("overflow"),r+=(c-t)*y,t=c,u=0;uw&&i("overflow"),b==t){for(h=r,d=x;p=d<=a?S:d>=a+k?k:d-a,!(h= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=x-S,D=Math.floor,B=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:s,encode:u},decode:h,encode:d,toASCII:b,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return _});else if(v&&y)if(t.exports==v)y.exports=_;else for(m in _)_.hasOwnProperty(m)&&(v[m]=_[m]);else n.punycode=_}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],440:[function(e,t,r){"use strict";var n=String.prototype.replace;t.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,/%20/g,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],441:[function(e,t,r){"use strict";var n=e("./stringify"),i=e("./parse"),o=e("./formats");t.exports={formats:o,parse:i,stringify:n}},{"./formats":440,"./parse":442,"./stringify":443}],442:[function(e,t,r){"use strict";var n=e("./utils"),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),o=0;o=0&&r.parseArrays&&a<=r.arrayLimit?(n=[],n[a]=s(e,t,r)):n[o]=s(e,t,r)}return n},u=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(n),c=u?n.slice(0,u.index):n,f=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var l=0;null!==(u=a.exec(n))&&l=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var o=[],a=0;a0&&u>s&&(u=s);for(var c=0;c=0?(f=p.substr(0,b),l=p.substr(b+1)):(f=p,l=""),h=decodeURIComponent(f),d=decodeURIComponent(l),n(a,h)?i(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],446:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var o=new r.Uint8Array(t);t>0&&a.getRandomValues(o);var s=new n(o.buffer);return"function"==typeof i?e.nextTick(function(){i(null,s)}):s}var a=r.crypto||r.msCrypto;a&&a.getRandomValues?t.exports=o:t.exports=i}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:428,buffer:67}],449:[function(e,t,r){t.exports=e("./lib/randomstring")},{"./lib/randomstring":451}],450:[function(e,t,r){function n(){this.chars=""}var i=e("array-uniq");n.prototype.setType=function(e){var t,r="abcdefghijklmnopqrstuvwxyz",n=r.toUpperCase();t="alphanumeric"===e?"0123456789"+r+n:"numeric"===e?"0123456789":"alphabetic"===e?r+n:"hex"===e?"0123456789abcdef":e,this.chars=t},n.prototype.removeUnreadable=function(){this.chars=this.chars.replace(/[0OIl]/g,"")},n.prototype.setcapitalization=function(e){"uppercase"===e?this.chars=this.chars.toUpperCase():"lowercase"===e&&(this.chars=this.chars.toLowerCase())},n.prototype.removeDuplicates=function(){var e=this.chars.split("");e=i(e),this.chars=e.join("")},t.exports=n},{"array-uniq":452}],451:[function(e,t,r){"use strict";function n(e){for(;;)try{return i.randomBytes(e)}catch(e){continue}}var i=e("crypto"),o=e("./charset.js");r.generate=function(e){var t,r=new o,i="";"object"==typeof e?(t=e.length||32,e.charset?r.setType(e.charset):r.setType("alphanumeric"),e.capitalization&&r.setcapitalization(e.capitalization),e.readable&&r.removeUnreadable(),r.removeDuplicates()):"number"==typeof e?(t=e,r.setType("alphanumeric")):(t=32,r.setType("alphanumeric"));for(var a=r.chars.length,s=256-256%a;t>0;)for(var u=n(Math.ceil(256*t/s)),c=0;c0;c++){var f=u.readUInt8(c);f0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),p(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=z?e=z:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function f(e,t){var r=null;return P.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(d,e):d(e))}function d(e){L("emit readable"),e.emit("readable"),m(e)}function p(e,t){t.readingMore||(t.readingMore=!0,O(b,e,t))}function b(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=x(e,t.buffer,t.decoder),r}function x(e,t,r){var n;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}function k(e,t){var r=D.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(j,t,e))}function j(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):h(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&E(this),null;var n=t.needReadable;L("need readable",n),(0===t.length||t.length-e0?w(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,t){function i(e){L("onunpipe"),e===h&&a()}function o(){L("onend"),e.end()}function a(){L("cleanup"),e.removeListener("close",c),e.removeListener("finish",f),e.removeListener("drain",y),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",o),h.removeListener("end",a),h.removeListener("data",s),g=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function s(t){L("ondata"),_=!1,!1!==e.write(t)||_||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&M(d.pipes,e)!==-1)&&!g&&(L("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,_=!0),h.pause())}function u(t){L("onerror",t),l(),e.removeListener("error",u),0===I(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",f),l()}function f(){L("onfinish"),e.removeListener("close",c),l()}function l(){L("unpipe"),h.unpipe(e)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,L("pipe count=%d opts=%j",d.pipesCount,t);var p=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,b=p?o:a;d.endEmitted?O(b):h.once("end",b),e.on("unpipe",i);var y=v(h);e.on("drain",y);var g=!1,_=!1;return h.on("data",s),n(e,"error",u),e.once("close",c),e.once("finish",f),e.emit("pipe",h),d.flowing||(L("pipe resume"),h.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?setImmediate:k;a.WritableState=o;var j=e("core-util-is");j.inherits=e("inherits");var A,M={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(e){}finally{A||(A=e("events").EventEmitter)}}();var C=e("buffer").Buffer,O=e("buffer-shims");j.inherits(a,A),o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:M.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var T;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!T.call(this,e)||e&&e._writableState instanceof o}})):T=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,r){var i=this._writableState,o=!1,a=C.isBuffer(e);return"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?s(this,r):(a||u(this,i,e,r))&&(i.pendingcb++,o=f(this,i,a,e,t,r)),o},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},a.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},a.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":454,_process:428,buffer:67,"buffer-shims":65,"core-util-is":69,events:152,inherits:164,"process-nextick-args":427,"util-deprecate":497}],459:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:67,"buffer-shims":65}],460:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],461:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":455}],462:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":454,"./lib/_stream_passthrough.js":455,"./lib/_stream_readable.js":456,"./lib/_stream_transform.js":457,"./lib/_stream_writable.js":458,_process:428}],463:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":457}],464:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":458}],465:[function(e,t,r){var n,i,o,a,s,u,c,f,l;u=e("lodash/flatten"),a=e("lodash/assign"),i=e("bluebird"),n=e("events").EventEmitter,f=e("./pubnub"),l=e("./utils"),s=l.extractMessages,c=l.getChannels,o="PNNetworkIssuesCategory",r.subscribe=function(e,t){var r,i,a,u,l,h,d,p;return p=c(t),r=p.channel,i=p.clearChannel,l=f.getInstance(e),u=new n,a=function(e,t){return u.emit(e,t)},h=function(e){return e.channel===i?a("clear"):e.channel===r?s(e.message).forEach(function(e){return a("line",e)}):void 0},d={message:h,status:function(e){if(e.category===o)return a("error",o)}},l.addListener(d),l.subscribe({channels:[r,i]}),u.unsubscribe=function(){return l.removeListener(d),l.unsubscribe({channels:[r,i]})},u},r.history=function(e,t,r){return i.try(function(){var n,i;return i=f.getInstance(e),n=c(t).channel,f.history(i,n,r)}).map(s).then(u)},r.historySinceLastClear=function(e,t,n){return r.getLastClearTime(e,t).then(function(i){return n=a({count:200},n,{end:i}),r.history(e,t,n)})},r.clear=function(e,t){return i.try(function(){var r,n;return n=f.getInstance(e),r=c(t).clearChannel,n.time().then(function(e){var t;return t=e.timetoken,n.publish({channel:r,message:t})})})},r.getLastClearTime=function(e,t){return i.try(function(){var r,n;return n=f.getInstance(e),r=c(t).clearChannel,f.history(n,r,{count:1}).then(function(e){return(null!=e?e[0]:void 0)||0})})}},{"./pubnub":466,"./utils":467,bluebird:37,events:152,"lodash/assign":334,"lodash/flatten":345}], +466:[function(e,t,r){var n,i,o,a,s;i=e("lodash/assign"),s=e("lodash/memoize"),e("bluebird"),n=e("pubnub"),o=function(e){return e.publishKey||e.publish_key},a=function(e){return e.subscribeKey||e.subscribe_key},r.getInstance=s(function(e){return new n({publishKey:o(e),subscribeKey:a(e),ssl:!0})},a),r.history=function(e,t,r){return null==r&&(r={}),r=i({channel:t},r),e.history(r).then(function(e){var t;return t=e.messages,t.map(function(e){return e.entry})})}},{bluebird:37,"lodash/assign":334,"lodash/memoize":374,pubnub:438}],467:[function(e,t,r){var n,i,o,a;a=e("lodash/isString"),o=e("lodash/isArray"),n=e("lodash/assign"),i=function(e){return e.logs_channel||e.uuid},r.getChannel=function(e,t){return null==t&&(t="logs"),"device-"+i(e)+"-"+t},r.getChannels=function(e){return{channel:r.getChannel(e),clearChannel:r.getChannel(e,"clear-logs")}},r.extractMessages=function(e){return a(e)?[{isSystem:/\[system\]/.test(e),message:e,timestamp:null}]:o(e)?e.map(function(e){var t,r,n;return t=e.m,n=e.t,r=e.s,{message:t,timestamp:n,isSystem:Boolean(r)}}):[n({isSystem:!1,timestamp:null},e)]}},{"lodash/assign":334,"lodash/isArray":353,"lodash/isString":366}],468:[function(e,t,r){var n,i;i=e("lodash/find"),n=2013,r.status={IDLE:"idle",CONFIGURING:"configuring",UPDATING:"updating",OFFLINE:"offline",POST_PROVISIONING:"post-provisioning"},r.statuses=[{key:r.status.IDLE,name:"Idle"},{key:r.status.CONFIGURING,name:"Configuring"},{key:r.status.UPDATING,name:"Updating"},{key:r.status.OFFLINE,name:"Offline"},{key:r.status.POST_PROVISIONING,name:"Post Provisioning"}],r.getStatus=function(e){var t;return"Post-Provisioning"===e.provisioning_state?i(r.statuses,{key:r.status.POST_PROVISIONING}):(t=new Date(e.last_seen_time),!e.is_online&&t.getFullYear()=r.TOKEN_REFRESH_INTERVAL})},r.getAuthorizationHeader=o.method(function(e){if(null!=e)return e.get().then(function(e){if(null!=e)return"Bearer "+e})}),r.getErrorMessageFromResponse=function(e){return e.body?null!=e.body.error?e.body.error.text:e.body:"The request was unsuccessful"},r.isErrorCode=function(e){return e>=400},r.isResponseCompressed=function(e){return"gzip"===e.headers.get("Content-Encoding")},r.getResponseLength=function(e){return{uncompressed:h(e.headers.get("Content-Length"),10)||void 0,compressed:h(e.headers.get("X-Transfer-Length"),10)||void 0}},r.debugRequest=function(e,t){return console.error(s({statusCode:t.statusCode,duration:t.duration},e))},a=["qsParseOptions","qsStringifyOptions","useQuerystring","form","formData","multipart","preambleCRLF","postambleCRLF","jsonReviver","jsonReplacer","auth","oauth","aws","httpSignature","followAllRedirects","maxRedirects","removeRefererHeader","encoding","jar","agent","agentClass","agentOptions","forever","pool","localAddress","proxy","proxyHeaderWhiteList","proxyHeaderExclusiveList","time","har","callback"],d=function(e){var t,r,o,s,u,c,f,l;if(null==e&&(e={}),l=e.url||e.uri,e.baseUrl&&(l=y.resolve(e.baseUrl,l)),e.qs&&(f=p.stringify(e.qs),l+=(l.indexOf("?")>=0?"&":"?")+f),c={},c.timeout=e.timeout,c.retries=e.retries,c.method=e.method,c.compress=e.gzip,t=e.body,r=e.headers,null==r&&(r={}),e.json&&t&&(t=JSON.stringify(t),r["Content-Type"]="application/json"),c.body=t,i||r["Accept-Encoding"]||(r["Accept-Encoding"]="compress, gzip"),e.followRedirect&&(c.redirect="follow"),c.headers=new n(r),e.strictSSL===!1)throw new Error("`strictSSL` must be true or absent");for(o=0,u=a.length;o0?o.catch(function(){return v(e,t,r-1)}):o},r.getRequestAsync=function(e){return null==e&&(e=f),function(t){return v(e,t)}},r.notImplemented=l=function(){throw new Error("The method is not implemented.")},r.onlyIf=function(e){return function(t){return e?t:l}}},{bluebird:37,"fetch-ponyfill":154,"lodash/assign":334,"lodash/includes":351,"lodash/parseInt":379,qs:441,"resin-errors":475,url:495}],475:[function(e,t,r){var n,i={}.hasOwnProperty,o=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};n=e("typed-error"),r.ResinInvalidDeviceType=function(e){function t(e){this.type=e,t.__super__.constructor.call(this,"Invalid device type: "+this.type)}return o(t,e),t.prototype.code="ResinInvalidDeviceType",t.prototype.exitCode=1,t}(n),r.ResinMalformedToken=function(e){function t(e){this.token=e,t.__super__.constructor.call(this,"Malformed token: "+this.token)}return o(t,e),t.prototype.code="ResinMalformedToken",t.prototype.exitCode=1,t}(n),r.ResinExpiredToken=function(e){function t(e){this.token=e,t.__super__.constructor.call(this,"The token expired: "+this.token)}return o(t,e),t.prototype.code="ResinExpiredToken",t.prototype.exitCode=1,t}(n),r.ResinApplicationNotFound=function(e){function t(e){this.application=e,t.__super__.constructor.call(this,"Application not found: "+this.application)}return o(t,e),t.prototype.code="ResinApplicationNotFound",t.prototype.exitCode=1,t}(n),r.ResinBuildNotFound=function(e){function t(e){this.build=e,t.__super__.constructor.call(this,"Build not found: "+this.build)}return o(t,e),t.prototype.code="ResinBuildNotFound",t.prototype.exitCode=1,t}(n),r.ResinDeviceNotFound=function(e){function t(e){this.device=e,t.__super__.constructor.call(this,"Device not found: "+this.device)}return o(t,e),t.prototype.code="ResinDeviceNotFound",t.prototype.exitCode=1,t}(n),r.ResinAmbiguousDevice=function(e){function t(e){this.device=e,t.__super__.constructor.call(this,"Device is ambiguous: "+this.device)}return o(t,e),t.prototype.code="ResinAmbiguousDevice",t.prototype.exitCode=1,t}(n),r.ResinAmbiguousApplication=function(e){function t(e){this.application=e,t.__super__.constructor.call(this,"Application is ambiguous: "+this.application)}return o(t,e),t.prototype.code="ResinAmbiguousApplication",t.prototype.exitCode=1,t}(n),r.ResinKeyNotFound=function(e){function t(e){this.key=e,t.__super__.constructor.call(this,"Key not found: "+this.key)}return o(t,e),t.prototype.code="ResinKeyNotFound",t.prototype.exitCode=1,t}(n),r.ResinRequestError=function(e){function t(e,r,n){this.body=e,this.statusCode=r,this.requestOptions=n,t.__super__.constructor.call(this,"Request error: "+this.body)}return o(t,e),t.prototype.code="ResinRequestError",t.prototype.exitCode=1,t}(n),r.ResinNotLoggedIn=function(e){function t(){t.__super__.constructor.call(this,"You have to log in")}return o(t,e),t.prototype.code="ResinNotLoggedIn",t.prototype.exitCode=1,t}(n),r.ResinInvalidParameterError=function(e){function t(e,r){this.parameterName=e,this.suppliedValue=r,t.__super__.constructor.call(this,"Invalid parameter: "+this.suppliedValue+" is not a valid value for parameter '"+this.parameterName+"'")}return o(t,e),t.prototype.code="ResinInvalidParameterError",t.prototype.exitCode=1,t}(n)},{"typed-error":494}],476:[function(e,t,r){var n,i,o,a;a=function(e){return"resin-"+e},i=function(){var e;return e={},{getItem:function(t){return e.hasOwnProperty(t)?e[t]:null},setItem:function(t,r){e[t]=r},removeItem:function(t){delete e[t]},clear:function(){e={}}}},o=function(e,t){var r,n;try{n=e[t]}catch(e){e,n=!1}if(n){r="__"+Math.round(1e7*Math.random());try{e[t].setItem(r,r),n=e[t].getItem(r)===r,e[t].removeItem(r,r)}catch(e){e,n=!1}}return n},"undefined"!=typeof window&&null!==window?o(window,"localStorage")?t.exports=function(){return{getItem:function(e){return localStorage.getItem(a(e))},setItem:function(e,t){return localStorage.setItem(a(e),t)},removeItem:function(e){return localStorage.removeItem(a(e))},clear:function(){return localStorage.clear()}}}:t.exports=function(){return i()}:(n=e("node-localstorage").LocalStorage,t.exports=function(e){return new n(e,Infinity)})},{"node-localstorage":void 0}],477:[function(e,t,r){var n,i,o,a;n=e("bluebird"),a=e("lodash/isString"),i=e("./local-storage"),o=function(e){var t,r,o,s,u,c,f;return t=null!=(u=(null!=e?e:{}).dataDirectory)?u:null,s=i(t),f=function(e,t){return n.try(function(){return a(t)||(t=JSON.stringify(t)),s.setItem(e,t)})},r=function(e){return n.try(function(){var t;"function"==typeof s._init&&s._init(),t=s.getItem(e)||void 0,/^-?\d+\.?\d*$/.test(t)&&(t=parseFloat(t));try{t=JSON.parse(t)}catch(e){}return t}).catchReturn(void 0)},o=function(e){return r(e).then(function(e){return null!=e})},c=function(e){return n.try(function(){return s.removeItem(e)})},{set:f,get:r,has:o,remove:c}},t.exports=o},{"./local-storage":476,bluebird:37,"lodash/isString":366}],478:[function(e,t,r){var n,i,o,a,s;n=e("bluebird"),s=e("jwt-decode"),e("url"),o=e("resin-errors"),a=e("resin-settings-storage"),i="token",t.exports=function(e){var t,r,u,c,f;return t=null!=(c=(null!=e?e:{}).dataDirectory)?c:null,f=a({dataDirectory:t}),r={},r.isValid=function(e){return r.parse(e).return(!0).catch(o.ResinMalformedToken,function(){return!1})},r.set=function(e){return r.isValid(e).then(function(e){if(!e)throw new Error("The token is invalid")}).then(function(){return r.isExpired(e)}).then(function(t){if(t)throw new Error("The token has expired");return f.set(i,e.trim())})},r.get=function(){return f.get(i)},r.has=function(){return f.has(i)},r.remove=function(){return f.remove(i)},r.parse=function(e){return n.try(function(){return s(e.trim())}).catch(function(){throw new o.ResinMalformedToken(e)})},r.getData=function(){return r.has().then(function(e){if(e)return r.get().then(r.parse)})},r.getProperty=function(e){return r.getData().then(function(t){return null!=t?t[e]:void 0})},u=function(e){return function(){return r.getProperty(e)}},r.getUsername=u("username"),r.getUserId=u("id"),r.getEmail=u("email"),r.getAge=function(){return r.getProperty("iat").then(function(e){if(null!=e)return Date.now()-1e3*e})},r.isExpired=function(e){return r.parse(e).get("exp").then(function(e){return null!=e&&Date.now()>1e3*e})},r}},{bluebird:37,"jwt-decode":169,"resin-errors":479,"resin-settings-storage":477,url:495}],479:[function(e,t,r){arguments[4][470][0].apply(r,arguments)},{dup:470,"typed-error":494}],480:[function(e,t,r){(function(e){function r(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t}function n(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function i(e,t,r){for(var n=0;n<16;n++){var i=r+n,l=t[i];t[i]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var g,_,m,w,x,S,k,E,j,A;S=g=e[0],k=_=e[1],E=m=e[2],j=w=e[3],A=x=e[4];var M;for(n=0;n<80;n+=1)M=g+t[r+h[n]]|0,M+=n<16?o(_,m,w)+v[0]:n<32?a(_,m,w)+v[1]:n<48?s(_,m,w)+v[2]:n<64?u(_,m,w)+v[3]:c(_,m,w)+v[4],M|=0,M=f(M,p[n]),M=M+x|0,g=x,x=w,w=f(m,10),m=_,_=M,M=S+t[r+d[n]]|0,M+=n<16?c(k,E,j)+y[0]:n<32?u(k,E,j)+y[1]:n<48?s(k,E,j)+y[2]:n<64?a(k,E,j)+y[3]:o(k,E,j)+y[4],M|=0,M=f(M,b[n]),M=M+A|0,S=A,A=j,j=f(E,10),E=k,k=M;M=e[1]+m+j|0,e[1]=e[2]+w+A|0,e[2]=e[3]+x+S|0,e[3]=e[4]+g+k|0,e[4]=e[0]+_+E|0,e[0]=M}function o(e,t,r){return e^t^r}function a(e,t,r){return e&t|~e&r}function s(e,t,r){return(e|~t)^r}function u(e,t,r){return e&r|t&~r}function c(e,t,r){return e^(t|~r)}function f(e,t){return e<>>32-t}function l(t){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var a=r(t),s=8*t.length,u=8*t.length;a[s>>>5]|=128<<24-s%32,a[14+(s+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8);for(var c=0;c>>24)|4278255360&(f<<24|f>>>8)}return new e(n(o))}var h=[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],d=[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],p=[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],b=[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],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];t.exports=l}).call(this,e("buffer").Buffer)},{buffer:67}],481:[function(e,t,r){(function(e){function n(e,t){if(e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>$)return null;if(!(t?Z[pe]:Z[le]).test(e))return null;try{return new a(e,t)}catch(e){return null}}function i(e,t){var r=n(e,t);return r?r.version:null}function o(e,t){var r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}function a(e,t){if(e instanceof a){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>$)throw new TypeError("version is longer than "+$+" characters");if(!(this instanceof a))return new a(e,t);W("SemVer",e,t),this.loose=t;var r=e.trim().match(t?Z[pe]:Z[le]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&tt?1:0}function f(e,t){return c(t,e)}function l(e,t){return new a(e,t).major}function h(e,t){return new a(e,t).minor}function d(e,t){return new a(e,t).patch}function p(e,t,r){return new a(e,r).compare(t)}function b(e,t){return p(e,t,!0)}function v(e,t,r){return p(t,e,r)}function y(e,t){return e.sort(function(e,n){return r.compare(e,n,t)})}function g(e,t){return e.sort(function(e,n){return r.rcompare(e,n,t)})}function _(e,t,r){return p(e,t,r)>0}function m(e,t,r){return p(e,t,r)<0}function w(e,t,r){return 0===p(e,t,r)}function x(e,t,r){return 0!==p(e,t,r)}function S(e,t,r){return p(e,t,r)>=0}function k(e,t,r){return p(e,t,r)<=0}function E(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=w(e,r,n);break;case"!=":i=x(e,r,n);break;case">":i=_(e,r,n);break;case">=":i=S(e,r,n);break;case"<":i=m(e,r,n);break;case"<=":i=k(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function j(e,t){if(e instanceof j){if(e.loose===t)return e;e=e.value}if(!(this instanceof j))return new j(e,t);W("comparator",e,t),this.loose=t,this.parse(e),this.semver===Le?this.value="":this.value=this.operator+this.semver.version,W("comp",this)}function A(e,t){if(e instanceof A&&e.loose===t)return e;if(!(this instanceof A))return new A(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function M(e,t){return new A(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function C(e,t){return W("comp",e),e=I(e,t),W("caret",e),e=T(e,t),W("tildes",e),e=D(e,t),W("xrange",e),e=N(e,t),W("stars",e),e}function O(e){return!e||"x"===e.toLowerCase()||"*"===e}function T(e,t){return e.trim().split(/\s+/).map(function(e){return R(e,t)}).join(" ")}function R(e,t){var r=t?Z[Ee]:Z[ke];return e.replace(r,function(t,r,n,i,o){W("tilde",e,t,r,n,i,o);var a;return O(r)?a="":O(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":O(i)?a=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(W("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),a=">="+r+"."+n+"."+i+o+" <"+r+"."+(+n+1)+".0"):a=">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0",W("tilde return",a),a})}function I(e,t){return e.trim().split(/\s+/).map(function(e){return P(e,t)}).join(" ")}function P(e,t){W("caret",e,t);var r=t?Z[Ce]:Z[Me];return e.replace(r,function(t,r,n,i,o){W("caret",e,t,r,n,i,o);var a;return O(r)?a="":O(n)?a=">="+r+".0.0 <"+(+r+1)+".0.0":O(i)?a="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(W("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),a="0"===r?"0"===n?">="+r+"."+n+"."+i+o+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+o+" <"+(+r+1)+".0.0"):(W("no pr"),a="0"===r?"0"===n?">="+r+"."+n+"."+i+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+" <"+(+r+1)+".0.0"),W("caret return",a),a})}function D(e,t){return W("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return B(e,t)}).join(" ")}function B(e,t){e=e.trim();var r=t?Z[we]:Z[me];return e.replace(r,function(t,r,n,i,o,a){W("xRange",e,t,r,n,i,o,a);var s=O(n),u=s||O(i),c=u||O(o),f=c;return"="===r&&f&&(r=""),s?t=">"===r||"<"===r?"<0.0.0":"*":r&&f?(u&&(i=0),c&&(o=0),">"===r?(r=">=",u?(n=+n+1,i=0,o=0):c&&(i=+i+1,o=0)):"<="===r&&(r="<",u?n=+n+1:i=+i+1),t=r+n+"."+i+"."+o):u?t=">="+n+".0.0 <"+(+n+1)+".0.0":c&&(t=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"),W("xRange return",t),t})}function N(e,t){return W("replaceStars",e,t),e.trim().replace(Z[De],"")}function L(e,t,r,n,i,o,a,s,u,c,f,l,h){return t=O(r)?"":O(n)?">="+r+".0.0":O(i)?">="+r+"."+n+".0":">="+t,s=O(u)?"":O(c)?"<"+(+u+1)+".0.0":O(f)?"<"+u+"."+(+c+1)+".0":l?"<="+u+"."+c+"."+f+"-"+l:"<="+s,(t+" "+s).trim()}function F(e,t){for(var r=0;r0){var n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}function U(e,t,r){try{t=new A(t,r)}catch(e){return!1}return t.test(e)}function z(e,t,r){return e.filter(function(e){return U(e,t,r)}).sort(function(e,t){return v(e,t,r)})[0]||null}function q(e,t,r){return e.filter(function(e){return U(e,t,r)}).sort(function(e,t){return p(e,t,r)})[0]||null}function K(e,t){try{return new A(e,t).range||"*"}catch(e){return null}}function H(e,t,r){return V(e,t,"<",r)}function G(e,t,r){return V(e,t,">",r)}function V(e,t,r,n){e=new a(e,n),t=new A(t,n);var i,o,s,u,c;switch(r){case">":i=_,o=k,s=m,u=">",c=">=";break;case"<":i=m,o=S,s=_,u="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(U(e,t,n))return!1;for(var f=0;f=0.0.0")),h=h||e,d=d||e,i(e.semver,h.semver,n)?h=e:s(e.semver,d.semver,n)&&(d=e)}),h.operator===u||h.operator===c)return!1;if((!d.operator||d.operator===u)&&o(e,d.semver))return!1;if(d.operator===c&&s(e,d.semver))return!1}return!0}function Y(e,t){var r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}r=t.exports=a;var W;W="object"==typeof e&&e.env&&e.env.NODE_DEBUG&&/\bsemver\b/i.test(e.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},r.SEMVER_SPEC_VERSION="2.0.0";var $=256,X=Number.MAX_SAFE_INTEGER||9007199254740991,Z=r.re=[],J=r.src=[],Q=0,ee=Q++;J[ee]="0|[1-9]\\d*";var te=Q++;J[te]="[0-9]+";var re=Q++;J[re]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var ne=Q++;J[ne]="("+J[ee]+")\\.("+J[ee]+")\\.("+J[ee]+")";var ie=Q++;J[ie]="("+J[te]+")\\.("+J[te]+")\\.("+J[te]+")";var oe=Q++;J[oe]="(?:"+J[ee]+"|"+J[re]+")";var ae=Q++;J[ae]="(?:"+J[te]+"|"+J[re]+")";var se=Q++;J[se]="(?:-("+J[oe]+"(?:\\."+J[oe]+")*))";var ue=Q++;J[ue]="(?:-?("+J[ae]+"(?:\\."+J[ae]+")*))";var ce=Q++;J[ce]="[0-9A-Za-z-]+";var fe=Q++;J[fe]="(?:\\+("+J[ce]+"(?:\\."+J[ce]+")*))";var le=Q++,he="v?"+J[ne]+J[se]+"?"+J[fe]+"?";J[le]="^"+he+"$";var de="[v=\\s]*"+J[ie]+J[ue]+"?"+J[fe]+"?",pe=Q++;J[pe]="^"+de+"$";var be=Q++;J[be]="((?:<|>)?=?)";var ve=Q++;J[ve]=J[te]+"|x|X|\\*";var ye=Q++;J[ye]=J[ee]+"|x|X|\\*";var ge=Q++;J[ge]="[v=\\s]*("+J[ye]+")(?:\\.("+J[ye]+")(?:\\.("+J[ye]+")(?:"+J[se]+")?"+J[fe]+"?)?)?";var _e=Q++;J[_e]="[v=\\s]*("+J[ve]+")(?:\\.("+J[ve]+")(?:\\.("+J[ve]+")(?:"+J[ue]+")?"+J[fe]+"?)?)?";var me=Q++;J[me]="^"+J[be]+"\\s*"+J[ge]+"$";var we=Q++;J[we]="^"+J[be]+"\\s*"+J[_e]+"$";var xe=Q++;J[xe]="(?:~>?)";var Se=Q++;J[Se]="(\\s*)"+J[xe]+"\\s+",Z[Se]=new RegExp(J[Se],"g");var ke=Q++;J[ke]="^"+J[xe]+J[ge]+"$";var Ee=Q++;J[Ee]="^"+J[xe]+J[_e]+"$";var je=Q++;J[je]="(?:\\^)";var Ae=Q++;J[Ae]="(\\s*)"+J[je]+"\\s+",Z[Ae]=new RegExp(J[Ae],"g");var Me=Q++;J[Me]="^"+J[je]+J[ge]+"$";var Ce=Q++;J[Ce]="^"+J[je]+J[_e]+"$";var Oe=Q++;J[Oe]="^"+J[be]+"\\s*("+de+")$|^$";var Te=Q++;J[Te]="^"+J[be]+"\\s*("+he+")$|^$";var Re=Q++;J[Re]="(\\s*)"+J[be]+"\\s*("+de+"|"+J[ge]+")",Z[Re]=new RegExp(J[Re],"g");var Ie=Q++;J[Ie]="^\\s*("+J[ge]+")\\s+-\\s+("+J[ge]+")\\s*$";var Pe=Q++;J[Pe]="^\\s*("+J[_e]+")\\s+-\\s+("+J[_e]+")\\s*$";var De=Q++;J[De]="(<|>)?=?\\s*\\*";for(var Be=0;Be=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},r.inc=s,r.diff=u,r.compareIdentifiers=c;var Ne=/^[0-9]+$/;r.rcompareIdentifiers=f,r.major=l,r.minor=h,r.patch=d,r.compare=p,r.compareLoose=b,r.rcompare=v,r.sort=y,r.rsort=g,r.gt=_,r.lt=m,r.eq=w,r.neq=x,r.gte=S,r.lte=k,r.cmp=E,r.Comparator=j;var Le={};j.prototype.parse=function(e){var t=this.loose?Z[Oe]:Z[Te],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new a(r[2],this.loose):this.semver=Le},j.prototype.toString=function(){return this.value},j.prototype.test=function(e){return W("Comparator.test",e,this.loose),this.semver===Le||("string"==typeof e&&(e=new a(e,this.loose)),E(e,this.operator,this.semver,this.loose))},r.Range=A,A.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},A.prototype.toString=function(){return this.range},A.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),W("range",e,t);var r=t?Z[Pe]:Z[Ie];e=e.replace(r,L),W("hyphen replace",e),e=e.replace(Z[Re],"$1$2$3"),W("comparator trim",e,Z[Re]),e=e.replace(Z[Se],"$1~"),e=e.replace(Z[Ae],"$1^"),e=e.split(/\s+/).join(" ");var n=t?Z[Oe]:Z[Te],i=e.split(" ").map(function(e){return C(e,t)}).join(" ").split(/\s+/);return this.loose&&(i=i.filter(function(e){return!!e.match(n)})),i=i.map(function(e){return new j(e,t)})},r.toComparators=M,A.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new a(e,this.loose));for(var t=0;t=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(this,e("buffer").Buffer)},{buffer:67}],483:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":484,"./sha1":485,"./sha224":486,"./sha256":487,"./sha384":488,"./sha512":489}],484:[function(e,t,r){(function(r){function n(){this.init(),this._w=f,u.call(this,64,56)}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function a(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var s=e("inherits"),u=e("./hash"),c=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);s(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,s=0|this._c,u=0|this._d,f=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=i(r)+a(d,n,s,u)+f+t[h]+c[d]|0;f=u,u=s,s=o(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,buffer:67,inherits:164}],485:[function(e,t,r){(function(r){function n(){this.init(),this._w=l,c.call(this,64,56)}function i(e){return e<<1|e>>>31}function o(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function s(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var u=e("inherits"),c=e("./hash"),f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(n,c),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,u=0|this._c,c=0|this._d,l=0|this._e,h=0;h<16;++h)t[h]=e.readInt32BE(4*h);for(;h<80;++h)t[h]=i(t[h-3]^t[h-8]^t[h-14]^t[h-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=o(r)+s(p,n,u,c)+l+t[d]+f[p]|0;l=c,c=u,u=a(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=l+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,buffer:67,inherits:164}],486:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,a.call(this,64,56)}var i=e("inherits"),o=e("./sha256"),a=e("./hash"),s=new Array(64);i(n,o),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var e=new r(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,"./sha256":487,buffer:67,inherits:164}],487:[function(e,t,r){(function(r){function n(){this.init(),this._w=d,l.call(this,64,56)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function a(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function c(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=e("inherits"),l=e("./hash"),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);f(n,l),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,f=0|this._c,l=0|this._d,d=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=c(t[y-2])+t[y-7]+u(t[y-15])+t[y-16]|0;for(var g=0;g<64;++g){var _=v+s(d)+i(d,p,b)+h[g]+t[g]|0,m=a(r)+o(r,n,f)|0;v=b,b=p,p=d,d=l+_|0,l=f,f=n,n=r,r=_+m|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=f+this._c|0,this._d=l+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},n.prototype._hash=function(){var e=new r(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,buffer:67,inherits:164}],488:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,a.call(this,128,112)}var i=e("inherits"),o=e("./sha512"),a=e("./hash"),s=new Array(160);i(n,o),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,"./sha512":489,buffer:67,inherits:164}],489:[function(e,t,r){(function(r){function n(){this.init(),this._w=v,p.call(this,128,112)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function a(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function h(e,t){return e>>>0>>0?1:0}var d=e("inherits"),p=e("./hash"),b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],v=new Array(160);d(n,p),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,d=0|this._ch,p=0|this._dh,v=0|this._eh,y=0|this._fh,g=0|this._gh,_=0|this._hh,m=0|this._al,w=0|this._bl,x=0|this._cl,S=0|this._dl,k=0|this._el,E=0|this._fl,j=0|this._gl,A=0|this._hl,M=0;M<32;M+=2)t[M]=e.readInt32BE(4*M),t[M+1]=e.readInt32BE(4*M+4);for(;M<160;M+=2){var C=t[M-30],O=t[M-30+1],T=u(C,O),R=c(O,C);C=t[M-4],O=t[M-4+1];var I=f(C,O),P=l(O,C),D=t[M-14],B=t[M-14+1],N=t[M-32],L=t[M-32+1],F=R+B|0,U=T+D+h(F,R)|0;F=F+P|0,U=U+I+h(F,P)|0,F=F+L|0,U=U+N+h(F,L)|0,t[M]=U,t[M+1]=F}for(var z=0;z<160;z+=2){U=t[z],F=t[z+1];var q=o(r,n,d),K=o(m,w,x),H=a(r,m),G=a(m,r),V=s(v,k),Y=s(k,v),W=b[z],$=b[z+1],X=i(v,y,g),Z=i(k,E,j),J=A+Y|0,Q=_+V+h(J,A)|0;J=J+Z|0,Q=Q+X+h(J,Z)|0,J=J+$|0,Q=Q+W+h(J,$)|0,J=J+F|0,Q=Q+U+h(J,F)|0;var ee=G+K|0,te=H+q+h(ee,G)|0;_=g,A=j,g=y,j=E,y=v,E=k,k=S+J|0,v=p+Q+h(k,S)|0,p=d,S=x,d=n,x=w,n=r,w=m,m=J+ee|0,r=Q+te+h(m,J)|0}this._al=this._al+m|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+j|0,this._hl=this._hl+A|0,this._ah=this._ah+r+h(this._al,m)|0,this._bh=this._bh+n+h(this._bl,w)|0,this._ch=this._ch+d+h(this._cl,x)|0,this._dh=this._dh+p+h(this._dl,S)|0,this._eh=this._eh+v+h(this._el,k)|0,this._fh=this._fh+y+h(this._fl,E)|0,this._gh=this._gh+g+h(this._gl,j)|0,this._hh=this._hh+_+h(this._hl,A)|0},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":482,buffer:67,inherits:164}],490:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){f||(f=!0,e.end())}function a(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",r),e.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",r),e.on("drain",n),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var f=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},{events:152,inherits:164,"readable-stream/duplex.js":453,"readable-stream/passthrough.js":461,"readable-stream/readable.js":462,"readable-stream/transform.js":463,"readable-stream/writable.js":464}],491:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,u=s.isEncoding||function(e){switch(e&&e.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!0;default:return!1}},c=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:67}],492:[function(e,t,r){"use strict";t.exports=2147483647},{}],493:[function(e,t,r){"use strict";var n=e("es5-ext/number/to-pos-integer"),i=e("./max-timeout");t.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},{"./max-timeout":492,"es5-ext/number/to-pos-integer":120}],494:[function(e,t,r){(function(){var e={}.hasOwnProperty,n=function(t,r){function n(){this.constructor=t}for(var i in r)e.call(r,i)&&(t[i]=r[i]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t};!function(e,n){"function"==typeof define&&define.amd?define(function(){return e.TypedError=n()}):"object"==typeof r?t.exports=n():e.TypedError=n()}(this,function(){return function(e){function t(e){var t;t=e instanceof Error?e:new Error(e),t.name=this.constructor.name,this.name=t.name,this.message=t.message,null!=Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):null!=t.stack&&(this.stack=t.stack)}return n(t,e),t}(Error)})}).call(this)},{}],495:[function(e,t,r){"use strict";function n(){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}function i(e,t,r){if(e&&c.isObject(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=e("punycode"),c=e("./util");r.parse=i,r.resolve=a,r.resolveObject=s,r.format=o,r.Url=n;var f=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),b=["'"].concat(p),v=["%","/","?",";","#"].concat(b),y=["/","?","#"],g={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");n.prototype.parse=function(e,t,r){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n127?"x":O[R];if(!T.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=M.slice(0,S),D=M.slice(S+1),B=O.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);B&&(P.push(B[1]),D.unshift(B[2])),D.length&&(a="/"+D.join(".")+a),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=u.toASCII(this.hostname));var N=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+N,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!g[d])for(var S=0,C=b.length;S0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return r.search=e.search,r.query=e.query,c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var j=S.slice(-1)[0],A=(r.host||e.host||S.length>1)&&("."===j||".."===j)||""===j,M=0,C=S.length;C>=0;C--)j=S[C],"."===j?S.splice(C,1):".."===j?(S.splice(C,1),M++):M&&(S.splice(C,1),M--);if(!w&&!x)for(;M--;M)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var O=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(k){r.hostname=r.host=O?"":S.length?S.shift():"";var E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");E&&(r.auth=E.shift(),r.host=r.hostname=E.shift())}return w=w||r.host&&S.length,w&&!O&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),c.isNull(r.pathname)&&c.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":496,punycode:439,querystring:447}],496:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],497:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],498:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r else Promise.resolve() - deviceSlugPromise = deviceModel().getDeviceSlug(deviceType) - .tap (deviceSlug) -> - if not deviceSlug? + deviceManifestPromise = deviceModel().getManifestBySlug(deviceType) + .tap (deviceManifest) -> + if not deviceManifest? throw new errors.ResinInvalidDeviceType(deviceType) - return Promise.all([ deviceSlugPromise, parentAppPromise ]) - .then ([ deviceSlug, parentApplication ]) -> + return Promise.all([ deviceManifestPromise, parentAppPromise ]) + .then ([ deviceManifest, parentApplication ]) -> + if deviceManifest.state == 'DISCONTINUED' + throw new errors.ResinDiscontinuedDeviceType(deviceType) + extraOptions = if parentApplication application: parentApplication.id else {} @@ -357,7 +360,7 @@ getApplicationModel = (deps, opts) -> body: assign app_name: name - device_type: deviceSlug + device_type: deviceManifest.slug , extraOptions .asCallback(callback) diff --git a/package.json b/package.json index 0627b07f9..2fd569cea 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "promise-memoize": "^1.2.0", "resin-device-logs": "^3.1.0", "resin-device-status": "^1.0.1", - "resin-errors": "^2.9.0", + "resin-errors": "^2.10.0", "resin-pine": "^5.0.2", "resin-register-device": "^4.0.1", "resin-request": "^8.5.0", @@ -73,4 +73,4 @@ "resin-token": "^4.0.0", "semver": "^5.3.0" } -} \ No newline at end of file +} diff --git a/tests/integration/models/application.spec.coffee b/tests/integration/models/application.spec.coffee index c955188b0..fa2dcad05 100644 --- a/tests/integration/models/application.spec.coffee +++ b/tests/integration/models/application.spec.coffee @@ -36,7 +36,7 @@ describe 'Application Model', -> it 'should be able to create a child application', -> resin.models.application.create('FooBar', 'raspberry-pi').then (parentApplication) -> - resin.models.application.create('FooBarChild', 'edge', parentApplication.id) + resin.models.application.create('FooBarChild', 'generic-amd64', parentApplication.id) .then -> resin.models.application.getAll() .then ([ parentApplication, childApplication ]) -> @@ -46,6 +46,10 @@ describe 'Application Model', -> promise = resin.models.application.create('FooBar', 'foobarbaz') m.chai.expect(promise).to.be.rejectedWith('Invalid device type: foobarbaz') + it 'should be rejected if the device type is discontinuted', -> + promise = resin.models.application.create('FooBar', 'edge') + m.chai.expect(promise).to.be.rejectedWith('Discontinued device type: edge') + it 'should be rejected if the name has less than three characters', -> promise = resin.models.application.create('Fo', 'raspberry-pi') m.chai.expect(promise).to.be.rejected