From 149a0362a3728b30d98cbbb2933626db7d747959 Mon Sep 17 00:00:00 2001 From: arolfes Date: Sat, 13 Feb 2021 13:43:46 +0100 Subject: [PATCH] Close #9: adding a threshold parameter step is marked as failure when threshold param is lower then current uploaded failures --- .eslintrc.json | 35 +- README.md | 8 + action.yml | 3 + dist/index.js | 37333 +++++++++++++++++-------------------------- package-lock.json | 6420 ++++---- package.json | 39 +- src/annotations.ts | 14 +- src/constants.ts | 3 +- src/main.ts | 42 +- 9 files changed, 18122 insertions(+), 25775 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8d54013..c27cdf0 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/es6"], + "extends": ["plugin:github/typescript"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 9, @@ -16,13 +16,38 @@ "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/array-type": "error", "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-ignore": "error", + "@typescript-eslint/ban-ts-comment": [ + "error", + { + "ts-expect-error": "allow-with-description", + "ts-ignore": true, + "ts-nocheck": true, + "ts-check": false, + "minimumDescriptionLength": 5 + } + ], "camelcase": "off", "@typescript-eslint/camelcase": "off", - "@typescript-eslint/class-name-casing": "error", + "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"], + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "variable", + "format": ["camelCase", "UPPER_CASE"] + }, +// { +// "selector": "variable", +// "modifiers": ["const"], +// "format": ["UPPER_CASE"] +// }, + { + "selector": "typeParameter", + "format": ["PascalCase"], + "prefix": ["T"] + } + ], "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-explicit-any": "error", @@ -32,7 +57,6 @@ "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-object-literal-type-assertion": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-useless-constructor": "error", @@ -40,7 +64,6 @@ "@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-interface": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "@typescript-eslint/promise-function-async": "error", "@typescript-eslint/require-array-sort-compare": "error", diff --git a/README.md b/README.md index bbf8ab3..a90caeb 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ Optional. Title for the check run to create. Defaults to `SpotBugs Source Code A ### `token` Optional. GitHub API access token. Defaults to `${{ github.token }}`, which is set by `actions/checkout@v2` minimally. +### `threshold` +Optional. Configures the threshold when this job is marked as failed if to many finding. Defaults to `0`. + ## Example usage ```yaml @@ -117,3 +120,8 @@ $ npm test ... ``` + +Before creating the PullRequest make sure you executed all +``` +npm run all +``` diff --git a/action.yml b/action.yml index b251d0b..7b85b2b 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,9 @@ inputs: Also when generating a new PAT, select the least scopes necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) default: ${{ github.token }} + threshold: + description: 'Configures the threshold when this job is marked as failed if to many finding' + default: 0 runs: using: 'node12' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index b456106..87f8516 100644 --- a/dist/index.js +++ b/dist/index.js @@ -106,180 +106,115 @@ module.exports = lastIndexOf; /* 2 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseRest = __webpack_require__(272), - unzip = __webpack_require__(401); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); + +var _dispatchable = +/*#__PURE__*/ +__webpack_require__(968); +var _xfindIndex = +/*#__PURE__*/ +__webpack_require__(305); /** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. + * Returns the index of the first element of the list which matches the + * predicate, or `-1` if no element matches. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. + * Acts as a transducer if a transformer is given in list position. + * + * @func + * @memberOf R + * @since v0.1.1 + * @category List + * @sig (a -> Boolean) -> [a] -> Number + * @param {Function} fn The predicate function used to determine if the element is the + * desired one. + * @param {Array} list The array to consider. + * @return {Number} The index of the element found, or `-1`. + * @see R.transduce * @example * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] + * const xs = [{a: 1}, {a: 2}, {a: 3}]; + * R.findIndex(R.propEq('a', 2))(xs); //=> 1 + * R.findIndex(R.propEq('a', 4))(xs); //=> -1 */ -var zip = baseRest(unzip); - -module.exports = zip; - - -/***/ }), -/* 3 */, -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var once = __webpack_require__(969); -var noop = function() {}; -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; +var findIndex = +/*#__PURE__*/ +_curry2( +/*#__PURE__*/ +_dispatchable([], _xfindIndex, function findIndex(fn, list) { + var idx = 0; + var len = list.length; - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; + while (idx < len) { + if (fn(list[idx])) { + return idx; + } - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; + idx += 1; + } - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; + return -1; +})); - var onerror = function(err) { - callback.call(stream, err); - }; +module.exports = findIndex; - var onclose = function() { - process.nextTick(onclosenexttick); - }; +/***/ }), +/* 3 */ +/***/ (function(__unusedmodule, exports) { - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; +"use strict"; - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } +Object.defineProperty(exports, '__esModule', { value: true }); - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ -module.exports = eos; +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} +function isPlainObject(o) { + var ctor,prot; -/***/ }), -/* 10 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + if (isObject(o) === false) return false; -var baseGetTag = __webpack_require__(51), - isObject = __webpack_require__(988); + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { return false; } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + + // Most likely a plain Object + return true; } -module.exports = isFunction; +exports.isPlainObject = isPlainObject; /***/ }), +/* 4 */, +/* 5 */, +/* 6 */, +/* 7 */, +/* 8 */, +/* 9 */, +/* 10 */, /* 11 */ /***/ (function(module) { @@ -336,7 +271,7 @@ __webpack_require__(738); var slice = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(232); /** * Returns all but the first `n` elements of the given list, string, or * transducer/transformer (or object with a `drop` method). @@ -392,52 +327,7 @@ eval("require")("encoding"); /***/ }), /* 19 */, -/* 20 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const cp = __webpack_require__(129); -const parse = __webpack_require__(568); -const enoent = __webpack_require__(478); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; - - -/***/ }), +/* 20 */, /* 21 */ /***/ (function(module) { @@ -542,7 +432,7 @@ __webpack_require__(78); var defaultTo = /*#__PURE__*/ -__webpack_require__(867); +__webpack_require__(658); var path = /*#__PURE__*/ @@ -580,63 +470,7 @@ module.exports = pathOr; /* 26 */, /* 27 */, /* 28 */, -/* 29 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var _toString = -/*#__PURE__*/ -__webpack_require__(203); -/** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ - - -var toString = -/*#__PURE__*/ -_curry1(function toString(val) { - return _toString(val, []); -}); - -module.exports = toString; - -/***/ }), +/* 29 */, /* 30 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -683,320 +517,77 @@ module.exports = replace; /***/ (function(__unusedmodule, exports) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var Inputs; -(function (Inputs) { - Inputs["Name"] = "name"; - Inputs["Title"] = "title"; - Inputs["Path"] = "path"; - Inputs["Token"] = "token"; -})(Inputs = exports.Inputs || (exports.Inputs = {})); - - -/***/ }), -/* 33 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var ElementType = __webpack_require__(855); -var re_whitespace = /\s+/g; -var NodePrototype = __webpack_require__(555); -var ElementPrototype = __webpack_require__(402); - -function DomHandler(callback, options, elementCB){ - if(typeof callback === "object"){ - elementCB = options; - options = callback; - callback = null; - } else if(typeof options === "function"){ - elementCB = options; - options = defaultOpts; - } - this._callback = callback; - this._options = options || defaultOpts; - this._elementCB = elementCB; - this.dom = []; - this._done = false; - this._tagStack = []; - this._parser = this._parser || null; -} - -//default options -var defaultOpts = { - normalizeWhitespace: false, //Replace all whitespace with single spaces - withStartIndices: false, //Add startIndex properties to nodes - withEndIndices: false, //Add endIndex properties to nodes -}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Inputs = void 0; +var Inputs; +(function (Inputs) { + Inputs["Name"] = "name"; + Inputs["Title"] = "title"; + Inputs["Path"] = "path"; + Inputs["Token"] = "token"; + Inputs["Threshold"] = "0"; +})(Inputs = exports.Inputs || (exports.Inputs = {})); -DomHandler.prototype.onparserinit = function(parser){ - this._parser = parser; -}; -//Resets the handler back to starting state -DomHandler.prototype.onreset = function(){ - DomHandler.call(this, this._callback, this._options, this._elementCB); -}; +/***/ }), +/* 33 */, +/* 34 */ +/***/ (function(module) { -//Signals the handler that parsing is done -DomHandler.prototype.onend = function(){ - if(this._done) return; - this._done = true; - this._parser = null; - this._handleCallback(null); -}; +module.exports = require("https"); -DomHandler.prototype._handleCallback = -DomHandler.prototype.onerror = function(error){ - if(typeof this._callback === "function"){ - this._callback(error, this.dom); - } else { - if(error) throw error; - } -}; +/***/ }), +/* 35 */, +/* 36 */, +/* 37 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -DomHandler.prototype.onclosetag = function(){ - //if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!")); - - var elem = this._tagStack.pop(); +var add = +/*#__PURE__*/ +__webpack_require__(792); +/** + * Increments its argument. + * + * @func + * @memberOf R + * @since v0.9.0 + * @category Math + * @sig Number -> Number + * @param {Number} n + * @return {Number} n + 1 + * @see R.dec + * @example + * + * R.inc(42); //=> 43 + */ - if(this._options.withEndIndices && elem){ - elem.endIndex = this._parser.endIndex; - } - if(this._elementCB) this._elementCB(elem); -}; +var inc = +/*#__PURE__*/ +add(1); +module.exports = inc; -DomHandler.prototype._createDomElement = function(properties){ - if (!this._options.withDomLvl1) return properties; +/***/ }), +/* 38 */, +/* 39 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - var element; - if (properties.type === "tag") { - element = Object.create(ElementPrototype); - } else { - element = Object.create(NodePrototype); - } +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); - for (var key in properties) { - if (properties.hasOwnProperty(key)) { - element[key] = properties[key]; - } - } +var _dispatchable = +/*#__PURE__*/ +__webpack_require__(968); - return element; -}; - -DomHandler.prototype._addDomElement = function(element){ - var parent = this._tagStack[this._tagStack.length - 1]; - var siblings = parent ? parent.children : this.dom; - var previousSibling = siblings[siblings.length - 1]; - - element.next = null; - - if(this._options.withStartIndices){ - element.startIndex = this._parser.startIndex; - } - if(this._options.withEndIndices){ - element.endIndex = this._parser.endIndex; - } - - if(previousSibling){ - element.prev = previousSibling; - previousSibling.next = element; - } else { - element.prev = null; - } - - siblings.push(element); - element.parent = parent || null; -}; - -DomHandler.prototype.onopentag = function(name, attribs){ - var properties = { - type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag, - name: name, - attribs: attribs, - children: [] - }; - - var element = this._createDomElement(properties); - - this._addDomElement(element); - - this._tagStack.push(element); -}; - -DomHandler.prototype.ontext = function(data){ - //the ignoreWhitespace is officially dropped, but for now, - //it's an alias for normalizeWhitespace - var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace; - - var lastTag; - - if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){ - if(normalize){ - lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); - } else { - lastTag.data += data; - } - } else { - if( - this._tagStack.length && - (lastTag = this._tagStack[this._tagStack.length - 1]) && - (lastTag = lastTag.children[lastTag.children.length - 1]) && - lastTag.type === ElementType.Text - ){ - if(normalize){ - lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); - } else { - lastTag.data += data; - } - } else { - if(normalize){ - data = data.replace(re_whitespace, " "); - } - - var element = this._createDomElement({ - data: data, - type: ElementType.Text - }); - - this._addDomElement(element); - } - } -}; - -DomHandler.prototype.oncomment = function(data){ - var lastTag = this._tagStack[this._tagStack.length - 1]; - - if(lastTag && lastTag.type === ElementType.Comment){ - lastTag.data += data; - return; - } - - var properties = { - data: data, - type: ElementType.Comment - }; - - var element = this._createDomElement(properties); - - this._addDomElement(element); - this._tagStack.push(element); -}; - -DomHandler.prototype.oncdatastart = function(){ - var properties = { - children: [{ - data: "", - type: ElementType.Text - }], - type: ElementType.CDATA - }; - - var element = this._createDomElement(properties); - - this._addDomElement(element); - this._tagStack.push(element); -}; - -DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){ - this._tagStack.pop(); -}; - -DomHandler.prototype.onprocessinginstruction = function(name, data){ - var element = this._createDomElement({ - name: name, - data: data, - type: ElementType.Directive - }); - - this._addDomElement(element); -}; - -module.exports = DomHandler; - - -/***/ }), -/* 34 */ -/***/ (function(module) { - -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = strictIndexOf; - - -/***/ }), -/* 35 */, -/* 36 */, -/* 37 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var add = -/*#__PURE__*/ -__webpack_require__(792); -/** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ - - -var inc = -/*#__PURE__*/ -add(1); -module.exports = inc; - -/***/ }), -/* 38 */, -/* 39 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _dispatchable = -/*#__PURE__*/ -__webpack_require__(968); - -var _xtakeWhile = -/*#__PURE__*/ -__webpack_require__(808); +var _xtakeWhile = +/*#__PURE__*/ +__webpack_require__(808); var slice = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(232); /** * Returns a new list containing the first `n` elements of a given list, * passing each value to the supplied predicate function, and terminating when @@ -1046,7 +637,31 @@ _dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, xs) { module.exports = takeWhile; /***/ }), -/* 40 */, +/* 40 */ +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + + if (typeof process === "object" && "version" in process) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + + return ""; +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map + + +/***/ }), /* 41 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -1088,28 +703,7 @@ _curry3(function pathSatisfies(pred, propPath, obj) { module.exports = pathSatisfies; /***/ }), -/* 42 */ -/***/ (function(module) { - -"use strict"; - -module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); - - return promise.then( - val => new Promise(resolve => { - resolve(onFinally()); - }).then(() => val), - err => new Promise(resolve => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); -}; - - -/***/ }), +/* 42 */, /* 43 */ /***/ (function(module) { @@ -1208,5619 +802,1132 @@ module.exports = mathMod; /* 46 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); +var _reduce = +/*#__PURE__*/ +__webpack_require__(870); +/** + * Returns a single item by iterating through the list, successively calling + * the iterator function and passing it an accumulator value and the current + * value from the array, and then passing the result to the next call. + * + * The iterator function receives two values: *(acc, value)*. It may use + * [`R.reduced`](#reduced) to shortcut the iteration. + * + * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function + * is *(value, acc)*. + * + * Note: `R.reduce` does not skip deleted or unassigned indices (sparse + * arrays), unlike the native `Array.prototype.reduce` method. For more details + * on this behavior, see: + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description + * + * Dispatches to the `reduce` method of the third argument, if present. When + * doing so, it is up to the user to handle the [`R.reduced`](#reduced) + * shortcuting, as this is not implemented by `reduce`. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig ((a, b) -> a) -> a -> [b] -> a + * @param {Function} fn The iterator function. Receives two values, the accumulator and the + * current element from the array. + * @param {*} acc The accumulator value. + * @param {Array} list The list to iterate over. + * @return {*} The final, accumulated value. + * @see R.reduced, R.addIndex, R.reduceRight + * @example + * + * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 + * // - -10 + * // / \ / \ + * // - 4 -6 4 + * // / \ / \ + * // - 3 ==> -3 3 + * // / \ / \ + * // - 2 -1 2 + * // / \ / \ + * // 0 1 0 1 + * + * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) + */ -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var reduce = +/*#__PURE__*/ +_curry3(_reduce); -var finished = __webpack_require__(740); +module.exports = reduce; -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); +/***/ }), +/* 47 */ +/***/ (function(__unusedmodule, exports) { -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} +"use strict"; -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); // we defer if data is null - // we can be expecting either 'end' or - // 'error' +Object.defineProperty(exports, '__esModule', { value: true }); - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; } -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} +function isPlainObject(o) { + var ctor,prot; -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, + if (isObject(o) === false) return false; - next: function next() { - var _this = this; + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; - if (error !== null) { - return Promise.reject(error); - } + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } + // Most likely a plain Object + return true; +} - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time +exports.isPlainObject = isPlainObject; - var lastPromise = this[kLastPromise]; - var promise; +/***/ }), +/* 48 */, +/* 49 */ +/***/ (function(module) { - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); +function _forceReduced(x) { + return { + '@@transducer/value': x, + '@@transducer/reduced': true + }; +} - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - - promise = new Promise(this[kHandlePromise]); - } - - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); - -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise - // returned by next() and store the error - - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - - iterator[kError] = err; - return; - } - - var resolve = iterator[kLastResolve]; - - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; - -module.exports = createReadableStreamAsyncIterator; +module.exports = _forceReduced; /***/ }), -/* 47 */, -/* 48 */ -/***/ (function(module, exports) { - -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} +/* 50 */, +/* 51 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 +var _makeFlat = +/*#__PURE__*/ +__webpack_require__(415); +/** + * Returns a new list by pulling every item out of it (and all its sub-arrays) + * and putting them in a new array, depth-first. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig [a] -> [b] + * @param {Array} list The array to consider. + * @return {Array} The flattened list. + * @see R.unnest + * @example + * + * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); + * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + */ -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 +var flatten = +/*#__PURE__*/ +_curry1( +/*#__PURE__*/ +_makeFlat(true)); -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. +module.exports = flatten; -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. +/***/ }), +/* 52 */, +/* 53 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Returns a partial copy of an object omitting the keys specified. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Object + * @sig [String] -> {String: *} -> {String: *} + * @param {Array} names an array of String property names to omit from the new object + * @param {Object} obj The object to copy from + * @return {Object} A new object with properties from `names` not on it. + * @see R.pick + * @example + * + * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} + */ -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } +var omit = +/*#__PURE__*/ +_curry2(function omit(names, obj) { + var result = {}; + var index = {}; + var idx = 0; + var len = names.length; - if (version instanceof SemVer) { - return version + while (idx < len) { + index[names[idx]] = 1; + idx += 1; } - if (typeof version !== 'string') { - return null + for (var prop in obj) { + if (!index.hasOwnProperty(prop)) { + result[prop] = obj[prop]; + } } - if (version.length > MAX_LENGTH) { - return null - } + return result; +}); - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } +module.exports = omit; - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} +/***/ }), +/* 54 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Calls an input function `n` times, returning an array containing the results + * of those function calls. + * + * `fn` is passed one argument: The current value of `n`, which begins at `0` + * and is gradually incremented to `n - 1`. + * + * @func + * @memberOf R + * @since v0.2.3 + * @category List + * @sig (Number -> a) -> Number -> [a] + * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. + * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. + * @return {Array} An array containing the return values of all calls to `fn`. + * @see R.repeat + * @example + * + * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] + * @symb R.times(f, 0) = [] + * @symb R.times(f, 1) = [f(0)] + * @symb R.times(f, 2) = [f(0), f(1)] + */ -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -exports.SemVer = SemVer +var times = +/*#__PURE__*/ +_curry2(function times(fn, n) { + var len = Number(n); + var idx = 0; + var list; -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) + if (len < 0 || isNaN(len)) { + throw new RangeError('n must be a non-negative number'); } - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } + list = new Array(len); - if (!(this instanceof SemVer)) { - return new SemVer(version, options) + while (idx < len) { + list[idx] = fn(idx); + idx += 1; } - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + return list; +}); - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } +module.exports = times; - this.raw = version +/***/ }), +/* 55 */, +/* 56 */, +/* 57 */ +/***/ (function(module) { - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] +function _quote(s) { + var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace + .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); + return '"' + escaped.replace(/"/g, '\\"') + '"'; +} - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } +module.exports = _quote; - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } +/***/ }), +/* 58 */, +/* 59 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } +var _dispatchable = +/*#__PURE__*/ +__webpack_require__(968); - this.build = m[5] ? m[5].split('.') : [] - this.format() -} +var _xdropRepeatsWith = +/*#__PURE__*/ +__webpack_require__(424); -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} +var dropRepeatsWith = +/*#__PURE__*/ +__webpack_require__(919); -SemVer.prototype.toString = function () { - return this.version -} +var equals = +/*#__PURE__*/ +__webpack_require__(701); +/** + * Returns a new list without any consecutively repeating elements. + * [`R.equals`](#equals) is used to determine equality. + * + * Acts as a transducer if a transformer is given in list position. + * + * @func + * @memberOf R + * @since v0.14.0 + * @category List + * @sig [a] -> [a] + * @param {Array} list The array to consider. + * @return {Array} `list` without repeating elements. + * @see R.transduce + * @example + * + * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] + */ -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - return this.compareMain(other) || this.comparePre(other) -} +var dropRepeats = +/*#__PURE__*/ +_curry1( +/*#__PURE__*/ +_dispatchable([], +/*#__PURE__*/ +_xdropRepeatsWith(equals), +/*#__PURE__*/ +dropRepeatsWith(equals))); -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } +module.exports = dropRepeats; - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} +/***/ }), +/* 60 */ +/***/ (function(module) { -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) +module.exports = { + init: function () { + return this.xf['@@transducer/init'](); + }, + result: function (result) { + return this.xf['@@transducer/result'](result); } +}; - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } +/***/ }), +/* 61 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} - - -/***/ }), -/* 49 */ -/***/ (function(module) { - -function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -} - -module.exports = _forceReduced; - -/***/ }), -/* 50 */, -/* 51 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var Symbol = __webpack_require__(498), - getRawTag = __webpack_require__(985), - objectToString = __webpack_require__(602); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - - -/***/ }), -/* 52 */, -/* 53 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ - - -var omit = -/*#__PURE__*/ -_curry2(function omit(names, obj) { - var result = {}; - var index = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - index[names[idx]] = 1; - idx += 1; - } - - for (var prop in obj) { - if (!index.hasOwnProperty(prop)) { - result[prop] = obj[prop]; - } - } - - return result; -}); - -module.exports = omit; - -/***/ }), -/* 54 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ - - -var times = -/*#__PURE__*/ -_curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - - list = new Array(len); - - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - - return list; -}); - -module.exports = times; - -/***/ }), -/* 55 */, -/* 56 */, -/* 57 */ -/***/ (function(module) { - -function _quote(s) { - var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace - .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); - return '"' + escaped.replace(/"/g, '\\"') + '"'; -} - -module.exports = _quote; - -/***/ }), -/* 58 */, -/* 59 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var _dispatchable = -/*#__PURE__*/ -__webpack_require__(968); - -var _xdropRepeatsWith = -/*#__PURE__*/ -__webpack_require__(424); - -var dropRepeatsWith = -/*#__PURE__*/ -__webpack_require__(919); - -var equals = -/*#__PURE__*/ -__webpack_require__(701); -/** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ - - -var dropRepeats = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_dispatchable([], -/*#__PURE__*/ -_xdropRepeatsWith(equals), -/*#__PURE__*/ -dropRepeatsWith(equals))); - -module.exports = dropRepeats; - -/***/ }), -/* 60 */ -/***/ (function(module) { - -module.exports = { - init: function () { - return this.xf['@@transducer/init'](); - }, - result: function (result) { - return this.xf['@@transducer/result'](result); - } -}; - -/***/ }), -/* 61 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = {}; -module.exports.F = -/*#__PURE__*/ -__webpack_require__(913); -module.exports.T = -/*#__PURE__*/ -__webpack_require__(96); -module.exports.__ = -/*#__PURE__*/ -__webpack_require__(21); -module.exports.add = -/*#__PURE__*/ -__webpack_require__(792); -module.exports.addIndex = -/*#__PURE__*/ -__webpack_require__(731); -module.exports.adjust = -/*#__PURE__*/ -__webpack_require__(908); -module.exports.all = -/*#__PURE__*/ -__webpack_require__(320); -module.exports.allPass = -/*#__PURE__*/ -__webpack_require__(133); -module.exports.always = -/*#__PURE__*/ -__webpack_require__(370); -module.exports.and = -/*#__PURE__*/ -__webpack_require__(676); -module.exports.any = -/*#__PURE__*/ -__webpack_require__(137); -module.exports.anyPass = -/*#__PURE__*/ -__webpack_require__(81); -module.exports.ap = -/*#__PURE__*/ -__webpack_require__(641); -module.exports.aperture = -/*#__PURE__*/ -__webpack_require__(898); -module.exports.append = -/*#__PURE__*/ -__webpack_require__(612); -module.exports.apply = -/*#__PURE__*/ -__webpack_require__(422); -module.exports.applySpec = -/*#__PURE__*/ -__webpack_require__(185); -module.exports.applyTo = -/*#__PURE__*/ -__webpack_require__(91); -module.exports.ascend = -/*#__PURE__*/ -__webpack_require__(852); -module.exports.assoc = -/*#__PURE__*/ -__webpack_require__(414); -module.exports.assocPath = -/*#__PURE__*/ -__webpack_require__(194); -module.exports.binary = -/*#__PURE__*/ -__webpack_require__(201); -module.exports.bind = -/*#__PURE__*/ -__webpack_require__(269); -module.exports.both = -/*#__PURE__*/ -__webpack_require__(521); -module.exports.call = -/*#__PURE__*/ -__webpack_require__(132); -module.exports.chain = -/*#__PURE__*/ -__webpack_require__(481); -module.exports.clamp = -/*#__PURE__*/ -__webpack_require__(547); -module.exports.clone = -/*#__PURE__*/ -__webpack_require__(814); -module.exports.comparator = -/*#__PURE__*/ -__webpack_require__(105); -module.exports.complement = -/*#__PURE__*/ -__webpack_require__(541); -module.exports.compose = -/*#__PURE__*/ -__webpack_require__(944); -module.exports.composeK = -/*#__PURE__*/ -__webpack_require__(497); -module.exports.composeP = -/*#__PURE__*/ -__webpack_require__(592); -module.exports.composeWith = -/*#__PURE__*/ -__webpack_require__(138); -module.exports.concat = -/*#__PURE__*/ -__webpack_require__(779); -module.exports.cond = -/*#__PURE__*/ -__webpack_require__(604); -module.exports.construct = -/*#__PURE__*/ -__webpack_require__(361); -module.exports.constructN = -/*#__PURE__*/ -__webpack_require__(768); -module.exports.contains = -/*#__PURE__*/ -__webpack_require__(878); -module.exports.converge = -/*#__PURE__*/ -__webpack_require__(886); -module.exports.countBy = -/*#__PURE__*/ -__webpack_require__(333); -module.exports.curry = -/*#__PURE__*/ -__webpack_require__(447); -module.exports.curryN = -/*#__PURE__*/ -__webpack_require__(535); -module.exports.dec = -/*#__PURE__*/ -__webpack_require__(613); -module.exports.defaultTo = -/*#__PURE__*/ -__webpack_require__(867); -module.exports.descend = -/*#__PURE__*/ -__webpack_require__(618); -module.exports.difference = -/*#__PURE__*/ -__webpack_require__(275); -module.exports.differenceWith = -/*#__PURE__*/ -__webpack_require__(716); -module.exports.dissoc = -/*#__PURE__*/ -__webpack_require__(799); -module.exports.dissocPath = -/*#__PURE__*/ -__webpack_require__(526); -module.exports.divide = -/*#__PURE__*/ -__webpack_require__(921); -module.exports.drop = -/*#__PURE__*/ -__webpack_require__(12); -module.exports.dropLast = -/*#__PURE__*/ -__webpack_require__(365); -module.exports.dropLastWhile = -/*#__PURE__*/ -__webpack_require__(533); -module.exports.dropRepeats = -/*#__PURE__*/ -__webpack_require__(59); -module.exports.dropRepeatsWith = -/*#__PURE__*/ -__webpack_require__(919); -module.exports.dropWhile = -/*#__PURE__*/ -__webpack_require__(531); -module.exports.either = -/*#__PURE__*/ -__webpack_require__(446); -module.exports.empty = -/*#__PURE__*/ -__webpack_require__(235); -module.exports.endsWith = -/*#__PURE__*/ -__webpack_require__(900); -module.exports.eqBy = -/*#__PURE__*/ -__webpack_require__(753); -module.exports.eqProps = -/*#__PURE__*/ -__webpack_require__(558); -module.exports.equals = -/*#__PURE__*/ -__webpack_require__(701); -module.exports.evolve = -/*#__PURE__*/ -__webpack_require__(887); -module.exports.filter = -/*#__PURE__*/ -__webpack_require__(80); -module.exports.find = -/*#__PURE__*/ -__webpack_require__(862); -module.exports.findIndex = -/*#__PURE__*/ -__webpack_require__(978); -module.exports.findLast = -/*#__PURE__*/ -__webpack_require__(485); -module.exports.findLastIndex = -/*#__PURE__*/ -__webpack_require__(593); -module.exports.flatten = -/*#__PURE__*/ -__webpack_require__(777); -module.exports.flip = -/*#__PURE__*/ -__webpack_require__(328); -module.exports.forEach = -/*#__PURE__*/ -__webpack_require__(732); -module.exports.forEachObjIndexed = -/*#__PURE__*/ -__webpack_require__(760); -module.exports.fromPairs = -/*#__PURE__*/ -__webpack_require__(795); -module.exports.groupBy = -/*#__PURE__*/ -__webpack_require__(860); -module.exports.groupWith = -/*#__PURE__*/ -__webpack_require__(165); -module.exports.gt = -/*#__PURE__*/ -__webpack_require__(573); -module.exports.gte = -/*#__PURE__*/ -__webpack_require__(144); -module.exports.has = -/*#__PURE__*/ -__webpack_require__(511); -module.exports.hasIn = -/*#__PURE__*/ -__webpack_require__(189); -module.exports.hasPath = -/*#__PURE__*/ -__webpack_require__(303); -module.exports.head = -/*#__PURE__*/ -__webpack_require__(678); -module.exports.identical = -/*#__PURE__*/ -__webpack_require__(211); -module.exports.identity = -/*#__PURE__*/ -__webpack_require__(534); -module.exports.ifElse = -/*#__PURE__*/ -__webpack_require__(462); -module.exports.inc = -/*#__PURE__*/ -__webpack_require__(37); -module.exports.includes = -/*#__PURE__*/ -__webpack_require__(287); -module.exports.indexBy = -/*#__PURE__*/ -__webpack_require__(500); -module.exports.indexOf = -/*#__PURE__*/ -__webpack_require__(584); -module.exports.init = -/*#__PURE__*/ -__webpack_require__(85); -module.exports.innerJoin = -/*#__PURE__*/ -__webpack_require__(367); -module.exports.insert = -/*#__PURE__*/ -__webpack_require__(718); -module.exports.insertAll = -/*#__PURE__*/ -__webpack_require__(709); -module.exports.intersection = -/*#__PURE__*/ -__webpack_require__(859); -module.exports.intersperse = -/*#__PURE__*/ -__webpack_require__(126); -module.exports.into = -/*#__PURE__*/ -__webpack_require__(889); -module.exports.invert = -/*#__PURE__*/ -__webpack_require__(710); -module.exports.invertObj = -/*#__PURE__*/ -__webpack_require__(746); -module.exports.invoker = -/*#__PURE__*/ -__webpack_require__(691); -module.exports.is = -/*#__PURE__*/ -__webpack_require__(452); -module.exports.isEmpty = -/*#__PURE__*/ -__webpack_require__(346); -module.exports.isNil = -/*#__PURE__*/ -__webpack_require__(317); -module.exports.join = -/*#__PURE__*/ -__webpack_require__(644); -module.exports.juxt = -/*#__PURE__*/ -__webpack_require__(314); -module.exports.keys = -/*#__PURE__*/ -__webpack_require__(89); -module.exports.keysIn = -/*#__PURE__*/ -__webpack_require__(620); -module.exports.last = -/*#__PURE__*/ -__webpack_require__(951); -module.exports.lastIndexOf = -/*#__PURE__*/ -__webpack_require__(1); -module.exports.length = -/*#__PURE__*/ -__webpack_require__(262); -module.exports.lens = -/*#__PURE__*/ -__webpack_require__(596); -module.exports.lensIndex = -/*#__PURE__*/ -__webpack_require__(515); -module.exports.lensPath = -/*#__PURE__*/ -__webpack_require__(605); -module.exports.lensProp = -/*#__PURE__*/ -__webpack_require__(461); -module.exports.lift = -/*#__PURE__*/ -__webpack_require__(127); -module.exports.liftN = -/*#__PURE__*/ -__webpack_require__(748); -module.exports.lt = -/*#__PURE__*/ -__webpack_require__(125); -module.exports.lte = -/*#__PURE__*/ -__webpack_require__(212); -module.exports.map = -/*#__PURE__*/ -__webpack_require__(523); -module.exports.mapAccum = -/*#__PURE__*/ -__webpack_require__(418); -module.exports.mapAccumRight = -/*#__PURE__*/ -__webpack_require__(826); -module.exports.mapObjIndexed = -/*#__PURE__*/ -__webpack_require__(284); -module.exports.match = -/*#__PURE__*/ -__webpack_require__(488); -module.exports.mathMod = -/*#__PURE__*/ -__webpack_require__(45); -module.exports.max = -/*#__PURE__*/ -__webpack_require__(793); -module.exports.maxBy = -/*#__PURE__*/ -__webpack_require__(844); -module.exports.mean = -/*#__PURE__*/ -__webpack_require__(257); -module.exports.median = -/*#__PURE__*/ -__webpack_require__(223); -module.exports.memoizeWith = -/*#__PURE__*/ -__webpack_require__(999); -module.exports.merge = -/*#__PURE__*/ -__webpack_require__(122); -module.exports.mergeAll = -/*#__PURE__*/ -__webpack_require__(841); -module.exports.mergeDeepLeft = -/*#__PURE__*/ -__webpack_require__(734); -module.exports.mergeDeepRight = -/*#__PURE__*/ -__webpack_require__(505); -module.exports.mergeDeepWith = -/*#__PURE__*/ -__webpack_require__(120); -module.exports.mergeDeepWithKey = -/*#__PURE__*/ -__webpack_require__(492); -module.exports.mergeLeft = -/*#__PURE__*/ -__webpack_require__(121); -module.exports.mergeRight = -/*#__PURE__*/ -__webpack_require__(690); -module.exports.mergeWith = -/*#__PURE__*/ -__webpack_require__(927); -module.exports.mergeWithKey = -/*#__PURE__*/ -__webpack_require__(681); -module.exports.min = -/*#__PURE__*/ -__webpack_require__(915); -module.exports.minBy = -/*#__PURE__*/ -__webpack_require__(688); -module.exports.modulo = -/*#__PURE__*/ -__webpack_require__(508); -module.exports.move = -/*#__PURE__*/ -__webpack_require__(610); -module.exports.multiply = -/*#__PURE__*/ -__webpack_require__(880); -module.exports.nAry = -/*#__PURE__*/ -__webpack_require__(425); -module.exports.negate = -/*#__PURE__*/ -__webpack_require__(266); -module.exports.none = -/*#__PURE__*/ -__webpack_require__(868); -module.exports.not = -/*#__PURE__*/ -__webpack_require__(237); -module.exports.nth = -/*#__PURE__*/ -__webpack_require__(653); -module.exports.nthArg = -/*#__PURE__*/ -__webpack_require__(399); -module.exports.o = -/*#__PURE__*/ -__webpack_require__(671); -module.exports.objOf = -/*#__PURE__*/ -__webpack_require__(110); -module.exports.of = -/*#__PURE__*/ -__webpack_require__(986); -module.exports.omit = -/*#__PURE__*/ -__webpack_require__(53); -module.exports.once = -/*#__PURE__*/ -__webpack_require__(295); -module.exports.or = -/*#__PURE__*/ -__webpack_require__(443); -module.exports.otherwise = -/*#__PURE__*/ -__webpack_require__(540); -module.exports.over = -/*#__PURE__*/ -__webpack_require__(97); -module.exports.pair = -/*#__PURE__*/ -__webpack_require__(77); -module.exports.partial = -/*#__PURE__*/ -__webpack_require__(341); -module.exports.partialRight = -/*#__PURE__*/ -__webpack_require__(771); -module.exports.partition = -/*#__PURE__*/ -__webpack_require__(368); -module.exports.path = -/*#__PURE__*/ -__webpack_require__(756); -module.exports.paths = -/*#__PURE__*/ -__webpack_require__(394); -module.exports.pathEq = -/*#__PURE__*/ -__webpack_require__(449); -module.exports.pathOr = -/*#__PURE__*/ -__webpack_require__(25); -module.exports.pathSatisfies = -/*#__PURE__*/ -__webpack_require__(41); -module.exports.pick = -/*#__PURE__*/ -__webpack_require__(312); -module.exports.pickAll = -/*#__PURE__*/ -__webpack_require__(362); -module.exports.pickBy = -/*#__PURE__*/ -__webpack_require__(648); -module.exports.pipe = -/*#__PURE__*/ -__webpack_require__(918); -module.exports.pipeK = -/*#__PURE__*/ -__webpack_require__(22); -module.exports.pipeP = -/*#__PURE__*/ -__webpack_require__(984); -module.exports.pipeWith = -/*#__PURE__*/ -__webpack_require__(326); -module.exports.pluck = -/*#__PURE__*/ -__webpack_require__(819); -module.exports.prepend = -/*#__PURE__*/ -__webpack_require__(486); -module.exports.product = -/*#__PURE__*/ -__webpack_require__(82); -module.exports.project = -/*#__PURE__*/ -__webpack_require__(376); -module.exports.prop = -/*#__PURE__*/ -__webpack_require__(196); -module.exports.propEq = -/*#__PURE__*/ -__webpack_require__(134); -module.exports.propIs = -/*#__PURE__*/ -__webpack_require__(679); -module.exports.propOr = -/*#__PURE__*/ -__webpack_require__(167); -module.exports.propSatisfies = -/*#__PURE__*/ -__webpack_require__(757); -module.exports.props = -/*#__PURE__*/ -__webpack_require__(162); -module.exports.range = -/*#__PURE__*/ -__webpack_require__(730); -module.exports.reduce = -/*#__PURE__*/ -__webpack_require__(484); -module.exports.reduceBy = -/*#__PURE__*/ -__webpack_require__(729); -module.exports.reduceRight = -/*#__PURE__*/ -__webpack_require__(909); -module.exports.reduceWhile = -/*#__PURE__*/ -__webpack_require__(769); -module.exports.reduced = -/*#__PURE__*/ -__webpack_require__(848); -module.exports.reject = -/*#__PURE__*/ -__webpack_require__(92); -module.exports.remove = -/*#__PURE__*/ -__webpack_require__(453); -module.exports.repeat = -/*#__PURE__*/ -__webpack_require__(258); -module.exports.replace = -/*#__PURE__*/ -__webpack_require__(30); -module.exports.reverse = -/*#__PURE__*/ -__webpack_require__(528); -module.exports.scan = -/*#__PURE__*/ -__webpack_require__(559); -module.exports.sequence = -/*#__PURE__*/ -__webpack_require__(827); -module.exports.set = -/*#__PURE__*/ -__webpack_require__(789); -module.exports.slice = -/*#__PURE__*/ -__webpack_require__(608); -module.exports.sort = -/*#__PURE__*/ -__webpack_require__(595); -module.exports.sortBy = -/*#__PURE__*/ -__webpack_require__(569); -module.exports.sortWith = -/*#__PURE__*/ -__webpack_require__(227); -module.exports.split = -/*#__PURE__*/ -__webpack_require__(628); -module.exports.splitAt = -/*#__PURE__*/ -__webpack_require__(364); -module.exports.splitEvery = -/*#__PURE__*/ -__webpack_require__(408); -module.exports.splitWhen = -/*#__PURE__*/ -__webpack_require__(221); -module.exports.startsWith = -/*#__PURE__*/ -__webpack_require__(996); -module.exports.subtract = -/*#__PURE__*/ -__webpack_require__(743); -module.exports.sum = -/*#__PURE__*/ -__webpack_require__(218); -module.exports.symmetricDifference = -/*#__PURE__*/ -__webpack_require__(90); -module.exports.symmetricDifferenceWith = -/*#__PURE__*/ -__webpack_require__(63); -module.exports.tail = -/*#__PURE__*/ -__webpack_require__(193); -module.exports.take = -/*#__PURE__*/ -__webpack_require__(307); -module.exports.takeLast = -/*#__PURE__*/ -__webpack_require__(173); -module.exports.takeLastWhile = -/*#__PURE__*/ -__webpack_require__(249); -module.exports.takeWhile = -/*#__PURE__*/ -__webpack_require__(39); -module.exports.tap = -/*#__PURE__*/ -__webpack_require__(62); -module.exports.test = -/*#__PURE__*/ -__webpack_require__(140); -module.exports.andThen = -/*#__PURE__*/ -__webpack_require__(598); -module.exports.times = -/*#__PURE__*/ -__webpack_require__(54); -module.exports.toLower = -/*#__PURE__*/ -__webpack_require__(655); -module.exports.toPairs = -/*#__PURE__*/ -__webpack_require__(902); -module.exports.toPairsIn = -/*#__PURE__*/ -__webpack_require__(509); -module.exports.toString = -/*#__PURE__*/ -__webpack_require__(29); -module.exports.toUpper = -/*#__PURE__*/ -__webpack_require__(770); -module.exports.transduce = -/*#__PURE__*/ -__webpack_require__(482); -module.exports.transpose = -/*#__PURE__*/ -__webpack_require__(992); -module.exports.traverse = -/*#__PURE__*/ -__webpack_require__(866); -module.exports.trim = -/*#__PURE__*/ -__webpack_require__(356); -module.exports.tryCatch = -/*#__PURE__*/ -__webpack_require__(549); -module.exports.type = -/*#__PURE__*/ -__webpack_require__(552); -module.exports.unapply = -/*#__PURE__*/ -__webpack_require__(64); -module.exports.unary = -/*#__PURE__*/ -__webpack_require__(715); -module.exports.uncurryN = -/*#__PURE__*/ -__webpack_require__(586); -module.exports.unfold = -/*#__PURE__*/ -__webpack_require__(899); -module.exports.union = -/*#__PURE__*/ -__webpack_require__(410); -module.exports.unionWith = -/*#__PURE__*/ -__webpack_require__(163); -module.exports.uniq = -/*#__PURE__*/ -__webpack_require__(86); -module.exports.uniqBy = -/*#__PURE__*/ -__webpack_require__(703); -module.exports.uniqWith = -/*#__PURE__*/ -__webpack_require__(780); -module.exports.unless = -/*#__PURE__*/ -__webpack_require__(474); -module.exports.unnest = -/*#__PURE__*/ -__webpack_require__(893); -module.exports.until = -/*#__PURE__*/ -__webpack_require__(765); -module.exports.update = -/*#__PURE__*/ -__webpack_require__(881); -module.exports.useWith = -/*#__PURE__*/ -__webpack_require__(467); -module.exports.values = -/*#__PURE__*/ -__webpack_require__(256); -module.exports.valuesIn = -/*#__PURE__*/ -__webpack_require__(670); -module.exports.view = -/*#__PURE__*/ -__webpack_require__(853); -module.exports.when = -/*#__PURE__*/ -__webpack_require__(246); -module.exports.where = -/*#__PURE__*/ -__webpack_require__(113); -module.exports.whereEq = -/*#__PURE__*/ -__webpack_require__(539); -module.exports.without = -/*#__PURE__*/ -__webpack_require__(69); -module.exports.xor = -/*#__PURE__*/ -__webpack_require__(536); -module.exports.xprod = -/*#__PURE__*/ -__webpack_require__(609); -module.exports.zip = -/*#__PURE__*/ -__webpack_require__(630); -module.exports.zipObj = -/*#__PURE__*/ -__webpack_require__(956); -module.exports.zipWith = -/*#__PURE__*/ -__webpack_require__(661); -module.exports.thunkify = -/*#__PURE__*/ -__webpack_require__(254); - -/***/ }), -/* 62 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _dispatchable = -/*#__PURE__*/ -__webpack_require__(968); - -var _xtap = -/*#__PURE__*/ -__webpack_require__(839); -/** - * Runs the given function with the supplied object, then returns the object. - * - * Acts as a transducer if a transformer is given as second parameter. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * const sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ - - -var tap = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xtap, function tap(fn, x) { - fn(x); - return x; -})); - -module.exports = tap; - -/***/ }), -/* 63 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry3 = -/*#__PURE__*/ -__webpack_require__(78); - -var concat = -/*#__PURE__*/ -__webpack_require__(779); - -var differenceWith = -/*#__PURE__*/ -__webpack_require__(716); -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * const eqA = R.eqBy(R.prop('a')); - * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ - - -var symmetricDifferenceWith = -/*#__PURE__*/ -_curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); -}); - -module.exports = symmetricDifferenceWith; - -/***/ }), -/* 64 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); -/** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ - - -var unapply = -/*#__PURE__*/ -_curry1(function unapply(fn) { - return function () { - return fn(Array.prototype.slice.call(arguments, 0)); - }; -}); - -module.exports = unapply; - -/***/ }), -/* 65 */, -/* 66 */ -/***/ (function(module) { - -"use strict"; - - -module.exports = function(tagname, parent, val) { - this.tagname = tagname; - this.parent = parent; - this.child = {}; //child tags - this.attrsMap = {}; //attributes map - this.val = val; //text only - this.addChild = function(child) { - if (Array.isArray(this.child[child.tagname])) { - //already presents - this.child[child.tagname].push(child); - } else { - this.child[child.tagname] = [child]; - } - }; -}; - - -/***/ }), -/* 67 */ -/***/ (function(module) { - -function _isFunction(x) { - var type = Object.prototype.toString.call(x); - return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]'; -} - -module.exports = _isFunction; - -/***/ }), -/* 68 */ -/***/ (function(__unusedmodule, exports) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -async function auth(token) { - const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth"; - return { - type: "token", - token: token, - tokenType - }; -} - -/** - * Prefix token for usage in the Authorization header - * - * @param token OAuth token or JSON Web Token - */ -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - - return `token ${token}`; -} - -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge(route, parameters); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -const createTokenAuth = function createTokenAuth(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - - if (typeof token !== "string") { - throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); - } - - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; - -exports.createTokenAuth = createTokenAuth; -//# sourceMappingURL=index.js.map - - -/***/ }), -/* 69 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _includes = -/*#__PURE__*/ -__webpack_require__(958); - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var flip = -/*#__PURE__*/ -__webpack_require__(328); - -var reject = -/*#__PURE__*/ -__webpack_require__(92); -/** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference, R.remove - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ - - -var without = -/*#__PURE__*/ -_curry2(function (xs, list) { - return reject(flip(_includes)(xs), list); -}); - -module.exports = without; - -/***/ }), -/* 70 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseSetToString = __webpack_require__(292), - shortOut = __webpack_require__(906); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; - - -/***/ }), -/* 71 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(622); -const which = __webpack_require__(142); -const pathKey = __webpack_require__(379)(); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (hasCustomCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - process.chdir(cwd); - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; - - -/***/ }), -/* 72 */, -/* 73 */, -/* 74 */, -/* 75 */, -/* 76 */, -/* 77 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ - - -var pair = -/*#__PURE__*/ -_curry2(function pair(fst, snd) { - return [fst, snd]; -}); - -module.exports = pair; - -/***/ }), -/* 78 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _isPlaceholder = -/*#__PURE__*/ -__webpack_require__(953); -/** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - - -function _curry3(fn) { - return function f3(a, b, c) { - switch (arguments.length) { - case 0: - return f3; - - case 1: - return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { - return fn(a, _b, _c); - }); - - case 2: - return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _curry1(function (_c) { - return fn(a, b, _c); - }); - - default: - return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { - return fn(_a, _b, c); - }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _isPlaceholder(a) ? _curry1(function (_a) { - return fn(_a, b, c); - }) : _isPlaceholder(b) ? _curry1(function (_b) { - return fn(a, _b, c); - }) : _isPlaceholder(c) ? _curry1(function (_c) { - return fn(a, b, _c); - }) : fn(a, b, c); - } - }; -} - -module.exports = _curry3; - -/***/ }), -/* 79 */, -/* 80 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _dispatchable = -/*#__PURE__*/ -__webpack_require__(968); - -var _filter = -/*#__PURE__*/ -__webpack_require__(695); - -var _isObject = -/*#__PURE__*/ -__webpack_require__(662); - -var _reduce = -/*#__PURE__*/ -__webpack_require__(870); - -var _xfilter = -/*#__PURE__*/ -__webpack_require__(959); - -var keys = -/*#__PURE__*/ -__webpack_require__(89); -/** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * const isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - - -var filter = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['filter'], _xfilter, function (pred, filterable) { - return _isObject(filterable) ? _reduce(function (acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - - return acc; - }, {}, keys(filterable)) : // else - _filter(pred, filterable); -})); - -module.exports = filter; - -/***/ }), -/* 81 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var curryN = -/*#__PURE__*/ -__webpack_require__(535); - -var max = -/*#__PURE__*/ -__webpack_require__(793); - -var pluck = -/*#__PURE__*/ -__webpack_require__(819); - -var reduce = -/*#__PURE__*/ -__webpack_require__(484); -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * const isClub = R.propEq('suit', '♣'); - * const isSpade = R.propEq('suit', '♠'); - * const isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ - - -var anyPass = -/*#__PURE__*/ -_curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - - idx += 1; - } - - return false; - }); -}); - -module.exports = anyPass; - -/***/ }), -/* 82 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var multiply = -/*#__PURE__*/ -__webpack_require__(880); - -var reduce = -/*#__PURE__*/ -__webpack_require__(484); -/** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ - - -var product = -/*#__PURE__*/ -reduce(multiply, 1); -module.exports = product; - -/***/ }), -/* 83 */ -/***/ (function(module) { - -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - - -/***/ }), -/* 84 */, -/* 85 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var slice = -/*#__PURE__*/ -__webpack_require__(608); -/** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ - - -var init = -/*#__PURE__*/ -slice(0, -1); -module.exports = init; - -/***/ }), -/* 86 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var identity = -/*#__PURE__*/ -__webpack_require__(534); - -var uniqBy = -/*#__PURE__*/ -__webpack_require__(703); -/** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ - - -var uniq = -/*#__PURE__*/ -uniqBy(identity); -module.exports = uniq; - -/***/ }), -/* 87 */ -/***/ (function(module) { - -module.exports = require("os"); - -/***/ }), -/* 88 */, -/* 89 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var _has = -/*#__PURE__*/ -__webpack_require__(390); - -var _isArguments = -/*#__PURE__*/ -__webpack_require__(960); // cover IE < 9 keys issues - - -var hasEnumBug = ! -/*#__PURE__*/ -{ - toString: null -}.propertyIsEnumerable('toString'); -var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug - -var hasArgsEnumBug = -/*#__PURE__*/ -function () { - 'use strict'; - - return arguments.propertyIsEnumerable('length'); -}(); - -var contains = function contains(list, item) { - var idx = 0; - - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - - idx += 1; - } - - return false; -}; -/** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ - - -var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? -/*#__PURE__*/ -_curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); -}) : -/*#__PURE__*/ -_curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - - var prop, nIdx; - var ks = []; - - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - - nIdx -= 1; - } - } - - return ks; -}); -module.exports = keys; - -/***/ }), -/* 90 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var concat = -/*#__PURE__*/ -__webpack_require__(779); - -var difference = -/*#__PURE__*/ -__webpack_require__(275); -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ - - -var symmetricDifference = -/*#__PURE__*/ -_curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); -}); - -module.exports = symmetricDifference; - -/***/ }), -/* 91 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Takes a value and applies a function to it. - * - * This function is also known as the `thrush` combinator. - * - * @func - * @memberOf R - * @since v0.25.0 - * @category Function - * @sig a -> (a -> b) -> b - * @param {*} x The value - * @param {Function} f The function to apply - * @return {*} The result of applying `f` to `x` - * @example - * - * const t42 = R.applyTo(42); - * t42(R.identity); //=> 42 - * t42(R.add(1)); //=> 43 - */ - - -var applyTo = -/*#__PURE__*/ -_curry2(function applyTo(x, f) { - return f(x); -}); - -module.exports = applyTo; - -/***/ }), -/* 92 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _complement = -/*#__PURE__*/ -__webpack_require__(213); - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var filter = -/*#__PURE__*/ -__webpack_require__(80); -/** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * const isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - - -var reject = -/*#__PURE__*/ -_curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); -}); - -module.exports = reject; - -/***/ }), -/* 93 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = __webpack_require__(622) -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(306) - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - - -/***/ }), -/* 94 */, -/* 95 */, -/* 96 */ -/***/ (function(module) { - -/** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.F - * @example - * - * R.T(); //=> true - */ -var T = function () { - return true; -}; - -module.exports = T; - -/***/ }), -/* 97 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry3 = +module.exports = {}; +module.exports.F = +/*#__PURE__*/ +__webpack_require__(913); +module.exports.T = +/*#__PURE__*/ +__webpack_require__(96); +module.exports.__ = +/*#__PURE__*/ +__webpack_require__(21); +module.exports.add = +/*#__PURE__*/ +__webpack_require__(792); +module.exports.addIndex = +/*#__PURE__*/ +__webpack_require__(731); +module.exports.adjust = +/*#__PURE__*/ +__webpack_require__(908); +module.exports.all = +/*#__PURE__*/ +__webpack_require__(320); +module.exports.allPass = +/*#__PURE__*/ +__webpack_require__(133); +module.exports.always = +/*#__PURE__*/ +__webpack_require__(657); +module.exports.and = +/*#__PURE__*/ +__webpack_require__(676); +module.exports.any = +/*#__PURE__*/ +__webpack_require__(137); +module.exports.anyPass = +/*#__PURE__*/ +__webpack_require__(81); +module.exports.ap = +/*#__PURE__*/ +__webpack_require__(641); +module.exports.aperture = +/*#__PURE__*/ +__webpack_require__(898); +module.exports.append = +/*#__PURE__*/ +__webpack_require__(612); +module.exports.apply = +/*#__PURE__*/ +__webpack_require__(422); +module.exports.applySpec = +/*#__PURE__*/ +__webpack_require__(185); +module.exports.applyTo = +/*#__PURE__*/ +__webpack_require__(91); +module.exports.ascend = +/*#__PURE__*/ +__webpack_require__(852); +module.exports.assoc = +/*#__PURE__*/ +__webpack_require__(414); +module.exports.assocPath = +/*#__PURE__*/ +__webpack_require__(194); +module.exports.binary = +/*#__PURE__*/ +__webpack_require__(790); +module.exports.bind = +/*#__PURE__*/ +__webpack_require__(269); +module.exports.both = +/*#__PURE__*/ +__webpack_require__(521); +module.exports.call = +/*#__PURE__*/ +__webpack_require__(132); +module.exports.chain = +/*#__PURE__*/ +__webpack_require__(481); +module.exports.clamp = +/*#__PURE__*/ +__webpack_require__(547); +module.exports.clone = +/*#__PURE__*/ +__webpack_require__(176); +module.exports.comparator = +/*#__PURE__*/ +__webpack_require__(105); +module.exports.complement = +/*#__PURE__*/ +__webpack_require__(541); +module.exports.compose = +/*#__PURE__*/ +__webpack_require__(944); +module.exports.composeK = +/*#__PURE__*/ +__webpack_require__(497); +module.exports.composeP = +/*#__PURE__*/ +__webpack_require__(592); +module.exports.composeWith = +/*#__PURE__*/ +__webpack_require__(138); +module.exports.concat = +/*#__PURE__*/ +__webpack_require__(779); +module.exports.cond = +/*#__PURE__*/ +__webpack_require__(604); +module.exports.construct = +/*#__PURE__*/ +__webpack_require__(361); +module.exports.constructN = +/*#__PURE__*/ +__webpack_require__(768); +module.exports.contains = +/*#__PURE__*/ +__webpack_require__(878); +module.exports.converge = +/*#__PURE__*/ +__webpack_require__(886); +module.exports.countBy = +/*#__PURE__*/ +__webpack_require__(333); +module.exports.curry = +/*#__PURE__*/ +__webpack_require__(447); +module.exports.curryN = +/*#__PURE__*/ +__webpack_require__(535); +module.exports.dec = +/*#__PURE__*/ +__webpack_require__(613); +module.exports.defaultTo = +/*#__PURE__*/ +__webpack_require__(658); +module.exports.descend = +/*#__PURE__*/ +__webpack_require__(618); +module.exports.difference = +/*#__PURE__*/ +__webpack_require__(275); +module.exports.differenceWith = +/*#__PURE__*/ +__webpack_require__(716); +module.exports.dissoc = +/*#__PURE__*/ +__webpack_require__(799); +module.exports.dissocPath = +/*#__PURE__*/ +__webpack_require__(526); +module.exports.divide = +/*#__PURE__*/ +__webpack_require__(921); +module.exports.drop = +/*#__PURE__*/ +__webpack_require__(12); +module.exports.dropLast = +/*#__PURE__*/ +__webpack_require__(365); +module.exports.dropLastWhile = +/*#__PURE__*/ +__webpack_require__(533); +module.exports.dropRepeats = +/*#__PURE__*/ +__webpack_require__(59); +module.exports.dropRepeatsWith = +/*#__PURE__*/ +__webpack_require__(919); +module.exports.dropWhile = +/*#__PURE__*/ +__webpack_require__(531); +module.exports.either = +/*#__PURE__*/ +__webpack_require__(446); +module.exports.empty = +/*#__PURE__*/ +__webpack_require__(235); +module.exports.endsWith = +/*#__PURE__*/ +__webpack_require__(900); +module.exports.eqBy = +/*#__PURE__*/ +__webpack_require__(912); +module.exports.eqProps = +/*#__PURE__*/ +__webpack_require__(558); +module.exports.equals = +/*#__PURE__*/ +__webpack_require__(701); +module.exports.evolve = +/*#__PURE__*/ +__webpack_require__(887); +module.exports.filter = +/*#__PURE__*/ +__webpack_require__(80); +module.exports.find = +/*#__PURE__*/ +__webpack_require__(862); +module.exports.findIndex = +/*#__PURE__*/ +__webpack_require__(2); +module.exports.findLast = +/*#__PURE__*/ +__webpack_require__(656); +module.exports.findLastIndex = +/*#__PURE__*/ +__webpack_require__(593); +module.exports.flatten = +/*#__PURE__*/ +__webpack_require__(51); +module.exports.flip = +/*#__PURE__*/ +__webpack_require__(328); +module.exports.forEach = +/*#__PURE__*/ +__webpack_require__(962); +module.exports.forEachObjIndexed = +/*#__PURE__*/ +__webpack_require__(294); +module.exports.fromPairs = +/*#__PURE__*/ +__webpack_require__(795); +module.exports.groupBy = +/*#__PURE__*/ +__webpack_require__(860); +module.exports.groupWith = +/*#__PURE__*/ +__webpack_require__(165); +module.exports.gt = +/*#__PURE__*/ +__webpack_require__(573); +module.exports.gte = +/*#__PURE__*/ +__webpack_require__(144); +module.exports.has = +/*#__PURE__*/ +__webpack_require__(511); +module.exports.hasIn = +/*#__PURE__*/ +__webpack_require__(146); +module.exports.hasPath = +/*#__PURE__*/ +__webpack_require__(303); +module.exports.head = +/*#__PURE__*/ +__webpack_require__(678); +module.exports.identical = +/*#__PURE__*/ +__webpack_require__(211); +module.exports.identity = +/*#__PURE__*/ +__webpack_require__(534); +module.exports.ifElse = +/*#__PURE__*/ +__webpack_require__(462); +module.exports.inc = +/*#__PURE__*/ +__webpack_require__(37); +module.exports.includes = +/*#__PURE__*/ +__webpack_require__(287); +module.exports.indexBy = +/*#__PURE__*/ +__webpack_require__(500); +module.exports.indexOf = +/*#__PURE__*/ +__webpack_require__(106); +module.exports.init = +/*#__PURE__*/ +__webpack_require__(85); +module.exports.innerJoin = +/*#__PURE__*/ +__webpack_require__(367); +module.exports.insert = +/*#__PURE__*/ +__webpack_require__(718); +module.exports.insertAll = +/*#__PURE__*/ +__webpack_require__(709); +module.exports.intersection = +/*#__PURE__*/ +__webpack_require__(859); +module.exports.intersperse = +/*#__PURE__*/ +__webpack_require__(126); +module.exports.into = +/*#__PURE__*/ +__webpack_require__(889); +module.exports.invert = +/*#__PURE__*/ +__webpack_require__(710); +module.exports.invertObj = +/*#__PURE__*/ +__webpack_require__(746); +module.exports.invoker = +/*#__PURE__*/ +__webpack_require__(691); +module.exports.is = +/*#__PURE__*/ +__webpack_require__(452); +module.exports.isEmpty = +/*#__PURE__*/ +__webpack_require__(346); +module.exports.isNil = +/*#__PURE__*/ +__webpack_require__(317); +module.exports.join = +/*#__PURE__*/ +__webpack_require__(644); +module.exports.juxt = +/*#__PURE__*/ +__webpack_require__(314); +module.exports.keys = +/*#__PURE__*/ +__webpack_require__(89); +module.exports.keysIn = +/*#__PURE__*/ +__webpack_require__(620); +module.exports.last = +/*#__PURE__*/ +__webpack_require__(951); +module.exports.lastIndexOf = +/*#__PURE__*/ +__webpack_require__(1); +module.exports.length = +/*#__PURE__*/ +__webpack_require__(262); +module.exports.lens = +/*#__PURE__*/ +__webpack_require__(596); +module.exports.lensIndex = +/*#__PURE__*/ +__webpack_require__(515); +module.exports.lensPath = +/*#__PURE__*/ +__webpack_require__(272); +module.exports.lensProp = +/*#__PURE__*/ +__webpack_require__(461); +module.exports.lift = +/*#__PURE__*/ +__webpack_require__(127); +module.exports.liftN = +/*#__PURE__*/ +__webpack_require__(748); +module.exports.lt = +/*#__PURE__*/ +__webpack_require__(125); +module.exports.lte = +/*#__PURE__*/ +__webpack_require__(212); +module.exports.map = +/*#__PURE__*/ +__webpack_require__(523); +module.exports.mapAccum = +/*#__PURE__*/ +__webpack_require__(611); +module.exports.mapAccumRight = +/*#__PURE__*/ +__webpack_require__(826); +module.exports.mapObjIndexed = +/*#__PURE__*/ +__webpack_require__(284); +module.exports.match = +/*#__PURE__*/ +__webpack_require__(488); +module.exports.mathMod = +/*#__PURE__*/ +__webpack_require__(45); +module.exports.max = +/*#__PURE__*/ +__webpack_require__(793); +module.exports.maxBy = +/*#__PURE__*/ +__webpack_require__(844); +module.exports.mean = +/*#__PURE__*/ +__webpack_require__(988); +module.exports.median = +/*#__PURE__*/ +__webpack_require__(223); +module.exports.memoizeWith = +/*#__PURE__*/ +__webpack_require__(999); +module.exports.merge = +/*#__PURE__*/ +__webpack_require__(650); +module.exports.mergeAll = +/*#__PURE__*/ +__webpack_require__(841); +module.exports.mergeDeepLeft = +/*#__PURE__*/ +__webpack_require__(734); +module.exports.mergeDeepRight = +/*#__PURE__*/ +__webpack_require__(505); +module.exports.mergeDeepWith = +/*#__PURE__*/ +__webpack_require__(630); +module.exports.mergeDeepWithKey = +/*#__PURE__*/ +__webpack_require__(492); +module.exports.mergeLeft = +/*#__PURE__*/ +__webpack_require__(121); +module.exports.mergeRight = +/*#__PURE__*/ +__webpack_require__(690); +module.exports.mergeWith = +/*#__PURE__*/ +__webpack_require__(927); +module.exports.mergeWithKey = +/*#__PURE__*/ +__webpack_require__(681); +module.exports.min = +/*#__PURE__*/ +__webpack_require__(915); +module.exports.minBy = /*#__PURE__*/ -__webpack_require__(78); // `Identity` is a functor that holds a single value, where `map` simply -// transforms the held value with the provided function. - - -var Identity = function (x) { - return { - value: x, - map: function (f) { - return Identity(f(x)); - } - }; -}; -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ - - -var over = +__webpack_require__(669); +module.exports.modulo = /*#__PURE__*/ -_curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function (y) { - return Identity(f(y)); - })(x).value; -}); - -module.exports = over; - -/***/ }), -/* 98 */, -/* 99 */, -/* 100 */, -/* 101 */, -/* 102 */, -/* 103 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = __webpack_require__(460); - -/***/ }), -/* 104 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var DomUtils = module.exports; - -[ - __webpack_require__(654), - __webpack_require__(979), - __webpack_require__(128), - __webpack_require__(937), - __webpack_require__(588), - __webpack_require__(214) -].forEach(function(ext){ - Object.keys(ext).forEach(function(key){ - DomUtils[key] = ext[key].bind(DomUtils); - }); -}); - - -/***/ }), -/* 105 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = +__webpack_require__(508); +module.exports.move = +/*#__PURE__*/ +__webpack_require__(610); +module.exports.multiply = +/*#__PURE__*/ +__webpack_require__(880); +module.exports.nAry = +/*#__PURE__*/ +__webpack_require__(425); +module.exports.negate = +/*#__PURE__*/ +__webpack_require__(266); +module.exports.none = +/*#__PURE__*/ +__webpack_require__(86); +module.exports.not = +/*#__PURE__*/ +__webpack_require__(237); +module.exports.nth = +/*#__PURE__*/ +__webpack_require__(653); +module.exports.nthArg = +/*#__PURE__*/ +__webpack_require__(399); +module.exports.o = +/*#__PURE__*/ +__webpack_require__(671); +module.exports.objOf = +/*#__PURE__*/ +__webpack_require__(110); +module.exports.of = +/*#__PURE__*/ +__webpack_require__(986); +module.exports.omit = +/*#__PURE__*/ +__webpack_require__(53); +module.exports.once = +/*#__PURE__*/ +__webpack_require__(295); +module.exports.or = +/*#__PURE__*/ +__webpack_require__(443); +module.exports.otherwise = +/*#__PURE__*/ +__webpack_require__(925); +module.exports.over = +/*#__PURE__*/ +__webpack_require__(97); +module.exports.pair = +/*#__PURE__*/ +__webpack_require__(77); +module.exports.partial = +/*#__PURE__*/ +__webpack_require__(814); +module.exports.partialRight = +/*#__PURE__*/ +__webpack_require__(771); +module.exports.partition = +/*#__PURE__*/ +__webpack_require__(368); +module.exports.path = +/*#__PURE__*/ +__webpack_require__(756); +module.exports.paths = +/*#__PURE__*/ +__webpack_require__(394); +module.exports.pathEq = +/*#__PURE__*/ +__webpack_require__(449); +module.exports.pathOr = +/*#__PURE__*/ +__webpack_require__(25); +module.exports.pathSatisfies = +/*#__PURE__*/ +__webpack_require__(41); +module.exports.pick = +/*#__PURE__*/ +__webpack_require__(312); +module.exports.pickAll = +/*#__PURE__*/ +__webpack_require__(362); +module.exports.pickBy = +/*#__PURE__*/ +__webpack_require__(648); +module.exports.pipe = +/*#__PURE__*/ +__webpack_require__(918); +module.exports.pipeK = +/*#__PURE__*/ +__webpack_require__(22); +module.exports.pipeP = +/*#__PURE__*/ +__webpack_require__(984); +module.exports.pipeWith = +/*#__PURE__*/ +__webpack_require__(326); +module.exports.pluck = +/*#__PURE__*/ +__webpack_require__(819); +module.exports.prepend = +/*#__PURE__*/ +__webpack_require__(773); +module.exports.product = +/*#__PURE__*/ +__webpack_require__(760); +module.exports.project = +/*#__PURE__*/ +__webpack_require__(376); +module.exports.prop = +/*#__PURE__*/ +__webpack_require__(196); +module.exports.propEq = +/*#__PURE__*/ +__webpack_require__(750); +module.exports.propIs = +/*#__PURE__*/ +__webpack_require__(261); +module.exports.propOr = +/*#__PURE__*/ +__webpack_require__(94); +module.exports.propSatisfies = +/*#__PURE__*/ +__webpack_require__(757); +module.exports.props = +/*#__PURE__*/ +__webpack_require__(162); +module.exports.range = +/*#__PURE__*/ +__webpack_require__(730); +module.exports.reduce = +/*#__PURE__*/ +__webpack_require__(46); +module.exports.reduceBy = +/*#__PURE__*/ +__webpack_require__(729); +module.exports.reduceRight = +/*#__PURE__*/ +__webpack_require__(382); +module.exports.reduceWhile = +/*#__PURE__*/ +__webpack_require__(769); +module.exports.reduced = +/*#__PURE__*/ +__webpack_require__(848); +module.exports.reject = +/*#__PURE__*/ +__webpack_require__(92); +module.exports.remove = +/*#__PURE__*/ +__webpack_require__(917); +module.exports.repeat = +/*#__PURE__*/ +__webpack_require__(258); +module.exports.replace = +/*#__PURE__*/ +__webpack_require__(30); +module.exports.reverse = +/*#__PURE__*/ +__webpack_require__(528); +module.exports.scan = +/*#__PURE__*/ +__webpack_require__(559); +module.exports.sequence = +/*#__PURE__*/ +__webpack_require__(827); +module.exports.set = +/*#__PURE__*/ +__webpack_require__(789); +module.exports.slice = +/*#__PURE__*/ +__webpack_require__(232); +module.exports.sort = +/*#__PURE__*/ +__webpack_require__(595); +module.exports.sortBy = +/*#__PURE__*/ +__webpack_require__(569); +module.exports.sortWith = +/*#__PURE__*/ +__webpack_require__(227); +module.exports.split = +/*#__PURE__*/ +__webpack_require__(628); +module.exports.splitAt = +/*#__PURE__*/ +__webpack_require__(364); +module.exports.splitEvery = +/*#__PURE__*/ +__webpack_require__(408); +module.exports.splitWhen = /*#__PURE__*/ -__webpack_require__(721); -/** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * const byAge = R.comparator((a, b) => a.age < b.age); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByIncreasingAge = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - - -var comparator = +__webpack_require__(221); +module.exports.startsWith = /*#__PURE__*/ -_curry1(function comparator(pred) { - return function (a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; -}); - -module.exports = comparator; - -/***/ }), -/* 106 */ -/***/ (function(module) { - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -module.exports = unicodeToArray; - - -/***/ }), -/* 107 */, -/* 108 */ -/***/ (function(module) { - -module.exports = require("net"); - -/***/ }), -/* 109 */, -/* 110 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = +__webpack_require__(996); +module.exports.subtract = /*#__PURE__*/ -__webpack_require__(830); -/** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * const matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ - - -var objOf = +__webpack_require__(743); +module.exports.sum = /*#__PURE__*/ -_curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; -}); - -module.exports = objOf; - -/***/ }), -/* 111 */, -/* 112 */, -/* 113 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = +__webpack_require__(218); +module.exports.symmetricDifference = /*#__PURE__*/ -__webpack_require__(830); - -var _has = +__webpack_require__(90); +module.exports.symmetricDifferenceWith = /*#__PURE__*/ -__webpack_require__(390); -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propSatisfies, R.whereEq - * @example - * - * // pred :: Object -> Boolean - * const pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ - - -var where = +__webpack_require__(63); +module.exports.tail = /*#__PURE__*/ -_curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - - return true; -}); - -module.exports = where; - -/***/ }), -/* 114 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseValues = __webpack_require__(378), - keys = __webpack_require__(863); - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : baseValues(object, keys(object)); -} - -module.exports = values; - - -/***/ }), -/* 115 */, -/* 116 */, -/* 117 */, -/* 118 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__(87); - -const nameMap = new Map([ - [19, 'Catalina'], - [18, 'Mojave'], - [17, 'High Sierra'], - [16, 'Sierra'], - [15, 'El Capitan'], - [14, 'Yosemite'], - [13, 'Mavericks'], - [12, 'Mountain Lion'], - [11, 'Lion'], - [10, 'Snow Leopard'], - [9, 'Leopard'], - [8, 'Tiger'], - [7, 'Panther'], - [6, 'Jaguar'], - [5, 'Puma'] -]); - -const macosRelease = release => { - release = Number((release || os.release()).split('.')[0]); - return { - name: nameMap.get(release), - version: '10.' + (release - 4) - }; -}; - -module.exports = macosRelease; -// TODO: remove this in the next major version -module.exports.default = macosRelease; - - -/***/ }), -/* 119 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = CollectingHandler; - -function CollectingHandler(cbs) { - this._cbs = cbs || {}; - this.events = []; -} - -var EVENTS = __webpack_require__(818).EVENTS; -Object.keys(EVENTS).forEach(function(name) { - if (EVENTS[name] === 0) { - name = "on" + name; - CollectingHandler.prototype[name] = function() { - this.events.push([name]); - if (this._cbs[name]) this._cbs[name](); - }; - } else if (EVENTS[name] === 1) { - name = "on" + name; - CollectingHandler.prototype[name] = function(a) { - this.events.push([name, a]); - if (this._cbs[name]) this._cbs[name](a); - }; - } else if (EVENTS[name] === 2) { - name = "on" + name; - CollectingHandler.prototype[name] = function(a, b) { - this.events.push([name, a, b]); - if (this._cbs[name]) this._cbs[name](a, b); - }; - } else { - throw Error("wrong number of arguments"); - } -}); - -CollectingHandler.prototype.onreset = function() { - this.events = []; - if (this._cbs.onreset) this._cbs.onreset(); -}; - -CollectingHandler.prototype.restart = function() { - if (this._cbs.onreset) this._cbs.onreset(); - - for (var i = 0, len = this.events.length; i < len; i++) { - if (this._cbs[this.events[i][0]]) { - var num = this.events[i].length; - - if (num === 1) { - this._cbs[this.events[i][0]](); - } else if (num === 2) { - this._cbs[this.events[i][0]](this.events[i][1]); - } else { - this._cbs[this.events[i][0]]( - this.events[i][1], - this.events[i][2] - ); - } - } - } -}; - - -/***/ }), -/* 120 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry3 = +__webpack_require__(193); +module.exports.take = +/*#__PURE__*/ +__webpack_require__(498); +module.exports.takeLast = +/*#__PURE__*/ +__webpack_require__(173); +module.exports.takeLastWhile = +/*#__PURE__*/ +__webpack_require__(249); +module.exports.takeWhile = +/*#__PURE__*/ +__webpack_require__(39); +module.exports.tap = +/*#__PURE__*/ +__webpack_require__(62); +module.exports.test = +/*#__PURE__*/ +__webpack_require__(140); +module.exports.andThen = +/*#__PURE__*/ +__webpack_require__(598); +module.exports.times = +/*#__PURE__*/ +__webpack_require__(54); +module.exports.toLower = +/*#__PURE__*/ +__webpack_require__(160); +module.exports.toPairs = /*#__PURE__*/ -__webpack_require__(78); - -var mergeDeepWithKey = +__webpack_require__(902); +module.exports.toPairsIn = /*#__PURE__*/ -__webpack_require__(492); -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ - - -var mergeDeepWith = +__webpack_require__(509); +module.exports.toString = /*#__PURE__*/ -_curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); -}); - -module.exports = mergeDeepWith; - -/***/ }), -/* 121 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _objectAssign = +__webpack_require__(854); +module.exports.toUpper = /*#__PURE__*/ -__webpack_require__(289); - -var _curry2 = +__webpack_require__(770); +module.exports.transduce = /*#__PURE__*/ -__webpack_require__(830); -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const resetToDefault = R.mergeLeft({x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeLeft(a, b) = {...b, ...a} - */ - - -var mergeLeft = +__webpack_require__(482); +module.exports.transpose = /*#__PURE__*/ -_curry2(function mergeLeft(l, r) { - return _objectAssign({}, r, l); -}); - -module.exports = mergeLeft; - -/***/ }), -/* 122 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _objectAssign = +__webpack_require__(992); +module.exports.traverse = /*#__PURE__*/ -__webpack_require__(289); - -var _curry2 = +__webpack_require__(866); +module.exports.trim = /*#__PURE__*/ -__webpack_require__(830); -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @deprecated since v0.26.0 - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.merge({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.merge(a, b) = {...a, ...b} - */ - - -var merge = +__webpack_require__(356); +module.exports.tryCatch = /*#__PURE__*/ -_curry2(function merge(l, r) { - return _objectAssign({}, l, r); -}); - -module.exports = merge; - -/***/ }), -/* 123 */, -/* 124 */, -/* 125 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = +__webpack_require__(219); +module.exports.type = /*#__PURE__*/ -__webpack_require__(830); -/** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ - - -var lt = +__webpack_require__(552); +module.exports.unapply = /*#__PURE__*/ -_curry2(function lt(a, b) { - return a < b; -}); - -module.exports = lt; - -/***/ }), -/* 126 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _checkForMethod = +__webpack_require__(64); +module.exports.unary = /*#__PURE__*/ -__webpack_require__(417); - -var _curry2 = +__webpack_require__(715); +module.exports.uncurryN = /*#__PURE__*/ -__webpack_require__(830); -/** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] - */ - - -var intersperse = +__webpack_require__(586); +module.exports.unfold = /*#__PURE__*/ -_curry2( +__webpack_require__(195); +module.exports.union = /*#__PURE__*/ -_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - - idx += 1; - } - - return out; -})); - -module.exports = intersperse; - -/***/ }), -/* 127 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = +__webpack_require__(410); +module.exports.unionWith = +/*#__PURE__*/ +__webpack_require__(163); +module.exports.uniq = +/*#__PURE__*/ +__webpack_require__(732); +module.exports.uniqBy = +/*#__PURE__*/ +__webpack_require__(703); +module.exports.uniqWith = +/*#__PURE__*/ +__webpack_require__(780); +module.exports.unless = /*#__PURE__*/ -__webpack_require__(721); - -var liftN = +__webpack_require__(474); +module.exports.unnest = /*#__PURE__*/ -__webpack_require__(748); -/** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * const madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ - - -var lift = +__webpack_require__(104); +module.exports.until = /*#__PURE__*/ -_curry1(function lift(fn) { - return liftN(fn.length, fn); -}); - -module.exports = lift; - -/***/ }), -/* 128 */ -/***/ (function(__unusedmodule, exports) { - -exports.removeElement = function(elem){ - if(elem.prev) elem.prev.next = elem.next; - if(elem.next) elem.next.prev = elem.prev; - - if(elem.parent){ - var childs = elem.parent.children; - childs.splice(childs.lastIndexOf(elem), 1); - } -}; - -exports.replaceElement = function(elem, replacement){ - var prev = replacement.prev = elem.prev; - if(prev){ - prev.next = replacement; - } - - var next = replacement.next = elem.next; - if(next){ - next.prev = replacement; - } - - var parent = replacement.parent = elem.parent; - if(parent){ - var childs = parent.children; - childs[childs.lastIndexOf(elem)] = replacement; - } -}; - -exports.appendChild = function(elem, child){ - child.parent = elem; - - if(elem.children.push(child) !== 1){ - var sibling = elem.children[elem.children.length - 2]; - sibling.next = child; - child.prev = sibling; - child.next = null; - } -}; - -exports.append = function(elem, next){ - var parent = elem.parent, - currNext = elem.next; - - next.next = currNext; - next.prev = elem; - elem.next = next; - next.parent = parent; - - if(currNext){ - currNext.prev = next; - if(parent){ - var childs = parent.children; - childs.splice(childs.lastIndexOf(currNext), 0, next); - } - } else if(parent){ - parent.children.push(next); - } -}; - -exports.prepend = function(elem, prev){ - var parent = elem.parent; - if(parent){ - var childs = parent.children; - childs.splice(childs.lastIndexOf(elem), 0, prev); - } - - if(elem.prev){ - elem.prev.next = prev; - } - - prev.parent = parent; - prev.prev = elem.prev; - prev.next = elem; - elem.prev = prev; -}; - - - - -/***/ }), -/* 129 */ -/***/ (function(module) { - -module.exports = require("child_process"); - -/***/ }), -/* 130 */, -/* 131 */, -/* 132 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var curry = +__webpack_require__(765); +module.exports.update = /*#__PURE__*/ -__webpack_require__(447); -/** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * const indentN = R.pipe(R.repeat(' '), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * const format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ - - -var call = +__webpack_require__(881); +module.exports.useWith = /*#__PURE__*/ -curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); -}); -module.exports = call; - -/***/ }), -/* 133 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = +__webpack_require__(467); +module.exports.values = /*#__PURE__*/ -__webpack_require__(721); - -var curryN = +__webpack_require__(256); +module.exports.valuesIn = /*#__PURE__*/ -__webpack_require__(535); - -var max = +__webpack_require__(241); +module.exports.view = /*#__PURE__*/ -__webpack_require__(793); - -var pluck = +__webpack_require__(67); +module.exports.when = /*#__PURE__*/ -__webpack_require__(819); - -var reduce = +__webpack_require__(659); +module.exports.where = /*#__PURE__*/ -__webpack_require__(484); -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * const isQueen = R.propEq('rank', 'Q'); - * const isSpade = R.propEq('suit', '♠︎'); - * const isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ - - -var allPass = +__webpack_require__(113); +module.exports.whereEq = /*#__PURE__*/ -_curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - - idx += 1; - } - - return true; - }); -}); - -module.exports = allPass; - -/***/ }), -/* 134 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry3 = +__webpack_require__(539); +module.exports.without = /*#__PURE__*/ -__webpack_require__(78); - -var equals = +__webpack_require__(69); +module.exports.xor = /*#__PURE__*/ -__webpack_require__(701); -/** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * You can test multiple properties with [`R.whereEq`](#whereEq). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.whereEq, R.propSatisfies, R.equals - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond'}; - * const fred = {name: 'Fred', age: 12, hair: 'brown'}; - * const rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * const alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * const kids = [abby, fred, rusty, alois]; - * const hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ - - -var propEq = +__webpack_require__(536); +module.exports.xprod = /*#__PURE__*/ -_curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); -}); - -module.exports = propEq; +__webpack_require__(609); +module.exports.zip = +/*#__PURE__*/ +__webpack_require__(336); +module.exports.zipObj = +/*#__PURE__*/ +__webpack_require__(956); +module.exports.zipWith = +/*#__PURE__*/ +__webpack_require__(661); +module.exports.thunkify = +/*#__PURE__*/ +__webpack_require__(159); /***/ }), -/* 135 */, -/* 136 */, -/* 137 */ +/* 62 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _curry2 = @@ -6831,6883 +1938,6947 @@ var _dispatchable = /*#__PURE__*/ __webpack_require__(968); -var _xany = +var _xtap = /*#__PURE__*/ -__webpack_require__(876); +__webpack_require__(839); /** - * Returns `true` if at least one of the elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. + * Runs the given function with the supplied object, then returns the object. * - * Acts as a transducer if a transformer is given in list position. + * Acts as a transducer if a transformer is given as second parameter. * * @func * @memberOf R * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce + * @category Function + * @sig (a -> *) -> a -> a + * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. + * @param {*} x + * @return {*} `x`. * @example * - * const lessThan0 = R.flip(R.lt)(0); - * const lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true + * const sayX = x => console.log('x is ' + x); + * R.tap(sayX, 100); //=> 100 + * // logs 'x is 100' + * @symb R.tap(f, a) = a */ -var any = +var tap = /*#__PURE__*/ _curry2( /*#__PURE__*/ -_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - - idx += 1; - } - - return false; +_dispatchable([], _xtap, function tap(fn, x) { + fn(x); + return x; })); -module.exports = any; +module.exports = tap; /***/ }), -/* 138 */ +/* 63 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry2 = +var _curry3 = /*#__PURE__*/ -__webpack_require__(830); +__webpack_require__(78); -var pipeWith = +var concat = /*#__PURE__*/ -__webpack_require__(326); +__webpack_require__(779); -var reverse = +var differenceWith = /*#__PURE__*/ -__webpack_require__(528); +__webpack_require__(716); /** - * Performs right-to-left function composition using transforming function. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. Transforming function is not used on the - * last argument. + * Finds the set (i.e. no duplicates) of all elements contained in the first or + * second list, but not both. Duplication is determined according to the value + * returned by applying the supplied predicate to two list elements. * * @func * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.compose, R.pipeWith + * @since v0.19.0 + * @category Relation + * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] + * @param {Function} pred A predicate used to test whether two items are equal. + * @param {Array} list1 The first list. + * @param {Array} list2 The second list. + * @return {Array} The elements in `list1` or `list2`, but not both. + * @see R.symmetricDifference, R.difference, R.differenceWith * @example * - * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); - * - * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 - * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined - * - * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) + * const eqA = R.eqBy(R.prop('a')); + * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; + * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; + * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] */ -var composeWith = +var symmetricDifferenceWith = /*#__PURE__*/ -_curry2(function composeWith(xf, list) { - return pipeWith.apply(this, [xf, reverse(list)]); +_curry3(function symmetricDifferenceWith(pred, list1, list2) { + return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); }); -module.exports = composeWith; +module.exports = symmetricDifferenceWith; /***/ }), -/* 139 */, -/* 140 */ +/* 64 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _cloneRegExp = -/*#__PURE__*/ -__webpack_require__(480); - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _isRegExp = -/*#__PURE__*/ -__webpack_require__(945); - -var toString = +var _curry1 = /*#__PURE__*/ -__webpack_require__(29); +__webpack_require__(721); /** - * Determines whether a given string matches a given regular expression. + * Takes a function `fn`, which takes a single array argument, and returns a + * function which: + * + * - takes any number of positional arguments; + * - passes these arguments to `fn` as an array; and + * - returns the result. + * + * In other words, `R.unapply` derives a variadic function from a function which + * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). * * @func * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match + * @since v0.8.0 + * @category Function + * @sig ([*...] -> a) -> (*... -> a) + * @param {Function} fn + * @return {Function} + * @see R.apply * @example * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false + * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' + * @symb R.unapply(f)(a, b) = f([a, b]) */ -var test = +var unapply = /*#__PURE__*/ -_curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); - } - - return _cloneRegExp(pattern).test(str); +_curry1(function unapply(fn) { + return function () { + return fn(Array.prototype.slice.call(arguments, 0)); + }; }); -module.exports = test; +module.exports = unapply; /***/ }), -/* 141 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 65 */, +/* 66 */ +/***/ (function(module) { "use strict"; -var net = __webpack_require__(108); -var tls = __webpack_require__(16); -var http = __webpack_require__(363); -var https = __webpack_require__(583); -var events = __webpack_require__(614); -var assert = __webpack_require__(357); -var util = __webpack_require__(669); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - +module.exports = function(tagname, parent, val) { + this.tagname = tagname; + this.parent = parent; + this.child = {}; //child tags + this.attrsMap = {}; //attributes map + this.val = val; //text only + this.addChild = function(child) { + if (Array.isArray(this.child[child.tagname])) { + //already presents + this.child[child.tagname].push(child); + } else { + this.child[child.tagname] = [child]; + } + }; +}; -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} +/***/ }), +/* 67 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); // `Const` is a functor that effectively ignores the function given to `map`. -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} +var Const = function (x) { + return { + value: x, + 'fantasy-land/map': function () { + return this; + } + }; +}; +/** + * Returns a "view" of the given data structure, determined by the given lens. + * The lens's focus determines which portion of the data structure is visible. + * + * @func + * @memberOf R + * @since v0.16.0 + * @category Object + * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s + * @sig Lens s a -> s -> a + * @param {Lens} lens + * @param {*} x + * @return {*} + * @see R.prop, R.lensIndex, R.lensProp + * @example + * + * const xLens = R.lensProp('x'); + * + * R.view(xLens, {x: 1, y: 2}); //=> 1 + * R.view(xLens, {x: 4, y: 2}); //=> 4 + */ -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); +var view = +/*#__PURE__*/ +_curry2(function view(lens, x) { + // Using `Const` effectively ignores the setter function of the `lens`, + // leaving the value returned by the getter function unmodified. + return lens(Const)(x).value; +}); -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); +module.exports = view; - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } +/***/ }), +/* 68 */, +/* 69 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); +var _includes = +/*#__PURE__*/ +__webpack_require__(216); - function onFree() { - self.emit('free', socket, options); - } +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; +var flip = +/*#__PURE__*/ +__webpack_require__(328); -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); +var reject = +/*#__PURE__*/ +__webpack_require__(92); +/** + * Returns a new list without values in the first argument. + * [`R.equals`](#equals) is used to determine equality. + * + * Acts as a transducer if a transformer is given in list position. + * + * @func + * @memberOf R + * @since v0.19.0 + * @category List + * @sig [a] -> [a] -> [a] + * @param {Array} list1 The values to be removed from `list2`. + * @param {Array} list2 The array to remove values from. + * @return {Array} The new array without values in `list1`. + * @see R.transduce, R.difference, R.remove + * @example + * + * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] + */ - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); +var without = +/*#__PURE__*/ +_curry2(function (xs, list) { + return reject(flip(_includes)(xs), list); +}); - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } +module.exports = without; - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } +/***/ }), +/* 70 */, +/* 71 */, +/* 72 */, +/* 73 */, +/* 74 */, +/* 75 */, +/* 76 */, +/* 77 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. + * + * @func + * @memberOf R + * @since v0.18.0 + * @category List + * @sig a -> b -> (a,b) + * @param {*} fst + * @param {*} snd + * @return {Array} + * @see R.objOf, R.of + * @example + * + * R.pair('foo', 'bar'); //=> ['foo', 'bar'] + */ - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - function onError(cause) { - connectReq.removeAllListeners(); +var pair = +/*#__PURE__*/ +_curry2(function pair(fst, snd) { + return [fst, snd]; +}); - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; +module.exports = pair; -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); +/***/ }), +/* 78 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} +var _isPlaceholder = +/*#__PURE__*/ +__webpack_require__(953); +/** + * Optimized internal three-arity curry function. + * + * @private + * @category Function + * @param {Function} fn The function to curry. + * @return {Function} The curried function. + */ -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} +function _curry3(fn) { + return function f3(a, b, c) { + switch (arguments.length) { + case 0: + return f3; -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} + case 1: + return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { + return fn(a, _b, _c); + }); + case 2: + return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { + return fn(_a, b, _c); + }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { + return fn(a, _b, _c); + }) : _curry1(function (_c) { + return fn(a, b, _c); + }); -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); + default: + return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { + return fn(_a, _b, c); + }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { + return fn(_a, b, _c); + }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { + return fn(a, _b, _c); + }) : _isPlaceholder(a) ? _curry1(function (_a) { + return fn(_a, b, c); + }) : _isPlaceholder(b) ? _curry1(function (_b) { + return fn(a, _b, c); + }) : _isPlaceholder(c) ? _curry1(function (_c) { + return fn(a, b, _c); + }) : fn(a, b, c); } - console.error.apply(console, args); - } -} else { - debug = function() {}; + }; } -exports.debug = debug; // for test +module.exports = _curry3; /***/ }), -/* 142 */ +/* 79 */, +/* 80 */ /***/ (function(module, __unusedexports, __webpack_require__) { -module.exports = which -which.sync = whichSync +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' +var _dispatchable = +/*#__PURE__*/ +__webpack_require__(968); -var path = __webpack_require__(622) -var COLON = isWindows ? ';' : ':' -var isexe = __webpack_require__(299) +var _filter = +/*#__PURE__*/ +__webpack_require__(695); -function getNotFoundError (cmd) { - var er = new Error('not found: ' + cmd) - er.code = 'ENOENT' +var _isObject = +/*#__PURE__*/ +__webpack_require__(662); - return er -} +var _reduce = +/*#__PURE__*/ +__webpack_require__(870); -function getPathInfo (cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] +var _xfilter = +/*#__PURE__*/ +__webpack_require__(959); - pathEnv = pathEnv.split(colon) +var keys = +/*#__PURE__*/ +__webpack_require__(89); +/** + * Takes a predicate and a `Filterable`, and returns a new filterable of the + * same type containing the members of the given filterable which satisfy the + * given predicate. Filterable objects include plain objects or any object + * that has a filter method such as `Array`. + * + * Dispatches to the `filter` method of the second argument, if present. + * + * Acts as a transducer if a transformer is given in list position. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig Filterable f => (a -> Boolean) -> f a -> f a + * @param {Function} pred + * @param {Array} filterable + * @return {Array} Filterable + * @see R.reject, R.transduce, R.addIndex + * @example + * + * const isEven = n => n % 2 === 0; + * + * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] + * + * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} + */ - var pathExtExe = '' - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') - pathExt = pathExtExe.split(colon) +var filter = +/*#__PURE__*/ +_curry2( +/*#__PURE__*/ +_dispatchable(['filter'], _xfilter, function (pred, filterable) { + return _isObject(filterable) ? _reduce(function (acc, key) { + if (pred(filterable[key])) { + acc[key] = filterable[key]; + } - // Always test the cmd itself first. isexe will check to make sure - // it's found in the pathExt set. - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } + return acc; + }, {}, keys(filterable)) : // else + _filter(pred, filterable); +})); - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) - pathEnv = [''] +module.exports = filter; - return { - env: pathEnv, - ext: pathExt, - extExe: pathExtExe - } -} +/***/ }), +/* 81 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] +var curryN = +/*#__PURE__*/ +__webpack_require__(535); - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(getNotFoundError(cmd)) - } +var max = +/*#__PURE__*/ +__webpack_require__(793); - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) +var pluck = +/*#__PURE__*/ +__webpack_require__(819); - var p = path.join(pathPart, cmd) - if (!pathPart && (/^\.[\\\/]/).test(cmd)) { - p = cmd.slice(0, 2) + p - } - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} +var reduce = +/*#__PURE__*/ +__webpack_require__(46); +/** + * Takes a list of predicates and returns a predicate that returns true for a + * given list of arguments if at least one of the provided predicates is + * satisfied by those arguments. + * + * The function returned is a curried function whose arity matches that of the + * highest-arity predicate. + * + * @func + * @memberOf R + * @since v0.9.0 + * @category Logic + * @sig [(*... -> Boolean)] -> (*... -> Boolean) + * @param {Array} predicates An array of predicates to check + * @return {Function} The combined predicate + * @see R.allPass + * @example + * + * const isClub = R.propEq('suit', '♣'); + * const isSpade = R.propEq('suit', '♠'); + * const isBlackCard = R.anyPass([isClub, isSpade]); + * + * isBlackCard({rank: '10', suit: '♣'}); //=> true + * isBlackCard({rank: 'Q', suit: '♠'}); //=> true + * isBlackCard({rank: 'Q', suit: '♦'}); //=> false + */ -function whichSync (cmd, opt) { - opt = opt || {} - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] +var anyPass = +/*#__PURE__*/ +_curry1(function anyPass(preds) { + return curryN(reduce(max, 0, pluck('length', preds)), function () { + var idx = 0; + var len = preds.length; - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) + while (idx < len) { + if (preds[idx].apply(this, arguments)) { + return true; + } - var p = path.join(pathPart, cmd) - if (!pathPart && /^\.[\\\/]/.test(cmd)) { - p = cmd.slice(0, 2) + p - } - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var is - try { - is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} + idx += 1; } - } - if (opt.all && found.length) - return found + return false; + }); +}); + +module.exports = anyPass; - if (opt.nothrow) - return null +/***/ }), +/* 82 */ +/***/ (function(__unusedmodule, exports) { - throw getNotFoundError(cmd) -} +"use strict"; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +//# sourceMappingURL=utils.js.map /***/ }), -/* 143 */ -/***/ (function(module) { +/* 83 */, +/* 84 */, +/* 85 */ +/***/ (function(module, __unusedexports, __webpack_require__) { +var slice = +/*#__PURE__*/ +__webpack_require__(232); /** - * Checks if `value` is classified as an `Array` object. + * Returns all but the last element of the given list or string. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @func + * @memberOf R + * @since v0.9.0 + * @category List + * @sig [a] -> [a] + * @sig String -> String + * @param {*} list + * @return {*} + * @see R.last, R.head, R.tail * @example * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false + * R.init([1, 2, 3]); //=> [1, 2] + * R.init([1, 2]); //=> [1] + * R.init([1]); //=> [] + * R.init([]); //=> [] * - * _.isArray(_.noop); - * // => false + * R.init('abc'); //=> 'ab' + * R.init('ab'); //=> 'a' + * R.init('a'); //=> '' + * R.init(''); //=> '' */ -var isArray = Array.isArray; -module.exports = isArray; +var init = +/*#__PURE__*/ +slice(0, -1); +module.exports = init; /***/ }), -/* 144 */ +/* 86 */ /***/ (function(module, __unusedexports, __webpack_require__) { +var _complement = +/*#__PURE__*/ +__webpack_require__(213); + var _curry2 = /*#__PURE__*/ __webpack_require__(830); + +var all = +/*#__PURE__*/ +__webpack_require__(320); /** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. + * Returns `true` if no elements of the list match the predicate, `false` + * otherwise. + * + * Dispatches to the `all` method of the second argument, if present. + * + * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte + * @since v0.12.0 + * @category List + * @sig (a -> Boolean) -> [a] -> Boolean + * @param {Function} fn The predicate function. + * @param {Array} list The array to consider. + * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. + * @see R.all, R.any * @example * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true + * const isEven = n => n % 2 === 0; + * const isOdd = n => n % 2 === 1; + * + * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true + * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false */ -var gte = +var none = /*#__PURE__*/ -_curry2(function gte(a, b) { - return a >= b; +_curry2(function none(fn, input) { + return all(_complement(fn), input); }); -module.exports = gte; +module.exports = none; /***/ }), -/* 145 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const pump = __webpack_require__(336); -const bufferStream = __webpack_require__(158); +/* 87 */ +/***/ (function(module) { -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} +module.exports = require("os"); -function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } +/***/ }), +/* 88 */, +/* 89 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - options = Object.assign({maxBuffer: Infinity}, options); +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); - const {maxBuffer} = options; +var _has = +/*#__PURE__*/ +__webpack_require__(390); - let stream; - return new Promise((resolve, reject) => { - const rejectPromise = error => { - if (error) { // A null check - error.bufferedData = stream.getBufferedValue(); - } - reject(error); - }; +var _isArguments = +/*#__PURE__*/ +__webpack_require__(960); // cover IE < 9 keys issues - stream = pump(inputStream, bufferStream(options), error => { - if (error) { - rejectPromise(error); - return; - } - resolve(); - }); +var hasEnumBug = ! +/*#__PURE__*/ +{ + toString: null +}.propertyIsEnumerable('toString'); +var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }).then(() => stream.getBufferedValue()); -} +var hasArgsEnumBug = +/*#__PURE__*/ +function () { + 'use strict'; -module.exports = getStream; -module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); -module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); -module.exports.MaxBufferError = MaxBufferError; + return arguments.propertyIsEnumerable('length'); +}(); +var contains = function contains(list, item) { + var idx = 0; -/***/ }), -/* 146 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + while (idx < list.length) { + if (list[idx] === item) { + return true; + } -var isFunction = __webpack_require__(10), - isLength = __webpack_require__(611); + idx += 1; + } + return false; +}; /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * Returns a list containing the names of all the enumerable own properties of + * the supplied object. + * Note that the order of the output array is not guaranteed to be consistent + * across different JS platforms. * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @func + * @memberOf R + * @since v0.1.0 + * @category Object + * @sig {k: v} -> [k] + * @param {Object} obj The object to extract properties from + * @return {Array} An array of the object's own properties. + * @see R.keysIn, R.values * @example * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false + * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} -module.exports = isArrayLike; +var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? +/*#__PURE__*/ +_curry1(function keys(obj) { + return Object(obj) !== obj ? [] : Object.keys(obj); +}) : +/*#__PURE__*/ +_curry1(function keys(obj) { + if (Object(obj) !== obj) { + return []; + } -/***/ }), -/* 147 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + var prop, nIdx; + var ks = []; -"use strict"; - -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const core = __importStar(__webpack_require__(470)); -const fast_xml_parser_1 = __importDefault(__webpack_require__(989)); -const fs_1 = __importDefault(__webpack_require__(747)); -const path = __importStar(__webpack_require__(622)); -const github_1 = __webpack_require__(824); -const html_to_text_1 = __webpack_require__(103); -const unescape_1 = __importDefault(__webpack_require__(982)); -const ramda_1 = __webpack_require__(61); -const HTML_TO_TEXT_OPTIONS = { - wordwrap: false, - preserveNewlines: false, - uppercaseHeadings: false -}; -const XML_PARSE_OPTIONS = { - allowBooleanAttributes: true, - ignoreAttributes: false, - attributeNamePrefix: '' -}; -function asArray(arg) { - return !arg ? [] : Array.isArray(arg) ? arg : [arg]; -} -function annotationsForPath(resultFile) { - var _a, _b, _c, _d; - core.info(`Creating annotations for ${resultFile}`); - const root = process.env['GITHUB_WORKSPACE'] || ''; - const result = fast_xml_parser_1.default.parse(fs_1.default.readFileSync(resultFile, 'UTF-8'), XML_PARSE_OPTIONS); - const violations = asArray((_b = (_a = result) === null || _a === void 0 ? void 0 : _a.BugCollection) === null || _b === void 0 ? void 0 : _b.BugInstance); - const bugPatterns = ramda_1.indexBy(a => a.type, asArray((_d = (_c = result) === null || _c === void 0 ? void 0 : _c.BugCollection) === null || _d === void 0 ? void 0 : _d.BugPattern)); - core.info(`${resultFile} has ${violations.length} violations`); - const getFilePath = ramda_1.memoizeWith(ramda_1.identity, (sourcePath) => { - var _a, _b, _c; - return asArray((_c = (_b = (_a = result) === null || _a === void 0 ? void 0 : _a.BugCollection) === null || _b === void 0 ? void 0 : _b.Project) === null || _c === void 0 ? void 0 : _c.SrcDir).find(SrcDir => { - const combinedPath = path.join(SrcDir, sourcePath); - const fileExists = fs_1.default.existsSync(combinedPath); - core.debug(`${combinedPath} ${fileExists ? 'does' : 'does not'} exists`); - return fileExists; - }); - }); - return ramda_1.chain(BugInstance => { - const annotationsForBug = []; - const SrcDir = BugInstance.SourceLine.sourcepath && - getFilePath(BugInstance.SourceLine.sourcepath); - if (BugInstance.SourceLine.start && SrcDir) { - const annotation = { - annotation_level: github_1.AnnotationLevel.warning, - path: path.relative(root, path.join(SrcDir, BugInstance.SourceLine.sourcepath)), - start_line: Number(BugInstance.SourceLine.start || 1), - end_line: Number(BugInstance.SourceLine.end || BugInstance.SourceLine.start || 1), - title: BugInstance.type, - message: BugInstance.LongMessage, - raw_details: html_to_text_1.fromString(unescape_1.default(bugPatterns[BugInstance.type].Details), HTML_TO_TEXT_OPTIONS) - }; - annotationsForBug.push(annotation); - } - else { - core.debug(`Skipping bug instance because source line start or source directory are missing`); - } - return annotationsForBug; - }, violations); -} -exports.annotationsForPath = annotationsForPath; + var checkArgsLength = hasArgsEnumBug && _isArguments(obj); + for (prop in obj) { + if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { + ks[ks.length] = prop; + } + } -/***/ }), -/* 148 */, -/* 149 */, -/* 150 */, -/* 151 */ -/***/ (function(module) { + if (hasEnumBug) { + nIdx = nonEnumerableProps.length - 1; -module.exports = {"elementNames":{"altglyph":"altGlyph","altglyphdef":"altGlyphDef","altglyphitem":"altGlyphItem","animatecolor":"animateColor","animatemotion":"animateMotion","animatetransform":"animateTransform","clippath":"clipPath","feblend":"feBlend","fecolormatrix":"feColorMatrix","fecomponenttransfer":"feComponentTransfer","fecomposite":"feComposite","feconvolvematrix":"feConvolveMatrix","fediffuselighting":"feDiffuseLighting","fedisplacementmap":"feDisplacementMap","fedistantlight":"feDistantLight","fedropshadow":"feDropShadow","feflood":"feFlood","fefunca":"feFuncA","fefuncb":"feFuncB","fefuncg":"feFuncG","fefuncr":"feFuncR","fegaussianblur":"feGaussianBlur","feimage":"feImage","femerge":"feMerge","femergenode":"feMergeNode","femorphology":"feMorphology","feoffset":"feOffset","fepointlight":"fePointLight","fespecularlighting":"feSpecularLighting","fespotlight":"feSpotLight","fetile":"feTile","feturbulence":"feTurbulence","foreignobject":"foreignObject","glyphref":"glyphRef","lineargradient":"linearGradient","radialgradient":"radialGradient","textpath":"textPath"},"attributeNames":{"definitionurl":"definitionURL","attributename":"attributeName","attributetype":"attributeType","basefrequency":"baseFrequency","baseprofile":"baseProfile","calcmode":"calcMode","clippathunits":"clipPathUnits","diffuseconstant":"diffuseConstant","edgemode":"edgeMode","filterunits":"filterUnits","glyphref":"glyphRef","gradienttransform":"gradientTransform","gradientunits":"gradientUnits","kernelmatrix":"kernelMatrix","kernelunitlength":"kernelUnitLength","keypoints":"keyPoints","keysplines":"keySplines","keytimes":"keyTimes","lengthadjust":"lengthAdjust","limitingconeangle":"limitingConeAngle","markerheight":"markerHeight","markerunits":"markerUnits","markerwidth":"markerWidth","maskcontentunits":"maskContentUnits","maskunits":"maskUnits","numoctaves":"numOctaves","pathlength":"pathLength","patterncontentunits":"patternContentUnits","patterntransform":"patternTransform","patternunits":"patternUnits","pointsatx":"pointsAtX","pointsaty":"pointsAtY","pointsatz":"pointsAtZ","preservealpha":"preserveAlpha","preserveaspectratio":"preserveAspectRatio","primitiveunits":"primitiveUnits","refx":"refX","refy":"refY","repeatcount":"repeatCount","repeatdur":"repeatDur","requiredextensions":"requiredExtensions","requiredfeatures":"requiredFeatures","specularconstant":"specularConstant","specularexponent":"specularExponent","spreadmethod":"spreadMethod","startoffset":"startOffset","stddeviation":"stdDeviation","stitchtiles":"stitchTiles","surfacescale":"surfaceScale","systemlanguage":"systemLanguage","tablevalues":"tableValues","targetx":"targetX","targety":"targetY","textlength":"textLength","viewbox":"viewBox","viewtarget":"viewTarget","xchannelselector":"xChannelSelector","ychannelselector":"yChannelSelector","zoomandpan":"zoomAndPan"}}; + while (nIdx >= 0) { + prop = nonEnumerableProps[nIdx]; -/***/ }), -/* 152 */, -/* 153 */, -/* 154 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + if (_has(prop, obj) && !contains(ks, prop)) { + ks[ks.length] = prop; + } + + nIdx -= 1; + } + } -var baseTimes = __webpack_require__(553), - castFunction = __webpack_require__(946), - toInteger = __webpack_require__(813); + return ks; +}); +module.exports = keys; -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/***/ }), +/* 90 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +var concat = +/*#__PURE__*/ +__webpack_require__(779); +var difference = +/*#__PURE__*/ +__webpack_require__(275); /** - * Invokes the iteratee `n` times, returning an array of the results of - * each invocation. The iteratee is invoked with one argument; (index). + * Finds the set (i.e. no duplicates) of all elements contained in the first or + * second list, but not both. * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of results. + * @func + * @memberOf R + * @since v0.19.0 + * @category Relation + * @sig [*] -> [*] -> [*] + * @param {Array} list1 The first list. + * @param {Array} list2 The second list. + * @return {Array} The elements in `list1` or `list2`, but not both. + * @see R.symmetricDifferenceWith, R.difference, R.differenceWith * @example * - * _.times(3, String); - * // => ['0', '1', '2'] - * - * _.times(4, _.constant(0)); - * // => [0, 0, 0, 0] + * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] + * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] */ -function times(n, iteratee) { - n = toInteger(n); - if (n < 1 || n > MAX_SAFE_INTEGER) { - return []; - } - var index = MAX_ARRAY_LENGTH, - length = nativeMin(n, MAX_ARRAY_LENGTH); - iteratee = castFunction(iteratee); - n -= MAX_ARRAY_LENGTH; - var result = baseTimes(length, iteratee); - while (++index < n) { - iteratee(index); - } - return result; -} - -module.exports = times; +var symmetricDifference = +/*#__PURE__*/ +_curry2(function symmetricDifference(list1, list2) { + return concat(difference(list1, list2), difference(list2, list1)); +}); +module.exports = symmetricDifference; /***/ }), -/* 155 */, -/* 156 */, -/* 157 */, -/* 158 */ +/* 91 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; - -const {PassThrough} = __webpack_require__(413); - -module.exports = options => { - options = Object.assign({}, options); - - const {array} = options; - let {encoding} = options; - const buffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } - - if (buffer) { - encoding = null; - } - - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - stream.on('data', chunk => { - ret.push(chunk); - - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; - } - - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Takes a value and applies a function to it. + * + * This function is also known as the `thrush` combinator. + * + * @func + * @memberOf R + * @since v0.25.0 + * @category Function + * @sig a -> (a -> b) -> b + * @param {*} x The value + * @param {Function} f The function to apply + * @return {*} The result of applying `f` to `x` + * @example + * + * const t42 = R.applyTo(42); + * t42(R.identity); //=> 42 + * t42(R.add(1)); //=> 43 + */ - stream.getBufferedLength = () => len; - return stream; -}; +var applyTo = +/*#__PURE__*/ +_curry2(function applyTo(x, f) { + return f(x); +}); +module.exports = applyTo; /***/ }), -/* 159 */ +/* 92 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var coreJsData = __webpack_require__(396); +var _complement = +/*#__PURE__*/ +__webpack_require__(213); -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +var filter = +/*#__PURE__*/ +__webpack_require__(80); /** - * Checks if `func` has its source masked. + * The complement of [`filter`](#filter). * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. + * Acts as a transducer if a transformer is given in list position. Filterable + * objects include plain objects or any object that has a filter method such + * as `Array`. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig Filterable f => (a -> Boolean) -> f a -> f a + * @param {Function} pred + * @param {Array} filterable + * @return {Array} + * @see R.filter, R.transduce, R.addIndex + * @example + * + * const isOdd = (n) => n % 2 === 1; + * + * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] + * + * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} -module.exports = isMasked; +var reject = +/*#__PURE__*/ +_curry2(function reject(pred, filterable) { + return filter(_complement(pred), filterable); +}); + +module.exports = reject; /***/ }), -/* 160 */ -/***/ (function(module) { +/* 93 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +module.exports = minimatch +minimatch.Minimatch = Minimatch -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; +var path = { sep: '/' } +try { + path = __webpack_require__(622) +} catch (er) {} -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __webpack_require__(306) - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } } -module.exports = isIndex; +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' +// * => any number of characters +var star = qmark + '*?' -/***/ }), -/* 161 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' -var _includes = -/*#__PURE__*/ -__webpack_require__(958); +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' -var _Set = -/*#__PURE__*/ -function () { - function _Set() { - /* globals Set */ - this._nativeSet = typeof Set === 'function' ? new Set() : null; - this._items = {}; - } +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') - // until we figure out why jsdoc chokes on this - // @param item The item to add to the Set - // @returns {boolean} true if the item did not exist prior, otherwise false - // - _Set.prototype.add = function (item) { - return !hasOrAdd(item, true, this); - }; // - // @param item The item to check for existence in the Set - // @returns {boolean} true if the item exists in the Set, otherwise false - // +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} +// normalizes slashes. +var slashSplit = /\/+/ - _Set.prototype.has = function (item) { - return hasOrAdd(item, false, this); - }; // - // Combines the logic for checking whether an item is a member of the set and - // for adding a new item to the set. - // - // @param item The item to check or add to the Set instance. - // @param shouldAdd If true, the item will be added to the set if it doesn't - // already exist. - // @param set The set instance to check or add to. - // @return {boolean} true if the item already existed, otherwise false. - // +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} - return _Set; -}(); +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch -function hasOrAdd(item, shouldAdd, set) { - var type = typeof item; - var prevSize, newSize; + var orig = minimatch - switch (type) { - case 'string': - case 'number': - // distinguish between +0 and -0 - if (item === 0 && 1 / item === -Infinity) { - if (set._items['-0']) { - return true; - } else { - if (shouldAdd) { - set._items['-0'] = true; - } + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } - return false; - } - } // these types can all utilise the native Set + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + return m +} - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} - set._nativeSet.add(item); +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = {}; - set._items[type][item] = true; - } + if (!options) options = {} - return false; - } else if (item in set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type][item] = true; - } + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } - return false; - } - } + // "" only matches "" + if (pattern.trim() === '') return p === '' - case 'boolean': - // set._items['boolean'] holds a two element array - // representing [ falseExists, trueExists ] - if (type in set._items) { - var bIdx = item ? 1 : 0; + return new Minimatch(pattern, options).match(p) +} - if (set._items[type][bIdx]) { - return true; - } else { - if (shouldAdd) { - set._items[type][bIdx] = true; - } +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } - return false; - } - } else { - if (shouldAdd) { - set._items[type] = item ? [false, true] : [true, false]; - } + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() - return false; - } + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } - case 'function': - // compare functions for reference equality - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false - set._nativeSet.add(item); + // make the set of regexps etc. + this.make() +} - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } +Minimatch.prototype.debug = function () {} - return false; - } +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } + var pattern = this.pattern + var options = this.options - return false; - } + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } - return true; - } + // step 1: figure out negation, etc. + this.parseNegate() - case 'undefined': - if (set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type] = true; - } + // step 2: expand braces + var set = this.globSet = this.braceExpand() - return false; - } + if (options.debug) this.debug = console.error - case 'object': - if (item === null) { - if (!set._items['null']) { - if (shouldAdd) { - set._items['null'] = true; - } + this.debug(this.pattern, set) - return false; - } + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) - return true; - } + this.debug(this.pattern, set) - /* falls through */ + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) - default: - // reduce the search size of heterogeneous sets by creating buckets - // for each type. - type = Object.prototype.toString.call(item); + this.debug(this.pattern, set) - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) - return false; - } // scan through all previously applied items + this.debug(this.pattern, set) + this.set = set +} - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 - return false; - } + if (options.nonegate) return - return true; + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ } -} // A simple Set type that honours R.equals semantics + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} -module.exports = _Set; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} -/***/ }), -/* 162 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +Minimatch.prototype.braceExpand = braceExpand -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } -var path = -/*#__PURE__*/ -__webpack_require__(756); -/** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } -var props = -/*#__PURE__*/ -_curry2(function props(ps, obj) { - return ps.map(function (p) { - return path([p], obj); - }); -}); + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } -module.exports = props; + return expand(pattern) +} -/***/ }), -/* 163 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } -var _concat = -/*#__PURE__*/ -__webpack_require__(340); + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this -var _curry3 = -/*#__PURE__*/ -__webpack_require__(78); + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } -var uniqWith = -/*#__PURE__*/ -__webpack_require__(780); -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * const l1 = [{a: 1}, {a: 2}]; - * const l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } -var unionWith = -/*#__PURE__*/ -_curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); -}); + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false -module.exports = unionWith; + case '\\': + clearStateChar() + escaping = true + continue -/***/ }), -/* 164 */, -/* 165 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue -var groupWith = -/*#__PURE__*/ -_curry2(function (fn, list) { - var res = []; - var idx = 0; - var len = list.length; + case '(': + if (inClass) { + re += '(' + continue + } - while (idx < len) { - var nextidx = idx + 1; + if (!stateChar) { + re += '\\(' + continue + } - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } - return res; -}); + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue -module.exports = groupWith; + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } -/***/ }), -/* 166 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + clearStateChar() + re += '|' + continue -var _arity = -/*#__PURE__*/ -__webpack_require__(456); + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); + if (inClass) { + re += '\\' + c + continue + } -function _createPartialApplicator(concat) { - return _curry2(function (fn, args) { - return _arity(Math.max(0, fn.length - args.length), function () { - return fn.apply(this, concat(args, arguments)); - }); - }); -} + inClass = true + classStart = i + reClassStart = re.length + re += c + continue -module.exports = _createPartialApplicator; + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } -/***/ }), -/* 167 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + // finish up the class. + hasMagic = true + inClass = false + re += c + continue -var _curry3 = -/*#__PURE__*/ -__webpack_require__(78); + default: + // swallow any state char that wasn't consumed + clearStateChar() -var pathOr = -/*#__PURE__*/ -__webpack_require__(25); -/** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const favorite = R.prop('favoriteLibrary'); - * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + re += c -var propOr = -/*#__PURE__*/ -_curry3(function propOr(val, p, obj) { - return pathOr(val, [p], obj); -}); + } // switch + } // for -module.exports = propOr; + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } -/***/ }), -/* 168 */ -/***/ (function(module) { + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } -"use strict"; + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) -const alias = ['stdin', 'stdout', 'stderr']; + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type -const hasAlias = opts => alias.some(x => Boolean(opts[x])); + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } -module.exports = opts => { - if (!opts) { - return null; - } + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } - if (opts.stdio && hasAlias(opts)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); - } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } - if (typeof opts.stdio === 'string') { - return opts.stdio; - } + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] - const stdio = opts.stdio || []; + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } + nlLast += nlAfter - const result = []; - const len = Math.max(stdio.length, alias.length); + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter - for (let i = 0; i < len; i++) { - let value = null; + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } - if (stdio[i] !== undefined) { - value = stdio[i]; - } else if (opts[alias[i]] !== undefined) { - value = opts[alias[i]]; - } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } - result[i] = value; - } + if (addPatternStart) { + re = patternStart + re + } - return result; -}; + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } -/***/ }), -/* 169 */, -/* 170 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } -"use strict"; + regExp._glob = pattern + regExp._src = re + return regExp +} -const util = __webpack_require__(343); -const buildOptions = __webpack_require__(343).buildOptions; -const xmlNode = __webpack_require__(66); -const regx = - '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' - .replace(/NAME/g, util.nameRegexp); +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp -//polyfill -if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; -} -if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; -} + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set -const defaultOptions = { - attributeNamePrefix: '@_', - attrNodeName: false, - textNodeName: '#text', - ignoreAttributes: true, - ignoreNameSpace: false, - allowBooleanAttributes: false, //a tag can have attributes without any value - //ignoreRootElement : false, - parseNodeValue: true, - parseAttributeValue: false, - arrayMode: false, - trimValues: true, //Trim string values of tag and attributes - cdataTagName: false, - cdataPositionChar: '\\c', - tagValueProcessor: function(a, tagName) { - return a; - }, - attrValueProcessor: function(a, attrName) { - return a; - }, - stopNodes: [] - //decodeStrict: false, -}; + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options -exports.defaultOptions = defaultOptions; + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' -const props = [ - 'attributeNamePrefix', - 'attrNodeName', - 'textNodeName', - 'ignoreAttributes', - 'ignoreNameSpace', - 'allowBooleanAttributes', - 'parseNodeValue', - 'parseAttributeValue', - 'arrayMode', - 'trimValues', - 'cdataTagName', - 'cdataPositionChar', - 'tagValueProcessor', - 'attrValueProcessor', - 'parseTrueNumberOnly', - 'stopNodes' -]; -exports.props = props; + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') -/** - * Trim -> valueProcessor -> parse value - * @param {string} tagName - * @param {string} val - * @param {object} options - */ -function processTagValue(tagName, val, options) { - if (val) { - if (options.trimValues) { - val = val.trim(); - } - val = options.tagValueProcessor(val, tagName); - val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly); - } + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' - return val; -} + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' -function resolveNameSpace(tagname, options) { - if (options.ignoreNameSpace) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false } - return tagname; + return this.regexp } -function parseValue(val, shouldParse, parseTrueNumberOnly) { - if (shouldParse && typeof val === 'string') { - let parsed; - if (val.trim() === '' || isNaN(val)) { - parsed = val === 'true' ? true : val === 'false' ? false : val; - } else { - if (val.indexOf('0x') !== -1) { - //support hexa decimal - parsed = Number.parseInt(val, 16); - } else if (val.indexOf('.') !== -1) { - parsed = Number.parseFloat(val); - val = val.replace(/\.?0+$/, ""); - } else { - parsed = Number.parseInt(val, 10); - } - if (parseTrueNumberOnly) { - parsed = String(parsed) === val ? parsed : val; - } - } - return parsed; - } else { - if (util.isExist(val)) { - return val; - } else { - return ''; - } +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) } + return list } -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g'); +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' -function buildAttributesMap(attrStr, options) { - if (!options.ignoreAttributes && typeof attrStr === 'string') { - attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); + if (f === '/' && partial) return true - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = resolveNameSpace(matches[i][1], options); - if (attrName.length) { - if (matches[i][4] !== undefined) { - if (options.trimValues) { - matches[i][4] = matches[i][4].trim(); - } - matches[i][4] = options.attrValueProcessor(matches[i][4], attrName); - attrs[options.attributeNamePrefix + attrName] = parseValue( - matches[i][4], - options.parseAttributeValue, - options.parseTrueNumberOnly - ); - } else if (options.allowBooleanAttributes) { - attrs[options.attributeNamePrefix + attrName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (options.attrNodeName) { - const attrCollection = {}; - attrCollection[options.attrNodeName] = attrs; - return attrCollection; - } - return attrs; + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') } -} -const getTraversalObj = function(xmlData, options) { - xmlData = xmlData.replace(/(\r\n)|\n/, " "); - options = buildOptions(options, defaultOptions, props); - const xmlObj = new xmlNode('!xml'); - let currentNode = xmlObj; - let textData = ""; + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) -//function match(xmlData){ - for(let i=0; i< xmlData.length; i++){ - const ch = xmlData[i]; - if(ch === '<'){ - if( xmlData[i+1] === '/') {//Closing Tag - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") - let tagName = xmlData.substring(i+2,closeIndex).trim(); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. - if(options.ignoreNameSpace){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } - } + var set = this.set + this.debug(this.pattern, 'set', set) - /* if (currentNode.parent) { - currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options); - } */ - if(currentNode){ - if(currentNode.val){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options); - }else{ - currentNode.val = processTagValue(tagName, textData , options); - } - } + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } - if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) { - currentNode.child = [] - if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}} - currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1) - } - currentNode = currentNode.parent; - textData = ""; - i = closeIndex; - } else if( xmlData[i+1] === '?') { - i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.") - } else if(xmlData.substr(i + 1, 3) === '!--') { - i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.") - } else if( xmlData.substr(i + 1, 2) === '!D') { - const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.") - const tagExp = xmlData.substring(i, closeIndex); - if(tagExp.indexOf("[") >= 0){ - i = xmlData.indexOf("]>", i) + 1; - }else{ - i = closeIndex; - } - }else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2 - const tagExp = xmlData.substring(i + 9,closeIndex); + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } - //considerations - //1. CDATA will always have parent node - //2. A tag with CDATA is not a leaf node so it's value would be string type. - if(textData){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options); - textData = ""; - } + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) - if (options.cdataTagName) { - //add cdata node - const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp); - currentNode.addChild(childNode); - //for backtracking - currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar; - //add rest value to parent node - if (tagExp) { - childNode.val = tagExp; - } - } else { - currentNode.val = (currentNode.val || '') + (tagExp || ''); - } + this.debug('matchOne', file.length, pattern.length) - i = closeIndex + 2; - }else {//Opening tag - const result = closingIndexForOpeningTag(xmlData, i+1) - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.indexOf(" "); - let tagName = tagExp; - if(separatorIndex !== -1){ - tagName = tagExp.substr(0, separatorIndex).trimRight(); - tagExp = tagExp.substr(separatorIndex + 1); - } + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] - if(options.ignoreNameSpace){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } - } + this.debug(pattern, p, f) - //save text to parent node - if (currentNode && textData) { - if(currentNode.tagname !== '!xml'){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options); - } + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false } + return true + } - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - const childNode = new xmlNode(tagName, currentNode, ''); - if(tagName !== tagExp){ - childNode.attrsMap = buildAttributesMap(tagExp, options); + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break } - currentNode.addChild(childNode); - }else{//opening tag - const childNode = new xmlNode( tagName, currentNode ); - if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) { - childNode.startIndex=closeIndex; - } - if(tagName !== tagExp){ - childNode.attrsMap = buildAttributesMap(tagExp, options); - } - currentNode.addChild(childNode); - currentNode = childNode; + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ } - textData = ""; - i = closeIndex; } - }else{ - textData += xmlData[i]; + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false } - } - return xmlObj; -} -function closingIndexForOpeningTag(data, i){ - let attrBoundary; - let tagExp = ""; - for (let index = i; index < data.length; index++) { - let ch = data[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === '>') { - return { - data: tagExp, - index: index - } - } else if (ch === '\t') { - ch = " " + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) } - tagExp += ch; + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } -function findClosingIndex(xmlData, str, i, errMsg){ - const closingIndex = xmlData.indexOf(str, i); - if(closingIndex === -1){ - throw new Error(errMsg) - }else{ - return closingIndex + str.length - 1; - } -} -exports.getTraversalObj = getTraversalObj; +/***/ }), +/* 94 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); + +var pathOr = +/*#__PURE__*/ +__webpack_require__(25); +/** + * If the given, non-null object has an own property with the specified name, + * returns the value of that property. Otherwise returns the provided default + * value. + * + * @func + * @memberOf R + * @since v0.6.0 + * @category Object + * @sig a -> String -> Object -> a + * @param {*} val The default value. + * @param {String} p The name of the property to return. + * @param {Object} obj The object to query. + * @return {*} The value of given property of the supplied object or the default value. + * @example + * + * const alice = { + * name: 'ALICE', + * age: 101 + * }; + * const favorite = R.prop('favoriteLibrary'); + * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); + * + * favorite(alice); //=> undefined + * favoriteWithDefault(alice); //=> 'Ramda' + */ + + +var propOr = +/*#__PURE__*/ +_curry3(function propOr(val, p, obj) { + return pathOr(val, [p], obj); +}); +module.exports = propOr; /***/ }), -/* 171 */, -/* 172 */, -/* 173 */ +/* 95 */, +/* 96 */ +/***/ (function(module) { + +/** + * A function that always returns `true`. Any passed in parameters are ignored. + * + * @func + * @memberOf R + * @since v0.9.0 + * @category Function + * @sig * -> Boolean + * @param {*} + * @return {Boolean} + * @see R.F + * @example + * + * R.T(); //=> true + */ +var T = function () { + return true; +}; + +module.exports = T; + +/***/ }), +/* 97 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry2 = +var _curry3 = /*#__PURE__*/ -__webpack_require__(830); +__webpack_require__(78); // `Identity` is a functor that holds a single value, where `map` simply +// transforms the held value with the provided function. -var drop = -/*#__PURE__*/ -__webpack_require__(12); + +var Identity = function (x) { + return { + value: x, + map: function (f) { + return Identity(f(x)); + } + }; +}; /** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. + * Returns the result of "setting" the portion of the given data structure + * focused by the given lens to the result of applying the given function to + * the focused value. * * @func * @memberOf R * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast + * @category Object + * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s + * @sig Lens s a -> (a -> a) -> s -> s + * @param {Lens} lens + * @param {*} v + * @param {*} x + * @return {*} + * @see R.prop, R.lensIndex, R.lensProp * @example * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' + * const headLens = R.lensIndex(0); + * + * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] */ -var takeLast = +var over = /*#__PURE__*/ -_curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); +_curry3(function over(lens, f, x) { + // The value returned by the getter function is first transformed with `f`, + // then set as the value of an `Identity`. This is then mapped over with the + // setter function of the lens. + return lens(function (y) { + return Identity(f(y)); + })(x).value; }); -module.exports = takeLast; +module.exports = over; /***/ }), -/* 174 */ +/* 98 */, +/* 99 */, +/* 100 */, +/* 101 */, +/* 102 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; +// For internal use, subject to change. +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Context = void 0; -const fs_1 = __webpack_require__(747); -const os_1 = __webpack_require__(87); -class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); - } - else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); - } - } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__webpack_require__(747)); +const os = __importStar(__webpack_require__(87)); +const utils_1 = __webpack_require__(82); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - return { owner, repo }; - } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; - } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); } -exports.Context = Context; -//# sourceMappingURL=context.js.map +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map /***/ }), -/* 175 */, -/* 176 */ +/* 103 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var ERR_INVALID_ARG_TYPE = __webpack_require__(563).codes.ERR_INVALID_ARG_TYPE; - -function from(Readable, iterable, opts) { - var iterator; - - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); // Reading boolean to protect against _read - // being called before last iteration completion. - - var reading = false; - - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - - function next() { - return _next2.apply(this, arguments); - } - - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _ref = yield iterator.next(), - value = _ref.value, - done = _ref.done; - - if (done) { - readable.push(null); - } else if (readable.push((yield value))) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - - return readable; -} +module.exports = __webpack_require__(460); -module.exports = from; /***/ }), -/* 177 */, -/* 178 */ +/* 104 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var Tokenizer = __webpack_require__(843); +var _identity = +/*#__PURE__*/ +__webpack_require__(631); -/* - Options: +var chain = +/*#__PURE__*/ +__webpack_require__(481); +/** + * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from + * any [Chain](https://github.com/fantasyland/fantasy-land#chain). + * + * @func + * @memberOf R + * @since v0.3.0 + * @category List + * @sig Chain c => c (c a) -> c a + * @param {*} list + * @return {*} + * @see R.flatten, R.chain + * @example + * + * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] + * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] + */ - xmlMode: Disables the special behavior for script/style tags (false by default) - lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`) - lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`) -*/ -/* - Callbacks: - - oncdataend, - oncdatastart, - onclosetag, - oncomment, - oncommentend, - onerror, - onopentag, - onprocessinginstruction, - onreset, - ontext -*/ - -var formTags = { - input: true, - option: true, - optgroup: true, - select: true, - button: true, - datalist: true, - textarea: true -}; +var unnest = +/*#__PURE__*/ +chain(_identity); +module.exports = unnest; -var openImpliesClose = { - tr: { tr: true, th: true, td: true }, - th: { th: true }, - td: { thead: true, th: true, td: true }, - body: { head: true, link: true, script: true }, - li: { li: true }, - p: { p: true }, - h1: { p: true }, - h2: { p: true }, - h3: { p: true }, - h4: { p: true }, - h5: { p: true }, - h6: { p: true }, - select: formTags, - input: formTags, - output: formTags, - button: formTags, - datalist: formTags, - textarea: formTags, - option: { option: true }, - optgroup: { optgroup: true } -}; +/***/ }), +/* 105 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var voidElements = { - __proto__: null, - area: true, - base: true, - basefont: true, - br: true, - col: true, - command: true, - embed: true, - frame: true, - hr: true, - img: true, - input: true, - isindex: true, - keygen: true, - link: true, - meta: true, - param: true, - source: true, - track: true, - wbr: true -}; +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); +/** + * Makes a comparator function out of a function that reports whether the first + * element is less than the second. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Function + * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) + * @param {Function} pred A predicate function of arity two which will return `true` if the first argument + * is less than the second, `false` otherwise + * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` + * @example + * + * const byAge = R.comparator((a, b) => a.age < b.age); + * const people = [ + * { name: 'Emma', age: 70 }, + * { name: 'Peter', age: 78 }, + * { name: 'Mikhail', age: 62 }, + * ]; + * const peopleByIncreasingAge = R.sort(byAge, people); + * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] + */ -var foreignContextElements = { - __proto__: null, - math: true, - svg: true -}; -var htmlIntegrationElements = { - __proto__: null, - mi: true, - mo: true, - mn: true, - ms: true, - mtext: true, - "annotation-xml": true, - foreignObject: true, - desc: true, - title: true -}; -var re_nameEnd = /\s|\//; +var comparator = +/*#__PURE__*/ +_curry1(function comparator(pred) { + return function (a, b) { + return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; + }; +}); -function Parser(cbs, options) { - this._options = options || {}; - this._cbs = cbs || {}; +module.exports = comparator; - this._tagname = ""; - this._attribname = ""; - this._attribvalue = ""; - this._attribs = null; - this._stack = []; - this._foreignContext = []; +/***/ }), +/* 106 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - this.startIndex = 0; - this.endIndex = null; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); - this._lowerCaseTagNames = - "lowerCaseTags" in this._options - ? !!this._options.lowerCaseTags - : !this._options.xmlMode; - this._lowerCaseAttributeNames = - "lowerCaseAttributeNames" in this._options - ? !!this._options.lowerCaseAttributeNames - : !this._options.xmlMode; +var _indexOf = +/*#__PURE__*/ +__webpack_require__(627); - if (this._options.Tokenizer) { - Tokenizer = this._options.Tokenizer; - } - this._tokenizer = new Tokenizer(this._options, this); +var _isArray = +/*#__PURE__*/ +__webpack_require__(930); +/** + * Returns the position of the first occurrence of an item in an array, or -1 + * if the item is not included in the array. [`R.equals`](#equals) is used to + * determine equality. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig a -> [a] -> Number + * @param {*} target The item to find. + * @param {Array} xs The array to search in. + * @return {Number} the index of the target, or -1 if the target is not found. + * @see R.lastIndexOf + * @example + * + * R.indexOf(3, [1,2,3,4]); //=> 2 + * R.indexOf(10, [1,2,3,4]); //=> -1 + */ - if (this._cbs.onparserinit) this._cbs.onparserinit(this); -} -__webpack_require__(689)(Parser, __webpack_require__(614).EventEmitter); +var indexOf = +/*#__PURE__*/ +_curry2(function indexOf(target, xs) { + return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0); +}); -Parser.prototype._updatePosition = function(initialOffset) { - if (this.endIndex === null) { - if (this._tokenizer._sectionStart <= initialOffset) { - this.startIndex = 0; - } else { - this.startIndex = this._tokenizer._sectionStart - initialOffset; - } - } else this.startIndex = this.endIndex + 1; - this.endIndex = this._tokenizer.getAbsoluteIndex(); -}; +module.exports = indexOf; -//Tokenizer event handlers -Parser.prototype.ontext = function(data) { - this._updatePosition(1); - this.endIndex--; +/***/ }), +/* 107 */ +/***/ (function(__unusedmodule, exports) { - if (this._cbs.ontext) this._cbs.ontext(data); -}; +"use strict"; -Parser.prototype.onopentagname = function(name) { - if (this._lowerCaseTagNames) { - name = name.toLowerCase(); - } - this._tagname = name; +Object.defineProperty(exports, '__esModule', { value: true }); - if (!this._options.xmlMode && name in openImpliesClose) { - for ( - var el; - (el = this._stack[this._stack.length - 1]) in - openImpliesClose[name]; - this.onclosetag(el) - ); - } +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } - if (this._options.xmlMode || !(name in voidElements)) { - this._stack.push(name); - if (name in foreignContextElements) this._foreignContext.push(true); - else if (name in htmlIntegrationElements) - this._foreignContext.push(false); - } + if (typeof process === "object" && "version" in process) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } - if (this._cbs.onopentagname) this._cbs.onopentagname(name); - if (this._cbs.onopentag) this._attribs = {}; -}; + return ""; +} -Parser.prototype.onopentagend = function() { - this._updatePosition(1); +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map - if (this._attribs) { - if (this._cbs.onopentag) - this._cbs.onopentag(this._tagname, this._attribs); - this._attribs = null; - } - if ( - !this._options.xmlMode && - this._cbs.onclosetag && - this._tagname in voidElements - ) { - this._cbs.onclosetag(this._tagname); - } +/***/ }), +/* 108 */ +/***/ (function(module) { - this._tagname = ""; -}; +module.exports = require("net"); -Parser.prototype.onclosetag = function(name) { - this._updatePosition(1); +/***/ }), +/* 109 */, +/* 110 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (this._lowerCaseTagNames) { - name = name.toLowerCase(); - } - - if (name in foreignContextElements || name in htmlIntegrationElements) { - this._foreignContext.pop(); - } +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Creates an object containing a single key:value pair. + * + * @func + * @memberOf R + * @since v0.18.0 + * @category Object + * @sig String -> a -> {String:a} + * @param {String} key + * @param {*} val + * @return {Object} + * @see R.pair + * @example + * + * const matchPhrases = R.compose( + * R.objOf('must'), + * R.map(R.objOf('match_phrase')) + * ); + * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} + */ - if ( - this._stack.length && - (!(name in voidElements) || this._options.xmlMode) - ) { - var pos = this._stack.lastIndexOf(name); - if (pos !== -1) { - if (this._cbs.onclosetag) { - pos = this._stack.length - pos; - while (pos--) this._cbs.onclosetag(this._stack.pop()); - } else this._stack.length = pos; - } else if (name === "p" && !this._options.xmlMode) { - this.onopentagname(name); - this._closeCurrentTag(); - } - } else if (!this._options.xmlMode && (name === "br" || name === "p")) { - this.onopentagname(name); - this._closeCurrentTag(); - } -}; -Parser.prototype.onselfclosingtag = function() { - if ( - this._options.xmlMode || - this._options.recognizeSelfClosing || - this._foreignContext[this._foreignContext.length - 1] - ) { - this._closeCurrentTag(); - } else { - this.onopentagend(); - } -}; +var objOf = +/*#__PURE__*/ +_curry2(function objOf(key, val) { + var obj = {}; + obj[key] = val; + return obj; +}); -Parser.prototype._closeCurrentTag = function() { - var name = this._tagname; +module.exports = objOf; - this.onopentagend(); +/***/ }), +/* 111 */, +/* 112 */, +/* 113 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - //self-closing tags will be on the top of the stack - //(cheaper check than in onclosetag) - if (this._stack[this._stack.length - 1] === name) { - if (this._cbs.onclosetag) { - this._cbs.onclosetag(name); - } - this._stack.pop(); - - } -}; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); -Parser.prototype.onattribname = function(name) { - if (this._lowerCaseAttributeNames) { - name = name.toLowerCase(); - } - this._attribname = name; -}; +var _has = +/*#__PURE__*/ +__webpack_require__(390); +/** + * Takes a spec object and a test object; returns true if the test satisfies + * the spec. Each of the spec's own properties must be a predicate function. + * Each predicate is applied to the value of the corresponding property of the + * test object. `where` returns true if all the predicates return true, false + * otherwise. + * + * `where` is well suited to declaratively expressing constraints for other + * functions such as [`filter`](#filter) and [`find`](#find). + * + * @func + * @memberOf R + * @since v0.1.1 + * @category Object + * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean + * @param {Object} spec + * @param {Object} testObj + * @return {Boolean} + * @see R.propSatisfies, R.whereEq + * @example + * + * // pred :: Object -> Boolean + * const pred = R.where({ + * a: R.equals('foo'), + * b: R.complement(R.equals('bar')), + * x: R.gt(R.__, 10), + * y: R.lt(R.__, 20) + * }); + * + * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true + * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false + * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false + * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false + * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false + */ -Parser.prototype.onattribdata = function(value) { - this._attribvalue += value; -}; -Parser.prototype.onattribend = function() { - if (this._cbs.onattribute) - this._cbs.onattribute(this._attribname, this._attribvalue); - if ( - this._attribs && - !Object.prototype.hasOwnProperty.call(this._attribs, this._attribname) - ) { - this._attribs[this._attribname] = this._attribvalue; +var where = +/*#__PURE__*/ +_curry2(function where(spec, testObj) { + for (var prop in spec) { + if (_has(prop, spec) && !spec[prop](testObj[prop])) { + return false; } - this._attribname = ""; - this._attribvalue = ""; -}; + } -Parser.prototype._getInstructionName = function(value) { - var idx = value.search(re_nameEnd), - name = idx < 0 ? value : value.substr(0, idx); + return true; +}); - if (this._lowerCaseTagNames) { - name = name.toLowerCase(); - } +module.exports = where; - return name; -}; +/***/ }), +/* 114 */, +/* 115 */, +/* 116 */, +/* 117 */, +/* 118 */, +/* 119 */, +/* 120 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { -Parser.prototype.ondeclaration = function(value) { - if (this._cbs.onprocessinginstruction) { - var name = this._getInstructionName(value); - this._cbs.onprocessinginstruction("!" + name, "!" + value); - } -}; +"use strict"; -Parser.prototype.onprocessinginstruction = function(value) { - if (this._cbs.onprocessinginstruction) { - var name = this._getInstructionName(value); - this._cbs.onprocessinginstruction("?" + name, "?" + value); - } -}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasChildren = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0; +var domelementtype_1 = __webpack_require__(435); +/** + * @param node Node to check. + * @returns `true` if the node is a `Element`, `false` otherwise. + */ +function isTag(node) { + return domelementtype_1.isTag(node); +} +exports.isTag = isTag; +/** + * @param node Node to check. + * @returns `true` if the node is a `NodeWithChildren`, `false` otherwise. + */ +function isCDATA(node) { + return node.type === "cdata" /* CDATA */; +} +exports.isCDATA = isCDATA; +/** + * @param node Node to check. + * @returns `true` if the node is a `DataNode`, `false` otherwise. + */ +function isText(node) { + return node.type === "text" /* Text */; +} +exports.isText = isText; +/** + * @param node Node to check. + * @returns `true` if the node is a `DataNode`, `false` otherwise. + */ +function isComment(node) { + return node.type === "comment" /* Comment */; +} +exports.isComment = isComment; +/** + * @param node Node to check. + * @returns `true` if the node is a `NodeWithChildren` (has children), `false` otherwise. + */ +function hasChildren(node) { + return Object.prototype.hasOwnProperty.call(node, "children"); +} +exports.hasChildren = hasChildren; -Parser.prototype.oncomment = function(value) { - this._updatePosition(4); - if (this._cbs.oncomment) this._cbs.oncomment(value); - if (this._cbs.oncommentend) this._cbs.oncommentend(); -}; +/***/ }), +/* 121 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _objectAssign = +/*#__PURE__*/ +__webpack_require__(289); -Parser.prototype.oncdata = function(value) { - this._updatePosition(1); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Create a new object with the own properties of the first object merged with + * the own properties of the second object. If a key exists in both objects, + * the value from the first object will be used. + * + * @func + * @memberOf R + * @since v0.26.0 + * @category Object + * @sig {k: v} -> {k: v} -> {k: v} + * @param {Object} l + * @param {Object} r + * @return {Object} + * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey + * @example + * + * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); + * //=> { 'name': 'fred', 'age': 40 } + * + * const resetToDefault = R.mergeLeft({x: 0}); + * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} + * @symb R.mergeLeft(a, b) = {...b, ...a} + */ - if (this._options.xmlMode || this._options.recognizeCDATA) { - if (this._cbs.oncdatastart) this._cbs.oncdatastart(); - if (this._cbs.ontext) this._cbs.ontext(value); - if (this._cbs.oncdataend) this._cbs.oncdataend(); - } else { - this.oncomment("[CDATA[" + value + "]]"); - } -}; -Parser.prototype.onerror = function(err) { - if (this._cbs.onerror) this._cbs.onerror(err); -}; +var mergeLeft = +/*#__PURE__*/ +_curry2(function mergeLeft(l, r) { + return _objectAssign({}, r, l); +}); -Parser.prototype.onend = function() { - if (this._cbs.onclosetag) { - for ( - var i = this._stack.length; - i > 0; - this._cbs.onclosetag(this._stack[--i]) - ); - } - if (this._cbs.onend) this._cbs.onend(); -}; +module.exports = mergeLeft; -//Resets the parser to a blank state, ready to parse a new HTML document -Parser.prototype.reset = function() { - if (this._cbs.onreset) this._cbs.onreset(); - this._tokenizer.reset(); +/***/ }), +/* 122 */, +/* 123 */, +/* 124 */, +/* 125 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - this._tagname = ""; - this._attribname = ""; - this._attribs = null; - this._stack = []; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Returns `true` if the first argument is less than the second; `false` + * otherwise. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Relation + * @sig Ord a => a -> a -> Boolean + * @param {*} a + * @param {*} b + * @return {Boolean} + * @see R.gt + * @example + * + * R.lt(2, 1); //=> false + * R.lt(2, 2); //=> false + * R.lt(2, 3); //=> true + * R.lt('a', 'z'); //=> true + * R.lt('z', 'a'); //=> false + */ - if (this._cbs.onparserinit) this._cbs.onparserinit(this); -}; -//Parses a complete HTML document and pushes it to the handler -Parser.prototype.parseComplete = function(data) { - this.reset(); - this.end(data); -}; +var lt = +/*#__PURE__*/ +_curry2(function lt(a, b) { + return a < b; +}); -Parser.prototype.write = function(chunk) { - this._tokenizer.write(chunk); -}; +module.exports = lt; -Parser.prototype.end = function(chunk) { - this._tokenizer.end(chunk); -}; +/***/ }), +/* 126 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -Parser.prototype.pause = function() { - this._tokenizer.pause(); -}; +var _checkForMethod = +/*#__PURE__*/ +__webpack_require__(417); -Parser.prototype.resume = function() { - this._tokenizer.resume(); -}; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Creates a new list with the separator interposed between elements. + * + * Dispatches to the `intersperse` method of the second argument, if present. + * + * @func + * @memberOf R + * @since v0.14.0 + * @category List + * @sig a -> [a] -> [a] + * @param {*} separator The element to add to the list. + * @param {Array} list The list to be interposed. + * @return {Array} The new list. + * @example + * + * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] + */ -//alias for backwards compat -Parser.prototype.parseChunk = Parser.prototype.write; -Parser.prototype.done = Parser.prototype.end; -module.exports = Parser; +var intersperse = +/*#__PURE__*/ +_curry2( +/*#__PURE__*/ +_checkForMethod('intersperse', function intersperse(separator, list) { + var out = []; + var idx = 0; + var length = list.length; + while (idx < length) { + if (idx === length - 1) { + out.push(list[idx]); + } else { + out.push(list[idx], separator); + } -/***/ }), -/* 179 */, -/* 180 */ -/***/ (function(module) { + idx += 1; + } -function _pipeP(f, g) { - return function () { - var ctx = this; - return f.apply(ctx, arguments).then(function (x) { - return g.call(ctx, x); - }); - }; -} + return out; +})); -module.exports = _pipeP; +module.exports = intersperse; /***/ }), -/* 181 */, -/* 182 */, -/* 183 */, -/* 184 */, -/* 185 */ +/* 127 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _curry1 = /*#__PURE__*/ __webpack_require__(721); -var apply = -/*#__PURE__*/ -__webpack_require__(422); - -var curryN = -/*#__PURE__*/ -__webpack_require__(535); - -var max = -/*#__PURE__*/ -__webpack_require__(793); - -var pluck = -/*#__PURE__*/ -__webpack_require__(819); - -var reduce = -/*#__PURE__*/ -__webpack_require__(484); - -var keys = -/*#__PURE__*/ -__webpack_require__(89); - -var values = +var liftN = /*#__PURE__*/ -__webpack_require__(256); // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map -// delegating calls to .map - - -function mapValues(fn, obj) { - return keys(obj).reduce(function (acc, key) { - acc[key] = fn(obj[key]); - return acc; - }, {}); -} +__webpack_require__(748); /** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. + * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other + * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R - * @since v0.20.0 + * @since v0.7.0 * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt + * @sig (*... -> *) -> ([*]... -> [*]) + * @param {Function} fn The function to lift into higher context + * @return {Function} The lifted function. + * @see R.liftN * @example * - * const getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } + * const madd3 = R.lift((a, b, c) => a + b + c); + * + * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] + * + * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); + * + * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] */ -var applySpec = +var lift = /*#__PURE__*/ -_curry1(function applySpec(spec) { - spec = mapValues(function (v) { - return typeof v == 'function' ? v : applySpec(v); - }, spec); - return curryN(reduce(max, 0, pluck('length', values(spec))), function () { - var args = arguments; - return mapValues(function (f) { - return apply(f, args); - }, spec); - }); +_curry1(function lift(fn) { + return liftN(fn.length, fn); }); -module.exports = applySpec; +module.exports = lift; /***/ }), -/* 186 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseGetTag = __webpack_require__(51), - isObjectLike = __webpack_require__(337); +/* 128 */ +/***/ (function(__unusedmodule, exports) { -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0; /** - * Checks if `value` is classified as a `Symbol` primitive or object. + * Remove an element from the dom * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example + * @param elem The element to be removed + */ +function removeElement(elem) { + if (elem.prev) + elem.prev.next = elem.next; + if (elem.next) + elem.next.prev = elem.prev; + if (elem.parent) { + var childs = elem.parent.children; + childs.splice(childs.lastIndexOf(elem), 1); + } +} +exports.removeElement = removeElement; +/** + * Replace an element in the dom + * + * @param elem The element to be replaced + * @param replacement The element to be added + */ +function replaceElement(elem, replacement) { + var prev = (replacement.prev = elem.prev); + if (prev) { + prev.next = replacement; + } + var next = (replacement.next = elem.next); + if (next) { + next.prev = replacement; + } + var parent = (replacement.parent = elem.parent); + if (parent) { + var childs = parent.children; + childs[childs.lastIndexOf(elem)] = replacement; + } +} +exports.replaceElement = replaceElement; +/** + * Append a child to an element. * - * _.isSymbol(Symbol.iterator); - * // => true + * @param elem The element to append to. + * @param child The element to be added as a child. + */ +function appendChild(elem, child) { + removeElement(child); + child.next = null; + child.parent = elem; + if (elem.children.push(child) > 1) { + var sibling = elem.children[elem.children.length - 2]; + sibling.next = child; + child.prev = sibling; + } + else { + child.prev = null; + } +} +exports.appendChild = appendChild; +/** + * Append an element after another. * - * _.isSymbol('abc'); - * // => false + * @param elem The element to append after. + * @param next The element be added. */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); +function append(elem, next) { + removeElement(next); + var parent = elem.parent; + var currNext = elem.next; + next.next = currNext; + next.prev = elem; + elem.next = next; + next.parent = parent; + if (currNext) { + currNext.prev = next; + if (parent) { + var childs = parent.children; + childs.splice(childs.lastIndexOf(currNext), 0, next); + } + } + else if (parent) { + parent.children.push(next); + } } - -module.exports = isSymbol; +exports.append = append; +/** + * Prepend a child to an element. + * + * @param elem The element to prepend before. + * @param child The element to be added as a child. + */ +function prependChild(elem, child) { + removeElement(child); + child.parent = elem; + child.prev = null; + if (elem.children.unshift(child) !== 1) { + var sibling = elem.children[1]; + sibling.prev = child; + child.next = sibling; + } + else { + child.next = null; + } +} +exports.prependChild = prependChild; +/** + * Prepend an element before another. + * + * @param elem The element to prepend before. + * @param prev The element be added. + */ +function prepend(elem, prev) { + removeElement(prev); + var parent = elem.parent; + if (parent) { + var childs = parent.children; + childs.splice(childs.indexOf(elem), 0, prev); + } + if (elem.prev) { + elem.prev.next = prev; + } + prev.parent = parent; + prev.prev = elem.prev; + prev.next = elem; + elem.prev = prev; +} +exports.prepend = prepend; /***/ }), -/* 187 */, -/* 188 */, -/* 189 */ +/* 129 */, +/* 130 */, +/* 131 */, +/* 132 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry2 = +var curry = /*#__PURE__*/ -__webpack_require__(830); +__webpack_require__(447); /** - * Returns whether or not an object or its prototype chain has a property with - * the specified name + * Returns the result of calling its first argument with the remaining + * arguments. This is occasionally useful as a converging function for + * [`R.converge`](#converge): the first branch can produce a function while the + * remaining branches produce values to be passed to that function as its + * arguments. * * @func * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. + * @since v0.9.0 + * @category Function + * @sig (*... -> a),*... -> a + * @param {Function} fn The function to apply to the remaining arguments. + * @param {...*} args Any number of positional arguments. + * @return {*} + * @see R.apply * @example * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; + * R.call(R.add, 1, 2); //=> 3 * - * const square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true + * const indentN = R.pipe(R.repeat(' '), + * R.join(''), + * R.replace(/^(?!$)/gm)); + * + * const format = R.converge(R.call, [ + * R.pipe(R.prop('indent'), indentN), + * R.prop('value') + * ]); + * + * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' + * @symb R.call(f, a, b) = f(a, b) */ -var hasIn = +var call = /*#__PURE__*/ -_curry2(function hasIn(prop, obj) { - return prop in obj; +curry(function call(fn) { + return fn.apply(this, Array.prototype.slice.call(arguments, 1)); }); - -module.exports = hasIn; +module.exports = call; /***/ }), -/* 190 */, -/* 191 */, -/* 192 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); +/* 133 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var request = __webpack_require__(330); -var universalUserAgent = __webpack_require__(796); +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); -const VERSION = "4.5.1"; +var curryN = +/*#__PURE__*/ +__webpack_require__(535); -class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - this.name = "GraphqlError"; - this.request = request; // Maintains proper stack trace (only available on V8) +var max = +/*#__PURE__*/ +__webpack_require__(793); - /* istanbul ignore next */ +var pluck = +/*#__PURE__*/ +__webpack_require__(819); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } +var reduce = +/*#__PURE__*/ +__webpack_require__(46); +/** + * Takes a list of predicates and returns a predicate that returns true for a + * given list of arguments if every one of the provided predicates is satisfied + * by those arguments. + * + * The function returned is a curried function whose arity matches that of the + * highest-arity predicate. + * + * @func + * @memberOf R + * @since v0.9.0 + * @category Logic + * @sig [(*... -> Boolean)] -> (*... -> Boolean) + * @param {Array} predicates An array of predicates to check + * @return {Function} The combined predicate + * @see R.anyPass + * @example + * + * const isQueen = R.propEq('rank', 'Q'); + * const isSpade = R.propEq('suit', '♠︎'); + * const isQueenOfSpades = R.allPass([isQueen, isSpade]); + * + * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false + * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true + */ -} -const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; -function graphql(request, query, options) { - options = typeof query === "string" ? options = Object.assign({ - query - }, options) : options = query; - const requestOptions = Object.keys(options).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = options[key]; - return result; - } +var allPass = +/*#__PURE__*/ +_curry1(function allPass(preds) { + return curryN(reduce(max, 0, pluck('length', preds)), function () { + var idx = 0; + var len = preds.length; - if (!result.variables) { - result.variables = {}; - } + while (idx < len) { + if (!preds[idx].apply(this, arguments)) { + return false; + } - result.variables[key] = options[key]; - return result; - }, {}); - return request(requestOptions).then(response => { - if (response.data.errors) { - throw new GraphqlError(requestOptions, { - data: response.data - }); + idx += 1; } - return response.data.data; + return true; }); -} - -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); +}); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; +module.exports = allPass; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint - }); -} +/***/ }), +/* 134 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { -const graphql$1 = withDefaults(request.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} +"use strict"; -exports.graphql = graphql$1; -exports.withCustomRequest = withCustomRequest; -//# sourceMappingURL=index.js.map +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(__webpack_require__(654), exports); +__exportStar(__webpack_require__(979), exports); +__exportStar(__webpack_require__(128), exports); +__exportStar(__webpack_require__(937), exports); +__exportStar(__webpack_require__(588), exports); +__exportStar(__webpack_require__(214), exports); +__exportStar(__webpack_require__(120), exports); /***/ }), -/* 193 */ +/* 135 */, +/* 136 */, +/* 137 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _checkForMethod = +var _curry2 = /*#__PURE__*/ -__webpack_require__(417); +__webpack_require__(830); -var _curry1 = +var _dispatchable = /*#__PURE__*/ -__webpack_require__(721); +__webpack_require__(968); -var slice = +var _xany = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(876); /** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). + * Returns `true` if at least one of the elements of the list match the predicate, + * `false` otherwise. * - * Dispatches to the `slice` method of the first argument, if present. + * Dispatches to the `any` method of the second argument, if present. + * + * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last + * @sig (a -> Boolean) -> [a] -> Boolean + * @param {Function} fn The predicate function. + * @param {Array} list The array to consider. + * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` + * otherwise. + * @see R.all, R.none, R.transduce * @example * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' + * const lessThan0 = R.flip(R.lt)(0); + * const lessThan2 = R.flip(R.lt)(2); + * R.any(lessThan0)([1, 2]); //=> false + * R.any(lessThan2)([1, 2]); //=> true */ -var tail = -/*#__PURE__*/ -_curry1( +var any = /*#__PURE__*/ -_checkForMethod('tail', +_curry2( /*#__PURE__*/ -slice(1, Infinity))); +_dispatchable(['any'], _xany, function any(fn, list) { + var idx = 0; + + while (idx < list.length) { + if (fn(list[idx])) { + return true; + } + + idx += 1; + } + + return false; +})); -module.exports = tail; +module.exports = any; /***/ }), -/* 194 */ +/* 138 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry3 = -/*#__PURE__*/ -__webpack_require__(78); - -var _has = -/*#__PURE__*/ -__webpack_require__(390); - -var _isArray = -/*#__PURE__*/ -__webpack_require__(930); - -var _isInteger = +var _curry2 = /*#__PURE__*/ -__webpack_require__(802); +__webpack_require__(830); -var assoc = +var pipeWith = /*#__PURE__*/ -__webpack_require__(414); +__webpack_require__(326); -var isNil = +var reverse = /*#__PURE__*/ -__webpack_require__(317); +__webpack_require__(528); /** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. + * Performs right-to-left function composition using transforming function. The last argument may have + * any arity; the remaining arguments must be unary. + * + * **Note:** The result of compose is not automatically curried. Transforming function is not used on the + * last argument. * * @func * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath + * @since v0.26.0 + * @category Function + * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) + * @param {...Function} ...functions The functions to compose + * @return {Function} + * @see R.compose, R.pipeWith * @example * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} + * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} + * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 + * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined + * + * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) */ -var assocPath = +var composeWith = /*#__PURE__*/ -_curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - - var idx = path[0]; - - if (path.length > 1) { - var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } +_curry2(function composeWith(xf, list) { + return pipeWith.apply(this, [xf, reverse(list)]); }); -module.exports = assocPath; - -/***/ }), -/* 195 */ -/***/ (function(module) { - -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -module.exports = baseGt; - +module.exports = composeWith; /***/ }), -/* 196 */ +/* 139 */, +/* 140 */ /***/ (function(module, __unusedexports, __webpack_require__) { +var _cloneRegExp = +/*#__PURE__*/ +__webpack_require__(480); + var _curry2 = /*#__PURE__*/ __webpack_require__(830); -var path = +var _isRegExp = /*#__PURE__*/ -__webpack_require__(756); +__webpack_require__(945); + +var toString = +/*#__PURE__*/ +__webpack_require__(854); /** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. + * Determines whether a given string matches a given regular expression. * * @func * @memberOf R - * @since v0.1.0 - * @category Object - * @typedefn Idx = String | Int - * @sig Idx -> {s: a} -> a | Undefined - * @param {String|Number} p The property name or array index - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path, R.nth + * @since v0.12.0 + * @category String + * @sig RegExp -> String -> Boolean + * @param {RegExp} pattern + * @param {String} str + * @return {Boolean} + * @see R.match * @example * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - * R.prop(0, [100]); //=> 100 - * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 + * R.test(/^x/, 'xyz'); //=> true + * R.test(/^y/, 'xyz'); //=> false */ -var prop = +var test = /*#__PURE__*/ -_curry2(function prop(p, obj) { - return path([p], obj); +_curry2(function test(pattern, str) { + if (!_isRegExp(pattern)) { + throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); + } + + return _cloneRegExp(pattern).test(str); }); -module.exports = prop; +module.exports = test; /***/ }), -/* 197 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/* 141 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { -module.exports = isexe -isexe.sync = sync +"use strict"; -var fs = __webpack_require__(747) -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} +var net = __webpack_require__(108); +var tls = __webpack_require__(16); +var http = __webpack_require__(363); +var https = __webpack_require__(34); +var events = __webpack_require__(614); +var assert = __webpack_require__(357); +var util = __webpack_require__(853); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; -function sync (path, options) { - return checkStat(fs.statSync(path), options) + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; } -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; } -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; - return ret + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); } +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } -/***/ }), -/* 198 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const core = __importStar(__webpack_require__(470)); -const search_1 = __webpack_require__(589); -const constants_1 = __webpack_require__(32); -const annotations_1 = __webpack_require__(147); -const ramda_1 = __webpack_require__(61); -const github_1 = __webpack_require__(469); -const MAX_ANNOTATIONS_PER_REQUEST = 50; -function run() { - return __awaiter(this, void 0, void 0, function* () { - try { - const path = core.getInput(constants_1.Inputs.Path, { required: true }); - const name = core.getInput(constants_1.Inputs.Name); - const title = core.getInput(constants_1.Inputs.Title); - const searchResult = yield search_1.findResults(path); - if (searchResult.filesToUpload.length === 0) { - core.warning(`No files were found for the provided path: ${path}. No results will be uploaded.`); - } - else { - core.info(`With the provided path, there will be ${searchResult.filesToUpload.length} results uploaded`); - core.debug(`Root artifact directory is ${searchResult.rootDirectory}`); - const annotations = ramda_1.chain(annotations_1.annotationsForPath, searchResult.filesToUpload); - core.debug(`Grouping ${annotations.length} annotations into chunks of ${MAX_ANNOTATIONS_PER_REQUEST}`); - const groupedAnnotations = annotations.length > MAX_ANNOTATIONS_PER_REQUEST - ? ramda_1.splitEvery(MAX_ANNOTATIONS_PER_REQUEST, annotations) - : [annotations]; - core.debug(`Created ${groupedAnnotations.length} buckets`); - for (const annotationSet of groupedAnnotations) { - yield createCheck(name, title, annotationSet, annotations.length); - } - } - } - catch (error) { - core.setFailed(error); - } - }); -} -function createCheck(name, title, annotations, numErrors) { - return __awaiter(this, void 0, void 0, function* () { - const octokit = github_1.getOctokit(core.getInput(constants_1.Inputs.Token)); - let sha = github_1.context.sha; - if (github_1.context.payload.pull_request) { - sha = github_1.context.payload.pull_request.head.sha; - } - const req = Object.assign(Object.assign({}, github_1.context.repo), { ref: sha }); - const res = yield octokit.checks.listForRef(req); - const existingCheckRun = res.data.check_runs.find(check => check.name === name); - if (!existingCheckRun) { - const createRequest = Object.assign(Object.assign({}, github_1.context.repo), { head_sha: sha, name, status: 'completed', conclusion: numErrors === 0 ? 'success' : 'neutral', output: { - title, - summary: `${numErrors} violation(s) found`, - annotations - } }); - yield octokit.checks.create(createRequest); - } - else { - const check_run_id = existingCheckRun.id; - const update_req = Object.assign(Object.assign({}, github_1.context.repo), { check_run_id, status: 'completed', conclusion: 'neutral', output: { - title, - summary: `${numErrors} violation(s) found`, - annotations - } }); - yield octokit.checks.update(update_req); - } - }); -} -run(); + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } -/***/ }), -/* 199 */, -/* 200 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); -"use strict"; + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } -//parse Empty Node as self closing node -const buildOptions = __webpack_require__(343).buildOptions; + function onError(cause) { + connectReq.removeAllListeners(); -const defaultOptions = { - attributeNamePrefix: '@_', - attrNodeName: false, - textNodeName: '#text', - ignoreAttributes: true, - cdataTagName: false, - cdataPositionChar: '\\c', - format: false, - indentBy: ' ', - supressEmptyNode: false, - tagValueProcessor: function(a) { - return a; - }, - attrValueProcessor: function(a) { - return a; - }, + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } }; -const props = [ - 'attributeNamePrefix', - 'attrNodeName', - 'textNodeName', - 'ignoreAttributes', - 'cdataTagName', - 'cdataPositionChar', - 'format', - 'indentBy', - 'supressEmptyNode', - 'tagValueProcessor', - 'attrValueProcessor', -]; - -function Parser(options) { - this.options = buildOptions(options, defaultOptions, props); - if (this.options.ignoreAttributes || this.options.attrNodeName) { - this.isAttribute = function(/*a*/) { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - if (this.options.cdataTagName) { - this.isCDATA = isCDATA; - } else { - this.isCDATA = function(/*a*/) { - return false; - }; +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; } - this.replaceCDATAstr = replaceCDATAstr; - this.replaceCDATAarr = replaceCDATAarr; + this.sockets.splice(pos, 1); - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = '>\n'; - this.newLine = '\n'; - } else { - this.indentate = function() { - return ''; - }; - this.tagEndChar = '>'; - this.newLine = ''; + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); } +}; - if (this.options.supressEmptyNode) { - this.buildTextNode = buildEmptyTextNode; - this.buildObjNode = buildEmptyObjNode; - } else { - this.buildTextNode = buildTextValNode; - this.buildObjNode = buildObjectNode; - } +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); - this.buildTextValNode = buildTextValNode; - this.buildObjectNode = buildObjectNode; + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); } -Parser.prototype.parse = function(jObj) { - return this.j2x(jObj, 0).val; -}; -Parser.prototype.j2x = function(jObj, level) { - let attrStr = ''; - let val = ''; - const keys = Object.keys(jObj); - const len = keys.length; - for (let i = 0; i < len; i++) { - const key = keys[i]; - if (typeof jObj[key] === 'undefined') { - // supress undefined node - } else if (jObj[key] === null) { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val += this.buildTextNode(jObj[key], key, '', level); - } else if (typeof jObj[key] !== 'object') { - //premitive type - const attr = this.isAttribute(key); - if (attr) { - attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"'; - } else if (this.isCDATA(key)) { - if (jObj[this.options.textNodeName]) { - val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]); - } else { - val += this.replaceCDATAstr('', jObj[key]); - } - } else { - //tag value - if (key === this.options.textNodeName) { - if (jObj[this.options.cdataTagName]) { - //value will added while processing cdata - } else { - val += this.options.tagValueProcessor('' + jObj[key]); - } - } else { - val += this.buildTextNode(jObj[key], key, '', level); - } - } - } else if (Array.isArray(jObj[key])) { - //repeated nodes - if (this.isCDATA(key)) { - val += this.indentate(level); - if (jObj[this.options.textNodeName]) { - val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]); - } else { - val += this.replaceCDATAarr('', jObj[key]); - } - } else { - //nested nodes - const arrLen = jObj[key].length; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === 'undefined') { - // supress undefined node - } else if (item === null) { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (typeof item === 'object') { - const result = this.j2x(item, level + 1); - val += this.buildObjNode(result.val, key, result.attrStr, level); - } else { - val += this.buildTextNode(item, key, '', level); - } - } - } - } else { - //nested node - if (this.options.attrNodeName && key === this.options.attrNodeName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"'; +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; } - } else { - const result = this.j2x(jObj[key], level + 1); - val += this.buildObjNode(result.val, key, result.attrStr, level); } } } - return {attrStr: attrStr, val: val}; -}; - -function replaceCDATAstr(str, cdata) { - str = this.options.tagValueProcessor('' + str); - if (this.options.cdataPositionChar === '' || str === '') { - return str + ''); + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); } - return str + this.newLine; + console.error.apply(console, args); } +} else { + debug = function() {}; } +exports.debug = debug; // for test -function buildObjectNode(val, key, attrStr, level) { - if (attrStr && !val.includes('<')) { - return ( - this.indentate(level) + - '<' + - key + - attrStr + - '>' + - val + - //+ this.newLine - // + this.indentate(level) - '' + - this.options.tagValueProcessor(val) + - ' a -> a -> Boolean + * @param {Number} a + * @param {Number} b + * @return {Boolean} + * @see R.lte + * @example + * + * R.gte(2, 1); //=> true + * R.gte(2, 2); //=> true + * R.gte(2, 3); //=> false + * R.gte('a', 'z'); //=> false + * R.gte('z', 'a'); //=> true + */ -function buildEmptyTextNode(val, key, attrStr, level) { - if (val !== '') { - return this.buildTextValNode(val, key, attrStr, level); - } else { - return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; - } -} -function indentate(level) { - return this.options.indentBy.repeat(level); -} +var gte = +/*#__PURE__*/ +_curry2(function gte(a, b) { + return a >= b; +}); -function isAttribute(name /*, options*/) { - if (name.startsWith(this.options.attributeNamePrefix)) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } -} +module.exports = gte; -function isCDATA(name) { - return name === this.options.cdataTagName; +/***/ }), +/* 145 */, +/* 146 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Returns whether or not an object or its prototype chain has a property with + * the specified name + * + * @func + * @memberOf R + * @since v0.7.0 + * @category Object + * @sig s -> {s: x} -> Boolean + * @param {String} prop The name of the property to check for. + * @param {Object} obj The object to query. + * @return {Boolean} Whether the property exists. + * @example + * + * function Rectangle(width, height) { + * this.width = width; + * this.height = height; + * } + * Rectangle.prototype.area = function() { + * return this.width * this.height; + * }; + * + * const square = new Rectangle(2, 2); + * R.hasIn('width', square); //=> true + * R.hasIn('area', square); //=> true + */ + + +var hasIn = +/*#__PURE__*/ +_curry2(function hasIn(prop, obj) { + return prop in obj; +}); + +module.exports = hasIn; + +/***/ }), +/* 147 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.annotationsForPath = void 0; +const core = __importStar(__webpack_require__(470)); +const fast_xml_parser_1 = __importDefault(__webpack_require__(989)); +const fs_1 = __importDefault(__webpack_require__(747)); +const path = __importStar(__webpack_require__(622)); +const github_1 = __webpack_require__(824); +const html_to_text_1 = __webpack_require__(103); +const unescape_1 = __importDefault(__webpack_require__(982)); +const ramda_1 = __webpack_require__(61); +const HTML_TO_TEXT_OPTIONS = { + wordwrap: false, + preserveNewlines: false, + uppercaseHeadings: false +}; +const XML_PARSE_OPTIONS = { + allowBooleanAttributes: true, + ignoreAttributes: false, + attributeNamePrefix: '' +}; +function asArray(arg) { + return !arg ? [] : Array.isArray(arg) ? arg : [arg]; +} +function annotationsForPath(resultFile) { + var _a, _b; + core.info(`Creating annotations for ${resultFile}`); + const root = process.env['GITHUB_WORKSPACE'] || ''; + const result = fast_xml_parser_1.default.parse(fs_1.default.readFileSync(resultFile, 'UTF-8'), XML_PARSE_OPTIONS); + const violations = asArray((_a = result === null || result === void 0 ? void 0 : result.BugCollection) === null || _a === void 0 ? void 0 : _a.BugInstance); + const bugPatterns = ramda_1.indexBy(a => a.type, asArray((_b = result === null || result === void 0 ? void 0 : result.BugCollection) === null || _b === void 0 ? void 0 : _b.BugPattern)); + core.info(`${resultFile} has ${violations.length} violations`); + const getFilePath = ramda_1.memoizeWith(ramda_1.identity, (sourcePath) => { + var _a, _b; + return asArray((_b = (_a = result === null || result === void 0 ? void 0 : result.BugCollection) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.SrcDir).find(srcDir => { + const combinedPath = path.join(srcDir, sourcePath); + const fileExists = fs_1.default.existsSync(combinedPath); + core.debug(`${combinedPath} ${fileExists ? 'does' : 'does not'} exists`); + return fileExists; + }); + }); + return ramda_1.chain(BugInstance => { + const annotationsForBug = []; + const srcDir = BugInstance.SourceLine.sourcepath && + getFilePath(BugInstance.SourceLine.sourcepath); + if (BugInstance.SourceLine.start && srcDir) { + const annotation = { + annotation_level: github_1.AnnotationLevel.warning, + path: path.relative(root, path.join(srcDir, BugInstance.SourceLine.sourcepath)), + start_line: Number(BugInstance.SourceLine.start || 1), + end_line: Number(BugInstance.SourceLine.end || BugInstance.SourceLine.start || 1), + title: BugInstance.type, + message: BugInstance.LongMessage, + raw_details: html_to_text_1.fromString(unescape_1.default(bugPatterns[BugInstance.type].Details), HTML_TO_TEXT_OPTIONS) + }; + annotationsForBug.push(annotation); + } + else { + core.info(`Skipping bug instance because source line start or source directory are missing (${BugInstance.SourceLine.sourcepath})`); + } + return annotationsForBug; + }, violations); } +exports.annotationsForPath = annotationsForPath; + + +/***/ }), +/* 148 */, +/* 149 */, +/* 150 */, +/* 151 */, +/* 152 */, +/* 153 */, +/* 154 */, +/* 155 */, +/* 156 */, +/* 157 */, +/* 158 */, +/* 159 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var curryN = +/*#__PURE__*/ +__webpack_require__(535); + +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); +/** + * Creates a thunk out of a function. A thunk delays a calculation until + * its result is needed, providing lazy evaluation of arguments. + * + * @func + * @memberOf R + * @since v0.26.0 + * @category Function + * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) + * @param {Function} fn A function to wrap in a thunk + * @return {Function} Expects arguments for `fn` and returns a new function + * that, when called, applies those arguments to `fn`. + * @see R.partial, R.partialRight + * @example + * + * R.thunkify(R.identity)(42)(); //=> 42 + * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 + */ -//formatting -//indentation -//\n after each closing or self closing tag -module.exports = Parser; +var thunkify = +/*#__PURE__*/ +_curry1(function thunkify(fn) { + return curryN(fn.length, function createThunk() { + var fnArgs = arguments; + return function invokeThunk() { + return fn.apply(this, fnArgs); + }; + }); +}); +module.exports = thunkify; /***/ }), -/* 201 */ +/* 160 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var nAry = +var invoker = /*#__PURE__*/ -__webpack_require__(425); +__webpack_require__(691); /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. + * The lower case version of a string. * * @func * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary + * @since v0.9.0 + * @category String + * @sig String -> String + * @param {String} str The string to lower case. + * @return {String} The lower case version of `str`. + * @see R.toUpper * @example * - * const takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * const takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) + * R.toLower('XYZ'); //=> 'xyz' */ -var binary = +var toLower = /*#__PURE__*/ -_curry1(function binary(fn) { - return nAry(2, fn); -}); - -module.exports = binary; +invoker(0, 'toLowerCase'); +module.exports = toLower; /***/ }), -/* 202 */, -/* 203 */ +/* 161 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _includes = /*#__PURE__*/ -__webpack_require__(958); +__webpack_require__(216); -var _map = +var _Set = /*#__PURE__*/ -__webpack_require__(626); +function () { + function _Set() { + /* globals Set */ + this._nativeSet = typeof Set === 'function' ? new Set() : null; + this._items = {}; + } -var _quote = -/*#__PURE__*/ -__webpack_require__(57); + // until we figure out why jsdoc chokes on this + // @param item The item to add to the Set + // @returns {boolean} true if the item did not exist prior, otherwise false + // + _Set.prototype.add = function (item) { + return !hasOrAdd(item, true, this); + }; // + // @param item The item to check for existence in the Set + // @returns {boolean} true if the item exists in the Set, otherwise false + // -var _toISOString = -/*#__PURE__*/ -__webpack_require__(291); -var keys = -/*#__PURE__*/ -__webpack_require__(89); + _Set.prototype.has = function (item) { + return hasOrAdd(item, false, this); + }; // + // Combines the logic for checking whether an item is a member of the set and + // for adding a new item to the set. + // + // @param item The item to check or add to the Set instance. + // @param shouldAdd If true, the item will be added to the set if it doesn't + // already exist. + // @param set The set instance to check or add to. + // @return {boolean} true if the item already existed, otherwise false. + // -var reject = -/*#__PURE__*/ -__webpack_require__(92); -function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _includes(y, xs) ? '' : _toString(y, xs); - }; // mapPairs :: (Object, [String]) -> [String] + return _Set; +}(); +function hasOrAdd(item, shouldAdd, set) { + var type = typeof item; + var prevSize, newSize; - var mapPairs = function (obj, keys) { - return _map(function (k) { - return _quote(k) + ': ' + recur(obj[k]); - }, keys.slice().sort()); - }; + switch (type) { + case 'string': + case 'number': + // distinguish between +0 and -0 + if (item === 0 && 1 / item === -Infinity) { + if (set._items['-0']) { + return true; + } else { + if (shouldAdd) { + set._items['-0'] = true; + } - switch (Object.prototype.toString.call(x)) { - case '[object Arguments]': - return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; + return false; + } + } // these types can all utilise the native Set - case '[object Array]': - return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) { - return /^\d+$/.test(k); - }, keys(x)))).join(', ') + ']'; - case '[object Boolean]': - return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; - case '[object Date]': - return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; + set._nativeSet.add(item); - case '[object Null]': - return 'null'; + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = {}; + set._items[type][item] = true; + } - case '[object Number]': - return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); + return false; + } else if (item in set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type][item] = true; + } - case '[object String]': - return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); + return false; + } + } - case '[object Undefined]': - return 'undefined'; + case 'boolean': + // set._items['boolean'] holds a two element array + // representing [ falseExists, trueExists ] + if (type in set._items) { + var bIdx = item ? 1 : 0; - default: - if (typeof x.toString === 'function') { - var repr = x.toString(); + if (set._items[type][bIdx]) { + return true; + } else { + if (shouldAdd) { + set._items[type][bIdx] = true; + } - if (repr !== '[object Object]') { - return repr; + return false; + } + } else { + if (shouldAdd) { + set._items[type] = item ? [false, true] : [true, false]; } + + return false; } - return '{' + mapPairs(x, keys(x)).join(', ') + '}'; - } -} + case 'function': + // compare functions for reference equality + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; -module.exports = _toString; + set._nativeSet.add(item); + + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } + + return false; + } + + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } + + return false; + } + + return true; + } + + case 'undefined': + if (set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type] = true; + } + + return false; + } + + case 'object': + if (item === null) { + if (!set._items['null']) { + if (shouldAdd) { + set._items['null'] = true; + } -/***/ }), -/* 204 */, -/* 205 */, -/* 206 */, -/* 207 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + return false; + } -"use strict"; + return true; + } + /* falls through */ -const util = __webpack_require__(343); -const buildOptions = __webpack_require__(343).buildOptions; -const x2j = __webpack_require__(170); + default: + // reduce the search size of heterogeneous sets by creating buckets + // for each type. + type = Object.prototype.toString.call(item); -//TODO: do it later -const convertToJsonString = function(node, options) { - options = buildOptions(options, x2j.defaultOptions, x2j.props); + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } - options.indentBy = options.indentBy || ''; - return _cToJsonStr(node, options, 0); -}; + return false; + } // scan through all previously applied items -const _cToJsonStr = function(node, options, level) { - let jObj = '{'; - //traver through all the children - const keys = Object.keys(node.child); + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } - for (let index = 0; index < keys.length; index++) { - var tagname = keys[index]; - if (node.child[tagname] && node.child[tagname].length > 1) { - jObj += '"' + tagname + '" : [ '; - for (var tag in node.child[tagname]) { - jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; - } - jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last - } else { - jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; - } - } - util.merge(jObj, node.attrsMap); - //add attrsMap as new children - if (util.isEmptyObject(jObj)) { - return util.isExist(node.val) ? node.val : ''; - } else { - if (util.isExist(node.val)) { - if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { - jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); + return false; } - } - } - //add value - if (jObj[jObj.length - 1] === ',') { - jObj = jObj.substr(0, jObj.length - 2); - } - return jObj + '}'; -}; -function stringval(v) { - if (v === true || v === false || !isNaN(v)) { - return v; - } else { - return '"' + v + '"'; + return true; } -} - -function indentate(options, level) { - return options.indentBy.repeat(level); -} +} // A simple Set type that honours R.equals semantics -exports.convertToJsonString = convertToJsonString; +module.exports = _Set; /***/ }), -/* 208 */ +/* 162 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseGetTag = __webpack_require__(51), - isObjectLike = __webpack_require__(337); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +var path = +/*#__PURE__*/ +__webpack_require__(756); /** - * The base implementation of `_.isArguments`. + * Acts as multiple `prop`: array of keys in, array of values out. Preserves + * order. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * @func + * @memberOf R + * @since v0.1.0 + * @category Object + * @sig [k] -> {k: v} -> [v] + * @param {Array} ps The property names to fetch + * @param {Object} obj The object to query + * @return {Array} The corresponding values or partially applied function. + * @example + * + * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] + * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] + * + * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); + * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} -module.exports = baseIsArguments; +var props = +/*#__PURE__*/ +_curry2(function props(ps, obj) { + return ps.map(function (p) { + return path([p], obj); + }); +}); + +module.exports = props; /***/ }), -/* 209 */, -/* 210 */, -/* 211 */ +/* 163 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _objectIs = +var _concat = /*#__PURE__*/ -__webpack_require__(268); +__webpack_require__(340); -var _curry2 = +var _curry3 = /*#__PURE__*/ -__webpack_require__(830); +__webpack_require__(78); + +var uniqWith = +/*#__PURE__*/ +__webpack_require__(780); /** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * Note this is merely a curried version of ES6 `Object.is`. + * Combines two lists into a set (i.e. no duplicates) composed of the elements + * of each list. Duplication is determined according to the value returned by + * applying the supplied predicate to two list elements. * * @func * @memberOf R - * @since v0.15.0 + * @since v0.1.0 * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} + * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] + * @param {Function} pred A predicate used to test whether two items are equal. + * @param {Array} list1 The first list. + * @param {Array} list2 The second list. + * @return {Array} The first and second lists concatenated, with + * duplicates removed. + * @see R.union * @example * - * const o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true + * const l1 = [{a: 1}, {a: 2}]; + * const l2 = [{a: 1}, {a: 4}]; + * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] */ -var identical = +var unionWith = /*#__PURE__*/ -_curry2(_objectIs); +_curry3(function unionWith(pred, list1, list2) { + return uniqWith(pred, _concat(list1, list2)); +}); -module.exports = identical; +module.exports = unionWith; /***/ }), -/* 212 */ +/* 164 */, +/* 165 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _curry2 = /*#__PURE__*/ __webpack_require__(830); /** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. + * Takes a list and returns a list of lists where each sublist's elements are + * all satisfied pairwise comparison according to the provided function. + * Only adjacent elements are passed to the comparison function. * * @func * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte + * @since v0.21.0 + * @category List + * @sig ((a, a) → Boolean) → [a] → [[a]] + * @param {Function} fn Function for determining whether two given (adjacent) + * elements should be in the same group + * @param {Array} list The array to group. Also accepts a string, which will be + * treated as a list of characters. + * @return {List} A list that contains sublists of elements, + * whose concatenations are equal to the original list. * @example * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ - - -var lte = -/*#__PURE__*/ -_curry2(function lte(a, b) { - return a <= b; -}); - -module.exports = lte; - -/***/ }), -/* 213 */ -/***/ (function(module) { - -function _complement(f) { - return function () { - return !f.apply(this, arguments); - }; -} - -module.exports = _complement; - -/***/ }), -/* 214 */ -/***/ (function(__unusedmodule, exports) { - -// removeSubsets -// Given an array of nodes, remove any member that is contained by another. -exports.removeSubsets = function(nodes) { - var idx = nodes.length, node, ancestor, replace; - - // Check if each node (or one of its ancestors) is already contained in the - // array. - while (--idx > -1) { - node = ancestor = nodes[idx]; - - // Temporarily remove the node under consideration - nodes[idx] = null; - replace = true; - - while (ancestor) { - if (nodes.indexOf(ancestor) > -1) { - replace = false; - nodes.splice(idx, 1); - break; - } - ancestor = ancestor.parent; - } - - // If the node has been found to be unique, re-insert it. - if (replace) { - nodes[idx] = node; - } - } - - return nodes; -}; - -// Source: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition -var POSITION = { - DISCONNECTED: 1, - PRECEDING: 2, - FOLLOWING: 4, - CONTAINS: 8, - CONTAINED_BY: 16 -}; - -// Compare the position of one node against another node in any other document. -// The return value is a bitmask with the following values: -// -// document order: -// > There is an ordering, document order, defined on all the nodes in the -// > document corresponding to the order in which the first character of the -// > XML representation of each node occurs in the XML representation of the -// > document after expansion of general entities. Thus, the document element -// > node will be the first node. Element nodes occur before their children. -// > Thus, document order orders element nodes in order of the occurrence of -// > their start-tag in the XML (after expansion of entities). The attribute -// > nodes of an element occur after the element and before its children. The -// > relative order of attribute nodes is implementation-dependent./ -// Source: -// http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order -// -// @argument {Node} nodaA The first node to use in the comparison -// @argument {Node} nodeB The second node to use in the comparison -// -// @return {Number} A bitmask describing the input nodes' relative position. -// See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for -// a description of these values. -var comparePos = exports.compareDocumentPosition = function(nodeA, nodeB) { - var aParents = []; - var bParents = []; - var current, sharedParent, siblings, aSibling, bSibling, idx; - - if (nodeA === nodeB) { - return 0; - } - - current = nodeA; - while (current) { - aParents.unshift(current); - current = current.parent; - } - current = nodeB; - while (current) { - bParents.unshift(current); - current = current.parent; - } - - idx = 0; - while (aParents[idx] === bParents[idx]) { - idx++; - } - - if (idx === 0) { - return POSITION.DISCONNECTED; - } + * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) + * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] + * + * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) + * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] + * + * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) + * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] + * + * R.groupWith(R.eqBy(isVowel), 'aestiou') + * //=> ['ae', 'st', 'iou'] + */ - sharedParent = aParents[idx - 1]; - siblings = sharedParent.children; - aSibling = aParents[idx]; - bSibling = bParents[idx]; - if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { - if (sharedParent === nodeB) { - return POSITION.FOLLOWING | POSITION.CONTAINED_BY; - } - return POSITION.FOLLOWING; - } else { - if (sharedParent === nodeA) { - return POSITION.PRECEDING | POSITION.CONTAINS; - } - return POSITION.PRECEDING; - } -}; +var groupWith = +/*#__PURE__*/ +_curry2(function (fn, list) { + var res = []; + var idx = 0; + var len = list.length; -// Sort an array of nodes based on their relative position in the document and -// remove any duplicate nodes. If the array contains nodes that do not belong -// to the same document, sort order is unspecified. -// -// @argument {Array} nodes Array of DOM nodes -// -// @returns {Array} collection of unique nodes, sorted in document order -exports.uniqueSort = function(nodes) { - var idx = nodes.length, node, position; + while (idx < len) { + var nextidx = idx + 1; - nodes = nodes.slice(); + while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { + nextidx += 1; + } - while (--idx > -1) { - node = nodes[idx]; - position = nodes.indexOf(node); - if (position > -1 && position < idx) { - nodes.splice(idx, 1); - } - } - nodes.sort(function(a, b) { - var relative = comparePos(a, b); - if (relative & POSITION.PRECEDING) { - return -1; - } else if (relative & POSITION.FOLLOWING) { - return 1; - } - return 0; - }); + res.push(list.slice(idx, nextidx)); + idx = nextidx; + } - return nodes; -}; + return res; +}); +module.exports = groupWith; /***/ }), -/* 215 */, -/* 216 */ +/* 166 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; - +var _arity = +/*#__PURE__*/ +__webpack_require__(451); -var ERR_INVALID_OPT_VALUE = __webpack_require__(563).codes.ERR_INVALID_OPT_VALUE; +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +function _createPartialApplicator(concat) { + return _curry2(function (fn, args) { + return _arity(Math.max(0, fn.length - args.length), function () { + return fn.apply(this, concat(args, arguments)); + }); + }); } -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - - return Math.floor(hwm); - } // Default value - +module.exports = _createPartialApplicator; - return state.objectMode ? 16 : 16 * 1024; -} +/***/ }), +/* 167 */ +/***/ (function(module) { -module.exports = { - getHighWaterMark: getHighWaterMark -}; +module.exports = {"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\"","QUOT":"\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}; /***/ }), -/* 217 */ +/* 168 */, +/* 169 */, +/* 170 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const url = __webpack_require__(835); -const http = __webpack_require__(363); -const https = __webpack_require__(583); -const pm = __webpack_require__(950); -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(url.parse(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - }); - } + +const util = __webpack_require__(343); +const buildOptions = __webpack_require__(343).buildOptions; +const xmlNode = __webpack_require__(66); +const regx = + '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' + .replace(/NAME/g, util.nameRegexp); + +//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); +//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); + +//polyfill +if (!Number.parseInt && window.parseInt) { + Number.parseInt = window.parseInt; } -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = url.parse(requestUrl); - return parsedUrl.protocol === 'https:'; +if (!Number.parseFloat && window.parseFloat) { + Number.parseFloat = window.parseFloat; } -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + +const defaultOptions = { + attributeNamePrefix: '@_', + attrNodeName: false, + textNodeName: '#text', + ignoreAttributes: true, + ignoreNameSpace: false, + allowBooleanAttributes: false, //a tag can have attributes without any value + //ignoreRootElement : false, + parseNodeValue: true, + parseAttributeValue: false, + arrayMode: false, + trimValues: true, //Trim string values of tag and attributes + cdataTagName: false, + cdataPositionChar: '\\c', + tagValueProcessor: function(a, tagName) { + return a; + }, + attrValueProcessor: function(a, attrName) { + return a; + }, + stopNodes: [] + //decodeStrict: false, +}; + +exports.defaultOptions = defaultOptions; + +const props = [ + 'attributeNamePrefix', + 'attrNodeName', + 'textNodeName', + 'ignoreAttributes', + 'ignoreNameSpace', + 'allowBooleanAttributes', + 'parseNodeValue', + 'parseAttributeValue', + 'arrayMode', + 'trimValues', + 'cdataTagName', + 'cdataPositionChar', + 'tagValueProcessor', + 'attrValueProcessor', + 'parseTrueNumberOnly', + 'stopNodes' +]; +exports.props = props; + +/** + * Trim -> valueProcessor -> parse value + * @param {string} tagName + * @param {string} val + * @param {object} options + */ +function processTagValue(tagName, val, options) { + if (val) { + if (options.trimValues) { + val = val.trim(); } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); + val = options.tagValueProcessor(val, tagName); + val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly); + } + + return val; +} + +function resolveNameSpace(tagname, options) { + if (options.ignoreNameSpace) { + const tags = tagname.split(':'); + const prefix = tagname.charAt(0) === '/' ? '/' : ''; + if (tags[0] === 'xmlns') { + return ''; } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + if (tags.length === 2) { + tagname = prefix + tags[1]; } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); + } + return tagname; +} + +function parseValue(val, shouldParse, parseTrueNumberOnly) { + if (shouldParse && typeof val === 'string') { + let parsed; + if (val.trim() === '' || isNaN(val)) { + parsed = val === 'true' ? true : val === 'false' ? false : val; + } else { + if (val.indexOf('0x') !== -1) { + //support hexa decimal + parsed = Number.parseInt(val, 16); + } else if (val.indexOf('.') !== -1) { + parsed = Number.parseFloat(val); + val = val.replace(/\.?0+$/, ""); + } else { + parsed = Number.parseInt(val, 10); + } + if (parseTrueNumberOnly) { + parsed = String(parsed) === val ? parsed : val; + } } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); + return parsed; + } else { + if (util.isExist(val)) { + return val; + } else { + return ''; } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + } +} + +//TODO: change regex to capture NS +//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); +const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g'); + +function buildAttributesMap(attrStr, options) { + if (!options.ignoreAttributes && typeof attrStr === 'string') { + attrStr = attrStr.replace(/\r?\n/g, ' '); + //attrStr = attrStr || attrStr.trim(); + + const matches = util.getAllMatches(attrStr, attrsRegx); + const len = matches.length; //don't make it inline + const attrs = {}; + for (let i = 0; i < len; i++) { + const attrName = resolveNameSpace(matches[i][1], options); + if (attrName.length) { + if (matches[i][4] !== undefined) { + if (options.trimValues) { + matches[i][4] = matches[i][4].trim(); + } + matches[i][4] = options.attrValueProcessor(matches[i][4], attrName); + attrs[options.attributeNamePrefix + attrName] = parseValue( + matches[i][4], + options.parseAttributeValue, + options.parseTrueNumberOnly + ); + } else if (options.allowBooleanAttributes) { + attrs[options.attributeNamePrefix + attrName] = true; + } + } } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + if (!Object.keys(attrs).length) { + return; } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + if (options.attrNodeName) { + const attrCollection = {}; + attrCollection[options.attrNodeName] = attrs; + return attrCollection; } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error('Client has already been disposed.'); + return attrs; + } +} + +const getTraversalObj = function(xmlData, options) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + options = buildOptions(options, defaultOptions, props); + const xmlObj = new xmlNode('!xml'); + let currentNode = xmlObj; + let textData = ""; + +//function match(xmlData){ + for(let i=0; i< xmlData.length; i++){ + const ch = xmlData[i]; + if(ch === '<'){ + if( xmlData[i+1] === '/') {//Closing Tag + const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") + let tagName = xmlData.substring(i+2,closeIndex).trim(); + + if(options.ignoreNameSpace){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + } } - let parsedUrl = url.parse(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = url.parse(redirectUrl); - if (parsedUrl.protocol == 'https:' && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } + + /* if (currentNode.parent) { + currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options); + } */ + if(currentNode){ + if(currentNode.val){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options); + }else{ + currentNode.val = processTagValue(tagName, textData , options); + } + } + + if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) { + currentNode.child = [] + if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}} + currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1) + } + currentNode = currentNode.parent; + textData = ""; + i = closeIndex; + } else if( xmlData[i+1] === '?') { + i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.") + } else if(xmlData.substr(i + 1, 3) === '!--') { + i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.") + } else if( xmlData.substr(i + 1, 2) === '!D') { + const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.") + const tagExp = xmlData.substring(i, closeIndex); + if(tagExp.indexOf("[") >= 0){ + i = xmlData.indexOf("]>", i) + 1; + }else{ + i = closeIndex; } - return response; - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); + }else if(xmlData.substr(i + 1, 2) === '![') { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2 + const tagExp = xmlData.substring(i + 9,closeIndex); + + //considerations + //1. CDATA will always have parent node + //2. A tag with CDATA is not a leaf node so it's value would be string type. + if(textData){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options); + textData = ""; } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof data === 'string') { - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + + if (options.cdataTagName) { + //add cdata node + const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp); + currentNode.addChild(childNode); + //for backtracking + currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar; + //add rest value to parent node + if (tagExp) { + childNode.val = tagExp; + } + } else { + currentNode.val = (currentNode.val || '') + (tagExp || ''); } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); + + i = closeIndex + 2; + }else {//Opening tag + const result = closingIndexForOpeningTag(xmlData, i+1) + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.indexOf(" "); + let tagName = tagExp; + if(separatorIndex !== -1){ + tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ''); + tagExp = tagExp.substr(separatorIndex + 1); } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); + + if(options.ignoreNameSpace){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + } } - else { - req.end(); + + //save text to parent node + if (currentNode && textData) { + if(currentNode.tagname !== '!xml'){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options); + } } + + if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag + + if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' + tagName = tagName.substr(0, tagName.length - 1); + tagExp = tagName; + }else{ + tagExp = tagExp.substr(0, tagExp.length - 1); + } + + const childNode = new xmlNode(tagName, currentNode, ''); + if(tagName !== tagExp){ + childNode.attrsMap = buildAttributesMap(tagExp, options); + } + currentNode.addChild(childNode); + }else{//opening tag + + const childNode = new xmlNode( tagName, currentNode ); + if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) { + childNode.startIndex=closeIndex; + } + if(tagName !== tagExp){ + childNode.attrsMap = buildAttributesMap(tagExp, options); + } + currentNode.addChild(childNode); + currentNode = childNode; + } + textData = ""; + i = closeIndex; + } + }else{ + textData += xmlData[i]; } + } + return xmlObj; +} + +function closingIndexForOpeningTag(data, i){ + let attrBoundary; + let tagExp = ""; + for (let index = i; index < data.length; index++) { + let ch = data[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = "";//reset + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === '>') { + return { + data: tagExp, + index: index + } + } else if (ch === '\t') { + ch = " " + } + tagExp += ch; + } +} + +function findClosingIndex(xmlData, str, i, errMsg){ + const closingIndex = xmlData.indexOf(str, i); + if(closingIndex === -1){ + throw new Error(errMsg) + }else{ + return closingIndex + str.length - 1; + } +} + +exports.getTraversalObj = getTraversalObj; + + +/***/ }), +/* 171 */, +/* 172 */, +/* 173 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); + +var drop = +/*#__PURE__*/ +__webpack_require__(12); +/** + * Returns a new list containing the last `n` elements of the given list. + * If `n > list.length`, returns a list of `list.length` elements. + * + * @func + * @memberOf R + * @since v0.16.0 + * @category List + * @sig Number -> [a] -> [a] + * @sig Number -> String -> String + * @param {Number} n The number of elements to return. + * @param {Array} xs The collection to consider. + * @return {Array} + * @see R.dropLast + * @example + * + * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] + * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] + * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] + * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] + * R.takeLast(3, 'ramda'); //=> 'mda' + */ + + +var takeLast = +/*#__PURE__*/ +_curry2(function takeLast(n, xs) { + return drop(n >= 0 ? xs.length - n : 0, xs); +}); + +module.exports = takeLast; + +/***/ }), +/* 174 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Context = void 0; +const fs_1 = __webpack_require__(747); +const os_1 = __webpack_require__(87); +class Context { /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + * Hydrate the context from the environment */ - getAgent(serverUrl) { - let parsedUrl = url.parse(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - this.handlers.forEach(handler => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = __webpack_require__(856); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - proxyAuth: proxyUrl.auth, - host: proxyUrl.hostname, - port: proxyUrl.port - } - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + constructor() { + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); } - return agent; + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + this.job = process.env.GITHUB_JOB; + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); + this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + return { owner, repo }; } - return value; - } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name }; - // not found leads to null obj returned - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map + +/***/ }), +/* 175 */, +/* 176 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _clone = +/*#__PURE__*/ +__webpack_require__(794); + +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); +/** + * Creates a deep copy of the value which may contain (nested) `Array`s and + * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are + * assigned by reference rather than copied + * + * Dispatches to a `clone` method if present. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Object + * @sig {*} -> {*} + * @param {*} value The object or array to clone + * @return {*} A deeply cloned copy of `val` + * @example + * + * const objects = [{}, {}, {}]; + * const objectsClone = R.clone(objects); + * objects === objectsClone; //=> false + * objects[0] === objectsClone[0]; //=> false + */ + + +var clone = +/*#__PURE__*/ +_curry1(function clone(value) { + return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true); +}); + +module.exports = clone; + +/***/ }), +/* 177 */, +/* 178 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Parser = void 0; +var Tokenizer_1 = __importDefault(__webpack_require__(843)); +var formTags = new Set([ + "input", + "option", + "optgroup", + "select", + "button", + "datalist", + "textarea", +]); +var pTag = new Set(["p"]); +var openImpliesClose = { + tr: new Set(["tr", "th", "td"]), + th: new Set(["th"]), + td: new Set(["thead", "th", "td"]), + body: new Set(["head", "link", "script"]), + li: new Set(["li"]), + p: pTag, + h1: pTag, + h2: pTag, + h3: pTag, + h4: pTag, + h5: pTag, + h6: pTag, + select: formTags, + input: formTags, + output: formTags, + button: formTags, + datalist: formTags, + textarea: formTags, + option: new Set(["option"]), + optgroup: new Set(["optgroup", "option"]), + dd: new Set(["dt", "dd"]), + dt: new Set(["dt", "dd"]), + address: pTag, + article: pTag, + aside: pTag, + blockquote: pTag, + details: pTag, + div: pTag, + dl: pTag, + fieldset: pTag, + figcaption: pTag, + figure: pTag, + footer: pTag, + form: pTag, + header: pTag, + hr: pTag, + main: pTag, + nav: pTag, + ol: pTag, + pre: pTag, + section: pTag, + table: pTag, + ul: pTag, + rt: new Set(["rt", "rp"]), + rp: new Set(["rt", "rp"]), + tbody: new Set(["thead", "tbody"]), + tfoot: new Set(["thead", "tbody"]), +}; +var voidElements = new Set([ + "area", + "base", + "basefont", + "br", + "col", + "command", + "embed", + "frame", + "hr", + "img", + "input", + "isindex", + "keygen", + "link", + "meta", + "param", + "source", + "track", + "wbr", +]); +var foreignContextElements = new Set(["math", "svg"]); +var htmlIntegrationElements = new Set([ + "mi", + "mo", + "mn", + "ms", + "mtext", + "annotation-xml", + "foreignObject", + "desc", + "title", +]); +var reNameEnd = /\s|\//; +var Parser = /** @class */ (function () { + function Parser(cbs, options) { + if (options === void 0) { options = {}; } + var _a, _b, _c, _d, _e; + /** The start index of the last event. */ + this.startIndex = 0; + /** The end index of the last event. */ + this.endIndex = null; + this.tagname = ""; + this.attribname = ""; + this.attribvalue = ""; + this.attribs = null; + this.stack = []; + this.foreignContext = []; + this.options = options; + this.cbs = cbs !== null && cbs !== void 0 ? cbs : {}; + this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode; + this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode; + this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this); + (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this); + } + Parser.prototype.updatePosition = function (initialOffset) { + if (this.endIndex === null) { + if (this.tokenizer.sectionStart <= initialOffset) { + this.startIndex = 0; } - catch (err) { - // Invalid resource (contents not json); leaving result obj null + else { + this.startIndex = this.tokenizer.sectionStart - initialOffset; } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = 'Failed request: (' + statusCode + ')'; - } - let err = new Error(msg); - // attach statusCode and body obj (if available) to the error object - err['statusCode'] = statusCode; - if (response.result) { - err['result'] = response.result; + } + else { + this.startIndex = this.endIndex + 1; + } + this.endIndex = this.tokenizer.getAbsoluteIndex(); + }; + // Tokenizer event handlers + Parser.prototype.ontext = function (data) { + var _a, _b; + this.updatePosition(1); + this.endIndex--; + (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data); + }; + Parser.prototype.onopentagname = function (name) { + var _a, _b; + if (this.lowerCaseTagNames) { + name = name.toLowerCase(); + } + this.tagname = name; + if (!this.options.xmlMode && + Object.prototype.hasOwnProperty.call(openImpliesClose, name)) { + var el = void 0; + while (this.stack.length > 0 && + openImpliesClose[name].has((el = this.stack[this.stack.length - 1]))) { + this.onclosetag(el); + } + } + if (this.options.xmlMode || !voidElements.has(name)) { + this.stack.push(name); + if (foreignContextElements.has(name)) { + this.foreignContext.push(true); + } + else if (htmlIntegrationElements.has(name)) { + this.foreignContext.push(false); + } + } + (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name); + if (this.cbs.onopentag) + this.attribs = {}; + }; + Parser.prototype.onopentagend = function () { + var _a, _b; + this.updatePosition(1); + if (this.attribs) { + (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs); + this.attribs = null; + } + if (!this.options.xmlMode && + this.cbs.onclosetag && + voidElements.has(this.tagname)) { + this.cbs.onclosetag(this.tagname); + } + this.tagname = ""; + }; + Parser.prototype.onclosetag = function (name) { + this.updatePosition(1); + if (this.lowerCaseTagNames) { + name = name.toLowerCase(); + } + if (foreignContextElements.has(name) || + htmlIntegrationElements.has(name)) { + this.foreignContext.pop(); + } + if (this.stack.length && + (this.options.xmlMode || !voidElements.has(name))) { + var pos = this.stack.lastIndexOf(name); + if (pos !== -1) { + if (this.cbs.onclosetag) { + pos = this.stack.length - pos; + while (pos--) { + // We know the stack has sufficient elements. + this.cbs.onclosetag(this.stack.pop()); + } } - reject(err); + else + this.stack.length = pos; } - else { - resolve(response); + else if (name === "p" && !this.options.xmlMode) { + this.onopentagname(name); + this.closeCurrentTag(); } - }); + } + else if (!this.options.xmlMode && (name === "br" || name === "p")) { + this.onopentagname(name); + this.closeCurrentTag(); + } + }; + Parser.prototype.onselfclosingtag = function () { + if (this.options.xmlMode || + this.options.recognizeSelfClosing || + this.foreignContext[this.foreignContext.length - 1]) { + this.closeCurrentTag(); + } + else { + this.onopentagend(); + } + }; + Parser.prototype.closeCurrentTag = function () { + var _a, _b; + var name = this.tagname; + this.onopentagend(); + /* + * Self-closing tags will be on the top of the stack + * (cheaper check than in onclosetag) + */ + if (this.stack[this.stack.length - 1] === name) { + (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name); + this.stack.pop(); + } + }; + Parser.prototype.onattribname = function (name) { + if (this.lowerCaseAttributeNames) { + name = name.toLowerCase(); + } + this.attribname = name; + }; + Parser.prototype.onattribdata = function (value) { + this.attribvalue += value; + }; + Parser.prototype.onattribend = function (quote) { + var _a, _b; + (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote); + if (this.attribs && + !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { + this.attribs[this.attribname] = this.attribvalue; + } + this.attribname = ""; + this.attribvalue = ""; + }; + Parser.prototype.getInstructionName = function (value) { + var idx = value.search(reNameEnd); + var name = idx < 0 ? value : value.substr(0, idx); + if (this.lowerCaseTagNames) { + name = name.toLowerCase(); + } + return name; + }; + Parser.prototype.ondeclaration = function (value) { + if (this.cbs.onprocessinginstruction) { + var name_1 = this.getInstructionName(value); + this.cbs.onprocessinginstruction("!" + name_1, "!" + value); + } + }; + Parser.prototype.onprocessinginstruction = function (value) { + if (this.cbs.onprocessinginstruction) { + var name_2 = this.getInstructionName(value); + this.cbs.onprocessinginstruction("?" + name_2, "?" + value); + } + }; + Parser.prototype.oncomment = function (value) { + var _a, _b, _c, _d; + this.updatePosition(4); + (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value); + (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); + }; + Parser.prototype.oncdata = function (value) { + var _a, _b, _c, _d, _e, _f; + this.updatePosition(1); + if (this.options.xmlMode || this.options.recognizeCDATA) { + (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a); + (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); + (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); + } + else { + this.oncomment("[CDATA[" + value + "]]"); + } + }; + Parser.prototype.onerror = function (err) { + var _a, _b; + (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + Parser.prototype.onend = function () { + var _a, _b; + if (this.cbs.onclosetag) { + for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i])) + ; + } + (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + /** + * Resets the parser to a blank state, ready to parse a new HTML document + */ + Parser.prototype.reset = function () { + var _a, _b, _c, _d; + (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a); + this.tokenizer.reset(); + this.tagname = ""; + this.attribname = ""; + this.attribs = null; + this.stack = []; + (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); + }; + /** + * Resets the parser, then parses a complete document and + * pushes it to the handler. + * + * @param data Document to parse. + */ + Parser.prototype.parseComplete = function (data) { + this.reset(); + this.end(data); + }; + /** + * Parses a chunk of data and calls the corresponding callbacks. + * + * @param chunk Chunk to parse. + */ + Parser.prototype.write = function (chunk) { + this.tokenizer.write(chunk); + }; + /** + * Parses the end of the buffer and clears the stack, calls onend. + * + * @param chunk Optional final chunk to parse. + */ + Parser.prototype.end = function (chunk) { + this.tokenizer.end(chunk); + }; + /** + * Pauses parsing. The parser won't emit events until `resume` is called. + */ + Parser.prototype.pause = function () { + this.tokenizer.pause(); + }; + /** + * Resumes parsing after `pause` was called. + */ + Parser.prototype.resume = function () { + this.tokenizer.resume(); + }; + /** + * Alias of `write`, for backwards compatibility. + * + * @param chunk Chunk to parse. + * @deprecated + */ + Parser.prototype.parseChunk = function (chunk) { + this.write(chunk); + }; + /** + * Alias of `end`, for backwards compatibility. + * + * @param chunk Optional final chunk to parse. + * @deprecated + */ + Parser.prototype.done = function (chunk) { + this.end(chunk); + }; + return Parser; +}()); +exports.Parser = Parser; + + +/***/ }), +/* 179 */, +/* 180 */, +/* 181 */, +/* 182 */, +/* 183 */, +/* 184 */, +/* 185 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); + +var apply = +/*#__PURE__*/ +__webpack_require__(422); + +var curryN = +/*#__PURE__*/ +__webpack_require__(535); + +var max = +/*#__PURE__*/ +__webpack_require__(793); + +var pluck = +/*#__PURE__*/ +__webpack_require__(819); + +var reduce = +/*#__PURE__*/ +__webpack_require__(46); + +var keys = +/*#__PURE__*/ +__webpack_require__(89); + +var values = +/*#__PURE__*/ +__webpack_require__(256); // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map +// delegating calls to .map + + +function mapValues(fn, obj) { + return keys(obj).reduce(function (acc, key) { + acc[key] = fn(obj[key]); + return acc; + }, {}); +} +/** + * Given a spec object recursively mapping properties to functions, creates a + * function producing an object of the same structure, by mapping each property + * to the result of calling its associated function with the supplied arguments. + * + * @func + * @memberOf R + * @since v0.20.0 + * @category Function + * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) + * @param {Object} spec an object recursively mapping properties to functions for + * producing the values for these properties. + * @return {Function} A function that returns an object of the same structure + * as `spec', with each property set to the value returned by calling its + * associated function with the supplied arguments. + * @see R.converge, R.juxt + * @example + * + * const getMetrics = R.applySpec({ + * sum: R.add, + * nested: { mul: R.multiply } + * }); + * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } + * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } + */ + + +var applySpec = +/*#__PURE__*/ +_curry1(function applySpec(spec) { + spec = mapValues(function (v) { + return typeof v == 'function' ? v : applySpec(v); + }, spec); + return curryN(reduce(max, 0, pluck('length', values(spec))), function () { + var args = arguments; + return mapValues(function (f) { + return apply(f, args); + }, spec); + }); +}); + +module.exports = applySpec; + +/***/ }), +/* 186 */, +/* 187 */, +/* 188 */, +/* 189 */, +/* 190 */, +/* 191 */, +/* 192 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +var request = __webpack_require__(753); +var universalUserAgent = __webpack_require__(107); + +const VERSION = "4.6.0"; + +class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + Object.assign(this, { + headers: response.headers + }); + this.name = "GraphqlError"; + this.request = request; // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + +} + +const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (typeof query === "string" && options && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + + const parsedOptions = typeof query === "string" ? Object.assign({ + query + }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + + if (!result.variables) { + result.variables = {}; + } + + result.variables[key] = parsedOptions[key]; + return result; + }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + + return request(requestOptions).then(response => { + if (response.data.errors) { + const headers = {}; + + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + + throw new GraphqlError(requestOptions, { + headers, + data: response.data + }); } + + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.request.endpoint + }); +} + +const graphql$1 = withDefaults(request.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); } -exports.HttpClient = HttpClient; + +exports.graphql = graphql$1; +exports.withCustomRequest = withCustomRequest; +//# sourceMappingURL=index.js.map /***/ }), -/* 218 */ +/* 193 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var add = +var _checkForMethod = /*#__PURE__*/ -__webpack_require__(792); +__webpack_require__(417); -var reduce = +var _curry1 = /*#__PURE__*/ -__webpack_require__(484); +__webpack_require__(721); + +var slice = +/*#__PURE__*/ +__webpack_require__(232); /** - * Adds together all the elements of a list. + * Returns all but the first element of the given list or string (or object + * with a `tail` method). + * + * Dispatches to the `slice` method of the first argument, if present. * * @func * @memberOf R * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce + * @category List + * @sig [a] -> [a] + * @sig String -> String + * @param {*} list + * @return {*} + * @see R.head, R.init, R.last * @example * - * R.sum([2,4,6,8,100,1]); //=> 121 + * R.tail([1, 2, 3]); //=> [2, 3] + * R.tail([1, 2]); //=> [2] + * R.tail([1]); //=> [] + * R.tail([]); //=> [] + * + * R.tail('abc'); //=> 'bc' + * R.tail('ab'); //=> 'b' + * R.tail('a'); //=> '' + * R.tail(''); //=> '' */ -var sum = +var tail = /*#__PURE__*/ -reduce(add, 0); -module.exports = sum; +_curry1( +/*#__PURE__*/ +_checkForMethod('tail', +/*#__PURE__*/ +slice(1, Infinity))); + +module.exports = tail; /***/ }), -/* 219 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 194 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var decode_json_1 = __importDefault(__webpack_require__(251)); -// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119 -function decodeCodePoint(codePoint) { - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return "\uFFFD"; - } - if (codePoint in decode_json_1.default) { - codePoint = decode_json_1.default[codePoint]; - } - var output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -} -exports.default = decodeCodePoint; +var _has = +/*#__PURE__*/ +__webpack_require__(390); + +var _isArray = +/*#__PURE__*/ +__webpack_require__(930); + +var _isInteger = +/*#__PURE__*/ +__webpack_require__(802); + +var assoc = +/*#__PURE__*/ +__webpack_require__(414); + +var isNil = +/*#__PURE__*/ +__webpack_require__(317); +/** + * Makes a shallow clone of an object, setting or overriding the nodes required + * to create the given path, and placing the specific value at the tail end of + * that path. Note that this copies and flattens prototype properties onto the + * new object as well. All non-primitive properties are copied by reference. + * + * @func + * @memberOf R + * @since v0.8.0 + * @category Object + * @typedefn Idx = String | Int + * @sig [Idx] -> a -> {a} -> {a} + * @param {Array} path the path to set + * @param {*} val The new value + * @param {Object} obj The object to clone + * @return {Object} A new object equivalent to the original except along the specified path. + * @see R.dissocPath + * @example + * + * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} + * + * // Any missing or non-object keys in path will be overridden + * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} + */ + + +var assocPath = +/*#__PURE__*/ +_curry3(function assocPath(path, val, obj) { + if (path.length === 0) { + return val; + } + + var idx = path[0]; + + if (path.length > 1) { + var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; + val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); + } + + if (_isInteger(idx) && _isArray(obj)) { + var arr = [].concat(obj); + arr[idx] = val; + return arr; + } else { + return assoc(idx, val, obj); + } +}); +module.exports = assocPath; /***/ }), -/* 220 */, -/* 221 */ +/* 195 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _curry2 = /*#__PURE__*/ __webpack_require__(830); /** - * Takes a list and a predicate and returns a pair of lists with the following properties: + * Builds a list from a seed value. Accepts an iterator function, which returns + * either false to stop iteration or an array of length 2 containing the value + * to add to the resulting list and the seed to be used in the next call to the + * iterator function. * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. + * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R - * @since v0.19.0 + * @since v0.10.0 * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} + * @sig (a -> [b]) -> * -> [b] + * @param {Function} fn The iterator function. receives one argument, `seed`, and returns + * either false to quit iteration or an array of length two to proceed. The element + * at index 0 of this array will be added to the resulting array, and the element + * at index 1 will be passed to the next call to `fn`. + * @param {*} seed The seed value. + * @return {Array} The final list. * @example * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] + * const f = n => n > 50 ? false : [-n, n + 10]; + * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] + * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] */ -var splitWhen = +var unfold = /*#__PURE__*/ -_curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; +_curry2(function unfold(fn, seed) { + var pair = fn(seed); + var result = []; - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; + while (pair && pair.length) { + result[result.length] = pair[0]; + pair = fn(pair[1]); } - return [prefix, Array.prototype.slice.call(list, idx)]; + return result; }); -module.exports = splitWhen; +module.exports = unfold; /***/ }), -/* 222 */, -/* 223 */ +/* 196 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry1 = +var _curry2 = /*#__PURE__*/ -__webpack_require__(721); +__webpack_require__(830); -var mean = +var path = /*#__PURE__*/ -__webpack_require__(257); +__webpack_require__(756); /** - * Returns the median of the given list of numbers. + * Returns a function that when supplied an object returns the indicated + * property of that object, if it exists. * * @func * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean + * @since v0.1.0 + * @category Object + * @typedefn Idx = String | Int + * @sig Idx -> {s: a} -> a | Undefined + * @param {String|Number} p The property name or array index + * @param {Object} obj The object to query + * @return {*} The value at `obj.p`. + * @see R.path, R.nth * @example * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN + * R.prop('x', {x: 100}); //=> 100 + * R.prop('x', {}); //=> undefined + * R.prop(0, [100]); //=> 100 + * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 */ -var median = +var prop = /*#__PURE__*/ -_curry1(function median(list) { - var len = list.length; +_curry2(function prop(p, obj) { + return path([p], obj); +}); - if (len === 0) { - return NaN; - } +module.exports = prop; - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); +/***/ }), +/* 197 */, +/* 198 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; }); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(__webpack_require__(470)); +const search_1 = __webpack_require__(589); +const constants_1 = __webpack_require__(32); +const annotations_1 = __webpack_require__(147); +const ramda_1 = __webpack_require__(61); +const github_1 = __webpack_require__(469); +const MAX_ANNOTATIONS_PER_REQUEST = 50; +function run() { + return __awaiter(this, void 0, void 0, function* () { + try { + const path = core.getInput(constants_1.Inputs.Path, { required: true }); + const name = core.getInput(constants_1.Inputs.Name); + const title = core.getInput(constants_1.Inputs.Title); + const threshold = core.getInput(constants_1.Inputs.Threshold); + const searchResult = yield search_1.findResults(path); + if (searchResult.filesToUpload.length === 0) { + core.warning(`No files were found for the provided path: ${path}. No results will be uploaded.`); + } + else { + core.info(`With the provided path, there will be ${searchResult.filesToUpload.length} results uploaded`); + core.debug(`Root artifact directory is ${searchResult.rootDirectory}`); + const annotations = ramda_1.chain(annotations_1.annotationsForPath, searchResult.filesToUpload); + core.debug(`Grouping ${annotations.length} annotations into chunks of ${MAX_ANNOTATIONS_PER_REQUEST}`); + const groupedAnnotations = annotations.length > MAX_ANNOTATIONS_PER_REQUEST + ? ramda_1.splitEvery(MAX_ANNOTATIONS_PER_REQUEST, annotations) + : [annotations]; + core.debug(`Created ${groupedAnnotations.length} buckets`); + let totalErrors = 0; + for (const annotationSet of groupedAnnotations) { + yield createCheck(name, title, Number(threshold), annotationSet); + totalErrors = totalErrors + annotationSet.length; + } + if (totalErrors != 0) { + core.setFailed(`${totalErrors} violation(s) uploaded`); + } + } + } + catch (error) { + core.setFailed(error); + } + }); +} +function createCheck(name, title, threshold, annotations) { + return __awaiter(this, void 0, void 0, function* () { + const octokit = github_1.getOctokit(core.getInput(constants_1.Inputs.Token)); + let sha = github_1.context.sha; + if (github_1.context.payload.pull_request) { + sha = github_1.context.payload.pull_request.head.sha; + } + const req = Object.assign(Object.assign({}, github_1.context.repo), { ref: sha }); + const res = yield octokit.checks.listForRef(req); + const existingCheckRun = res.data.check_runs.find(check => check.name === name); + const status = 'completed'; + const failure = 'failure'; + const success = 'success'; + const numErrors = annotations.length; + let conclusion = numErrors <= threshold ? success : failure; + if (!existingCheckRun) { + const createRequest = Object.assign(Object.assign({}, github_1.context.repo), { head_sha: sha, name, + status, + conclusion, output: { + title, + summary: `${numErrors} violation(s) found`, + annotations + } }); + yield octokit.checks.create(createRequest); + } + else { + const checkRunId = existingCheckRun.id; + conclusion = + existingCheckRun.conclusion === failure + ? failure + : numErrors <= threshold + ? success + : failure; + const updateReq = Object.assign(Object.assign({}, github_1.context.repo), { checkRunId, + status, + conclusion, output: { + title, + summary: `${numErrors} violation(s) found`, + annotations + } }); + yield octokit.checks.update(updateReq); + } + }); +} +run(); -module.exports = median; /***/ }), -/* 224 */, -/* 225 */, -/* 226 */ +/* 199 */, +/* 200 */ /***/ (function(module, __unusedexports, __webpack_require__) { "use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. +//parse Empty Node as self closing node +const buildOptions = __webpack_require__(343).buildOptions; -module.exports = Readable; -/**/ +const defaultOptions = { + attributeNamePrefix: '@_', + attrNodeName: false, + textNodeName: '#text', + ignoreAttributes: true, + cdataTagName: false, + cdataPositionChar: '\\c', + format: false, + indentBy: ' ', + supressEmptyNode: false, + tagValueProcessor: function(a) { + return a; + }, + attrValueProcessor: function(a) { + return a; + }, +}; -var Duplex; -/**/ +const props = [ + 'attributeNamePrefix', + 'attrNodeName', + 'textNodeName', + 'ignoreAttributes', + 'cdataTagName', + 'cdataPositionChar', + 'format', + 'indentBy', + 'supressEmptyNode', + 'tagValueProcessor', + 'attrValueProcessor', +]; -Readable.ReadableState = ReadableState; -/**/ +function Parser(options) { + this.options = buildOptions(options, defaultOptions, props); + if (this.options.ignoreAttributes || this.options.attrNodeName) { + this.isAttribute = function(/*a*/) { + return false; + }; + } else { + this.attrPrefixLen = this.options.attributeNamePrefix.length; + this.isAttribute = isAttribute; + } + if (this.options.cdataTagName) { + this.isCDATA = isCDATA; + } else { + this.isCDATA = function(/*a*/) { + return false; + }; + } + this.replaceCDATAstr = replaceCDATAstr; + this.replaceCDATAarr = replaceCDATAarr; -var EE = __webpack_require__(614).EventEmitter; + if (this.options.format) { + this.indentate = indentate; + this.tagEndChar = '>\n'; + this.newLine = '\n'; + } else { + this.indentate = function() { + return ''; + }; + this.tagEndChar = '>'; + this.newLine = ''; + } -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ + if (this.options.supressEmptyNode) { + this.buildTextNode = buildEmptyTextNode; + this.buildObjNode = buildEmptyObjNode; + } else { + this.buildTextNode = buildTextValNode; + this.buildObjNode = buildObjectNode; + } -/**/ + this.buildTextValNode = buildTextValNode; + this.buildObjectNode = buildObjectNode; +} +Parser.prototype.parse = function(jObj) { + return this.j2x(jObj, 0).val; +}; -var Stream = __webpack_require__(427); -/**/ +Parser.prototype.j2x = function(jObj, level) { + let attrStr = ''; + let val = ''; + const keys = Object.keys(jObj); + const len = keys.length; + for (let i = 0; i < len; i++) { + const key = keys[i]; + if (typeof jObj[key] === 'undefined') { + // supress undefined node + } else if (jObj[key] === null) { + val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (jObj[key] instanceof Date) { + val += this.buildTextNode(jObj[key], key, '', level); + } else if (typeof jObj[key] !== 'object') { + //premitive type + const attr = this.isAttribute(key); + if (attr) { + attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"'; + } else if (this.isCDATA(key)) { + if (jObj[this.options.textNodeName]) { + val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]); + } else { + val += this.replaceCDATAstr('', jObj[key]); + } + } else { + //tag value + if (key === this.options.textNodeName) { + if (jObj[this.options.cdataTagName]) { + //value will added while processing cdata + } else { + val += this.options.tagValueProcessor('' + jObj[key]); + } + } else { + val += this.buildTextNode(jObj[key], key, '', level); + } + } + } else if (Array.isArray(jObj[key])) { + //repeated nodes + if (this.isCDATA(key)) { + val += this.indentate(level); + if (jObj[this.options.textNodeName]) { + val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]); + } else { + val += this.replaceCDATAarr('', jObj[key]); + } + } else { + //nested nodes + const arrLen = jObj[key].length; + for (let j = 0; j < arrLen; j++) { + const item = jObj[key][j]; + if (typeof item === 'undefined') { + // supress undefined node + } else if (item === null) { + val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (typeof item === 'object') { + const result = this.j2x(item, level + 1); + val += this.buildObjNode(result.val, key, result.attrStr, level); + } else { + val += this.buildTextNode(item, key, '', level); + } + } + } + } else { + //nested node + if (this.options.attrNodeName && key === this.options.attrNodeName) { + const Ks = Object.keys(jObj[key]); + const L = Ks.length; + for (let j = 0; j < L; j++) { + attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"'; + } + } else { + const result = this.j2x(jObj[key], level + 1); + val += this.buildObjNode(result.val, key, result.attrStr, level); + } + } + } + return {attrStr: attrStr, val: val}; +}; +function replaceCDATAstr(str, cdata) { + str = this.options.tagValueProcessor('' + str); + if (this.options.cdataPositionChar === '' || str === '') { + return str + ''); + } + return str + this.newLine; + } +} -var OurUint8Array = global.Uint8Array || function () {}; +function buildObjectNode(val, key, attrStr, level) { + if (attrStr && !val.includes('<')) { + return ( + this.indentate(level) + + '<' + + key + + attrStr + + '>' + + val + + //+ this.newLine + // + this.indentate(level) + '' + + this.options.tagValueProcessor(val) + + '*/ - -var debugUtil = __webpack_require__(669); +function buildEmptyTextNode(val, key, attrStr, level) { + if (val !== '') { + return this.buildTextValNode(val, key, attrStr, level); + } else { + return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; + } +} -var debug; +function indentate(level) { + return this.options.indentBy.repeat(level); +} -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; +function isAttribute(name /*, options*/) { + if (name.startsWith(this.options.attributeNamePrefix)) { + return name.substr(this.attrPrefixLen); + } else { + return false; + } } -/**/ +function isCDATA(name) { + return name === this.options.cdataTagName; +} -var BufferList = __webpack_require__(912); +//formatting +//indentation +//\n after each closing or self closing tag -var destroyImpl = __webpack_require__(232); +module.exports = Parser; -var _require = __webpack_require__(216), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = __webpack_require__(563).codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. +/***/ }), +/* 201 */, +/* 202 */, +/* 203 */ +/***/ (function(module, __unusedexports, __webpack_require__) { +var _includes = +/*#__PURE__*/ +__webpack_require__(216); -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; +var _map = +/*#__PURE__*/ +__webpack_require__(626); -__webpack_require__(689)(Readable, Stream); +var _quote = +/*#__PURE__*/ +__webpack_require__(57); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; +var _toISOString = +/*#__PURE__*/ +__webpack_require__(291); -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. +var keys = +/*#__PURE__*/ +__webpack_require__(89); - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} +var reject = +/*#__PURE__*/ +__webpack_require__(92); -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || __webpack_require__(831); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. +function _toString(x, seen) { + var recur = function recur(y) { + var xs = seen.concat([x]); + return _includes(y, xs) ? '' : _toString(y, xs); + }; // mapPairs :: (Object, [String]) -> [String] - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" + var mapPairs = function (obj, keys) { + return _map(function (k) { + return _quote(k) + ': ' + recur(obj[k]); + }, keys.slice().sort()); + }; - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() + switch (Object.prototype.toString.call(x)) { + case '[object Arguments]': + return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. + case '[object Array]': + return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) { + return /^\d+$/.test(k); + }, keys(x)))).join(', ') + ']'; - this.sync = true; // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. + case '[object Boolean]': + return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; // Should close be emitted on destroy. Defaults to true. + case '[object Date]': + return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') + case '[object Null]': + return 'null'; - this.autoDestroy = !!options.autoDestroy; // has it been destroyed + case '[object Number]': + return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); - this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. + case '[object String]': + return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); - this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s + case '[object Undefined]': + return 'undefined'; - this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled + default: + if (typeof x.toString === 'function') { + var repr = x.toString(); - this.readingMore = false; - this.decoder = null; - this.encoding = null; + if (repr !== '[object Object]') { + return repr; + } + } - if (options.encoding) { - if (!StringDecoder) StringDecoder = __webpack_require__(674).StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; + return '{' + mapPairs(x, keys(x)).join(', ') + '}'; } } -function Readable(options) { - Duplex = Duplex || __webpack_require__(831); - if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); // legacy - - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} +module.exports = _toString; -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } +/***/ }), +/* 204 */, +/* 205 */, +/* 206 */, +/* 207 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed +"use strict"; - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; +const util = __webpack_require__(343); +const buildOptions = __webpack_require__(343).buildOptions; +const x2j = __webpack_require__(170); -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; // Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. +//TODO: do it later +const convertToJsonString = function(node, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + options.indentBy = options.indentBy || ''; + return _cToJsonStr(node, options, 0); +}; -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; +const _cToJsonStr = function(node, options, level) { + let jObj = '{'; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; + //traver through all the children + const keys = Object.keys(node.child); - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; + for (let index = 0; index < keys.length; index++) { + var tagname = keys[index]; + if (node.child[tagname] && node.child[tagname].length > 1) { + jObj += '"' + tagname + '" : [ '; + for (var tag in node.child[tagname]) { + jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; } - - skipChunkCheck = true; + jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last + } else { + jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; } - } else { - skipChunkCheck = true; } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; // Unshift should *always* be something directly out of read() - - -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); + util.merge(jObj, node.attrsMap); + //add attrsMap as new children + if (util.isEmptyObject(jObj)) { + return util.isExist(node.val) ? node.val : ''; } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } + if (util.isExist(node.val)) { + if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); } - } // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - - - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); } - - return er; -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; // backwards compatibility. - - -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = __webpack_require__(674).StringDecoder; - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 - - this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: - - var p = this._readableState.buffer.head; - var content = ''; - - while (p !== null) { - content += decoder.write(p.data); - p = p.next; + //add value + if (jObj[jObj.length - 1] === ',') { + jObj = jObj.substr(0, jObj.length - 2); } + return jObj + '}'; +}; - this._readableState.buffer.clear(); - - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; // Don't raise the hwm > 1GB - - -var MAX_HWM = 0x40000000; - -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; +function stringval(v) { + if (v === true || v === false || !isNaN(v)) { + return v; } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - - return n; -} // This function is designed to be inlinable, so please take care when making -// changes to the function body. - - -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } // If we're asking for more than the current hwm, then raise the hwm. - - - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; // Don't have enough - - if (!state.ended) { - state.needReadable = true; - return 0; - } - - return state.length; -} // you can override either this method, or the async _read(n) below. - - -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; + return '"' + v + '"'; } +} - n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. - - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - // if we need a readable event, then we need to do some reading. - +function indentate(options, level) { + return options.indentBy.repeat(level); +} - var doRead = state.needReadable; - debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some +exports.convertToJsonString = convertToJsonString; - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. +/***/ }), +/* 208 */, +/* 209 */, +/* 210 */, +/* 211 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; // if the length is currently zero, then we *need* a readable event. +var _objectIs = +/*#__PURE__*/ +__webpack_require__(268); - if (state.length === 0) state.needReadable = true; // call internal read method +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Returns true if its arguments are identical, false otherwise. Values are + * identical if they reference the same memory. `NaN` is identical to `NaN`; + * `0` and `-0` are not identical. + * + * Note this is merely a curried version of ES6 `Object.is`. + * + * @func + * @memberOf R + * @since v0.15.0 + * @category Relation + * @sig a -> a -> Boolean + * @param {*} a + * @param {*} b + * @return {Boolean} + * @example + * + * const o = {}; + * R.identical(o, o); //=> true + * R.identical(1, 1); //=> true + * R.identical(1, '1'); //=> false + * R.identical([], []); //=> false + * R.identical(0, -0); //=> false + * R.identical(NaN, NaN); //=> true + */ - this._read(state.highWaterMark); - state.sync = false; // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. +var identical = +/*#__PURE__*/ +_curry2(_objectIs); - if (!state.reading) n = howMuchToRead(nOrig, state); - } +module.exports = identical; - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; +/***/ }), +/* 212 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Returns `true` if the first argument is less than or equal to the second; + * `false` otherwise. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Relation + * @sig Ord a => a -> a -> Boolean + * @param {Number} a + * @param {Number} b + * @return {Boolean} + * @see R.gte + * @example + * + * R.lte(2, 1); //=> false + * R.lte(2, 2); //=> true + * R.lte(2, 3); //=> true + * R.lte('a', 'z'); //=> true + * R.lte('z', 'a'); //=> false + */ - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } +var lte = +/*#__PURE__*/ +_curry2(function lte(a, b) { + return a <= b; +}); - if (ret !== null) this.emit('data', ret); - return ret; -}; +module.exports = lte; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; +/***/ }), +/* 213 */ +/***/ (function(module) { - if (state.decoder) { - var chunk = state.decoder.end(); +function _complement(f) { + return function () { + return !f.apply(this, arguments); + }; +} - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } +module.exports = _complement; - state.ended = true; +/***/ }), +/* 214 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; +"use strict"; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0; +var tagtypes_1 = __webpack_require__(120); +/** + * Given an array of nodes, remove any member that is contained by another. + * + * @param nodes Nodes to filter. + * @returns Remaining nodes that aren't subtrees of each other. + */ +function removeSubsets(nodes) { + var idx = nodes.length; + /* + * Check if each node (or one of its ancestors) is already contained in the + * array. + */ + while (--idx >= 0) { + var node = nodes[idx]; + /* + * Remove the node if it is not unique. + * We are going through the array from the end, so we only + * have to check nodes that preceed the node under consideration in the array. + */ + if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) { + nodes.splice(idx, 1); + continue; + } + for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) { + if (nodes.includes(ancestor)) { + nodes.splice(idx, 1); + break; + } + } } - } -} // Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. - - -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } + return nodes; } - -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - - - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} // at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. - - -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } +exports.removeSubsets = removeSubsets; +/** + * Compare the position of one node against another node in any other document. + * The return value is a bitmask with the following values: + * + * Document order: + * > There is an ordering, document order, defined on all the nodes in the + * > document corresponding to the order in which the first character of the + * > XML representation of each node occurs in the XML representation of the + * > document after expansion of general entities. Thus, the document element + * > node will be the first node. Element nodes occur before their children. + * > Thus, document order orders element nodes in order of the occurrence of + * > their start-tag in the XML (after expansion of entities). The attribute + * > nodes of an element occur after the element and before its children. The + * > relative order of attribute nodes is implementation-dependent./ + * + * Source: + * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order + * + * @param nodeA The first node to use in the comparison + * @param nodeB The second node to use in the comparison + * @returns A bitmask describing the input nodes' relative position. + * + * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for + * a description of these values. + */ +function compareDocumentPosition(nodeA, nodeB) { + var aParents = []; + var bParents = []; + if (nodeA === nodeB) { + return 0; + } + var current = tagtypes_1.hasChildren(nodeA) ? nodeA : nodeA.parent; + while (current) { + aParents.unshift(current); + current = current.parent; + } + current = tagtypes_1.hasChildren(nodeB) ? nodeB : nodeB.parent; + while (current) { + bParents.unshift(current); + current = current.parent; + } + var maxIdx = Math.min(aParents.length, bParents.length); + var idx = 0; + while (idx < maxIdx && aParents[idx] === bParents[idx]) { + idx++; + } + if (idx === 0) { + return 1 /* DISCONNECTED */; + } + var sharedParent = aParents[idx - 1]; + var siblings = sharedParent.children; + var aSibling = aParents[idx]; + var bSibling = bParents[idx]; + if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { + if (sharedParent === nodeB) { + return 4 /* FOLLOWING */ | 16 /* CONTAINED_BY */; + } + return 4 /* FOLLOWING */; + } + if (sharedParent === nodeA) { + return 2 /* PRECEDING */ | 8 /* CONTAINS */; + } + return 2 /* PRECEDING */; } +exports.compareDocumentPosition = compareDocumentPosition; +/** + * Sort an array of nodes based on their relative position in the document and + * remove any duplicate nodes. If the array contains nodes that do not belong + * to the same document, sort order is unspecified. + * + * @param nodes Array of DOM nodes. + * @returns Collection of unique nodes, sorted in document order. + */ +function uniqueSort(nodes) { + nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); }); + nodes.sort(function (a, b) { + var relative = compareDocumentPosition(a, b); + if (relative & 2 /* PRECEDING */) { + return -1; + } + else if (relative & 4 /* FOLLOWING */) { + return 1; + } + return 0; + }); + return nodes; +} +exports.uniqueSort = uniqueSort; -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) // didn't get any data, stop spinning. - break; - } - - state.readingMore = false; -} // abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. - - -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; +/***/ }), +/* 215 */, +/* 216 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; +var _indexOf = +/*#__PURE__*/ +__webpack_require__(627); - case 1: - state.pipes = [state.pipes, dest]; - break; +function _includes(a, list) { + return _indexOf(list, a, 0) >= 0; +} - default: - state.pipes.push(dest); - break; - } +module.exports = _includes; - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); +/***/ }), +/* 217 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); +"use strict"; - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } +Object.defineProperty(exports, "__esModule", { value: true }); +const http = __webpack_require__(363); +const https = __webpack_require__(34); +const pm = __webpack_require__(950); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } } - } - - function onend() { - debug('onend'); - dest.end(); - } // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - - - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - - function cleanup() { - debug('cleanup'); // cleanup event handlers once the pipe is broken - - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - - src.pause(); + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); } - } // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - - - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } // Make sure our error handler is attached before userland ones. - - - prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. - - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - - dest.once('close', onclose); - - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } // tell the dest that it's being piped to - - - dest.emit('pipe', src); // start the flow if it hasn't been started already. - - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; // if we're not piping anywhere, then do nothing. - - if (state.pipesCount === 0) return this; // just one destination. most common case. - - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; // got a match. - - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } // slow case. multiple pipe destinations. - - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, { - hasUnpiped: false - }); + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); } - - return this; - } // try to find the right one. - - - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; // set up data events if they are asked for -// Ensure readable listeners eventually get something - - -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused - - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); } - } - - return res; -}; - -Readable.prototype.addListener = Readable.prototype.on; - -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} // pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. - - -Readable.prototype.resume = function () { - var state = this._readableState; - - if (!state.flowing) { - debug('resume'); // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - - state.flowing = !state.readableListening; - resume(this, state); - } - - state.paused = false; - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - debug('resume', state.reading); - - if (!state.reading) { - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - - this._readableState.paused = true; - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - - while (state.flowing && stream.read() !== null) { - ; - } -} // wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. - - -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); } - - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - - if (!ret) { - paused = true; - stream.pause(); + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + let parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); } - }); // proxy all the other methods. - // important when wrapping filters and duplexes. - - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } }; - }(i); - } - } // proxy certain important events. - - - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } // when we try to consume some more bytes, simply unpause the - // underlying stream. - - - this._read = function (n) { - debug('wrapped _read', n); - - if (paused) { - paused = false; - stream.resume(); + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } } - }; - - return this; -}; - -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = __webpack_require__(46); + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); } - - return createReadableStreamAsyncIterator(this); - }; -} - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); // exposed for testing purposes only. - -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); // Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. - -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. - - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); + }); + } + return info; } - } -} - -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = __webpack_require__(176); + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); } - - return from(Readable, iterable, opts); - }; -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - - return -1; -} - -/***/ }), -/* 227 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); -/** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [(a, a) -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * const alice = { - * name: 'alice', - * age: 40 - * }; - * const bob = { - * name: 'bob', - * age: 30 - * }; - * const clara = { - * name: 'clara', - * age: 40 - * }; - * const people = [clara, bob, alice]; - * const ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ - - -var sortWith = -/*#__PURE__*/ -_curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var result = 0; - var i = 0; - - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; } - - return result; - }); -}); - -module.exports = sortWith; - -/***/ }), -/* 228 */, -/* 229 */, -/* 230 */, -/* 231 */ -/***/ (function(module) { - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -module.exports = baseUnary; - - -/***/ }), -/* 232 */ -/***/ (function(module) { - -"use strict"; - // undocumented cb() API, needed for core, not for public API - -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __webpack_require__(413); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, + host: proxyUrl.hostname, + port: proxyUrl.port + } + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; } - - return this; - } // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - - if (this._readableState) { - this._readableState.destroyed = true; - } // if this is a duplex stream mark the writable part as destroyed as well - - - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); } - }); - - return this; -} - -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} - -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; - -/***/ }), -/* 233 */ -/***/ (function(module, exports, __webpack_require__) { - -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = __webpack_require__(293) -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + }); } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), -/* 234 */, -/* 235 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var _isArguments = -/*#__PURE__*/ -__webpack_require__(960); - -var _isArray = -/*#__PURE__*/ -__webpack_require__(930); - -var _isObject = -/*#__PURE__*/ -__webpack_require__(662); - -var _isString = -/*#__PURE__*/ -__webpack_require__(285); -/** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty`, - * `.prototype.empty` or implement the - * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ - - -var empty = -/*#__PURE__*/ -_curry1(function empty(x) { - return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { - return arguments; - }() : void 0 // else - ; -}); - -module.exports = empty; - -/***/ }), -/* 236 */, -/* 237 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); -/** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ - - -var not = -/*#__PURE__*/ -_curry1(function not(a) { - return !a; -}); - -module.exports = not; - -/***/ }), -/* 238 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). - - -var eos; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} - -var _require$codes = __webpack_require__(563).codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = __webpack_require__(740); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; // request.destroy just do .end - .abort is what we want - - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} - -function call(fn) { - fn(); -} - -function pipe(from, to) { - return from.pipe(to); -} - -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} - -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); } +exports.HttpClient = HttpClient; -module.exports = pipeline; /***/ }), -/* 239 */, -/* 240 */, -/* 241 */ +/* 218 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - - -module.exports = Writable; -/* */ - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} // It seems a linked list but it is not -// there will be only 2 of these for each stream - - -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ - - -var Duplex; -/**/ - -Writable.WritableState = WritableState; -/**/ - -var internalUtil = { - deprecate: __webpack_require__(917) -}; -/**/ - -/**/ - -var Stream = __webpack_require__(427); -/**/ - - -var Buffer = __webpack_require__(293).Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -var destroyImpl = __webpack_require__(232); - -var _require = __webpack_require__(216), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = __webpack_require__(563).codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; - -var errorOrDestroy = destroyImpl.errorOrDestroy; - -__webpack_require__(689)(Writable, Stream); - -function nop() {} - -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || __webpack_require__(831); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream - // contains buffers or objects. - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called - - this.finalCalled = false; // drain event flag. - - this.needDrain = false; // at the start of calling end() - - this.ending = false; // when end() has been called, and returned - - this.ended = false; // when 'finish' is emitted - - this.finished = false; // has it been destroyed - - this.destroyed = false; // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - - this.length = 0; // a flag to see when we're in the middle of a write. - - this.writing = false; // when true all writes will be buffered until .uncork() call - - this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - - this.sync = true; // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - - this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) - - this.onwrite = function (er) { - onwrite(stream, er); - }; // the callback that the user supplies to write(chunk,encoding,cb) - - - this.writecb = null; // the amount that is being written when _write is called. - - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - - this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - - this.prefinished = false; // True if the error was already emitted and should not be thrown again - - this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') - - this.autoDestroy = !!options.autoDestroy; // count buffered requests +var add = +/*#__PURE__*/ +__webpack_require__(792); - this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two +var reduce = +/*#__PURE__*/ +__webpack_require__(46); +/** + * Adds together all the elements of a list. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Math + * @sig [Number] -> Number + * @param {Array} list An array of numbers + * @return {Number} The sum of all the numbers in the list. + * @see R.reduce + * @example + * + * R.sum([2,4,6,8,100,1]); //=> 121 + */ - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; +var sum = +/*#__PURE__*/ +reduce(add, 0); +module.exports = sum; - while (current) { - out.push(current); - current = current.next; - } +/***/ }), +/* 219 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - return out; -}; +var _arity = +/*#__PURE__*/ +__webpack_require__(451); -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); // Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. +var _concat = +/*#__PURE__*/ +__webpack_require__(340); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned + * function evaluates the `tryer`; if it does not throw, it simply returns the + * result. If the `tryer` *does* throw, the returned function evaluates the + * `catcher` function and returns its result. Note that for effective + * composition with this function, both the `tryer` and `catcher` functions + * must return the same type of results. + * + * @func + * @memberOf R + * @since v0.20.0 + * @category Function + * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) + * @param {Function} tryer The function that may throw. + * @param {Function} catcher The function that will be evaluated if `tryer` throws. + * @return {Function} A new function that will catch exceptions and send then to the catcher. + * @example + * + * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true + * R.tryCatch(() => { throw 'foo'}, R.always('catched'))('bar') // => 'catched' + * R.tryCatch(R.times(R.identity), R.always([]))('s') // => [] + * R.tryCatch(() => { throw 'this is not a valid value'}, (err, value)=>({error : err, value }))('bar') // => {'error': 'this is not a valid value', 'value': 'bar'} + */ -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; +var tryCatch = +/*#__PURE__*/ +_curry2(function _tryCatch(tryer, catcher) { + return _arity(tryer.length, function () { + try { + return tryer.apply(this, arguments); + } catch (e) { + return catcher.apply(this, _concat([e], arguments)); } }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || __webpack_require__(831); // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); // legacy. - - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} // Otherwise people can pipe Writable streams, which is just wrong. - - -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; - -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb - - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} // Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. - - -function validChunk(stream, state, chunk, cb) { - var er; - - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - - return true; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; - -Writable.prototype.cork = function () { - this._writableState.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } }); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); // if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. - -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. - - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); // this can emit finish, and it will always happen - // after error - - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); // this can emit finish, but finish must - // always follow error - - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; +module.exports = tryCatch; - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } +/***/ }), +/* 220 */, +/* 221 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Takes a list and a predicate and returns a pair of lists with the following properties: + * + * - the result of concatenating the two output lists is equivalent to the input list; + * - none of the elements of the first output list satisfies the predicate; and + * - if the second output list is non-empty, its first element satisfies the predicate. + * + * @func + * @memberOf R + * @since v0.19.0 + * @category List + * @sig (a -> Boolean) -> [a] -> [[a], [a]] + * @param {Function} pred The predicate that determines where the array is split. + * @param {Array} list The array to be split. + * @return {Array} + * @example + * + * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] + */ -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} // Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. +var splitWhen = +/*#__PURE__*/ +_curry2(function splitWhen(pred, list) { + var idx = 0; + var len = list.length; + var prefix = []; -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); + while (idx < len && !pred(list[idx])) { + prefix.push(list[idx]); + idx += 1; } -} // if there's something in the buffer waiting, then process it - - -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } + return [prefix, Array.prototype.slice.call(list, idx)]; +}); - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - - if (state.writing) { - break; - } - } +module.exports = splitWhen; - if (entry === null) state.lastBufferedRequest = null; - } +/***/ }), +/* 222 */, +/* 223 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - state.bufferedRequest = entry; - state.bufferProcessing = false; -} +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; +var mean = +/*#__PURE__*/ +__webpack_require__(988); +/** + * Returns the median of the given list of numbers. + * + * @func + * @memberOf R + * @since v0.14.0 + * @category Math + * @sig [Number] -> Number + * @param {Array} list + * @return {Number} + * @see R.mean + * @example + * + * R.median([2, 9, 7]); //=> 7 + * R.median([7, 2, 10, 9]); //=> 8 + * R.median([]); //=> NaN + */ -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; +var median = +/*#__PURE__*/ +_curry1(function median(list) { + var len = list.length; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; + if (len === 0) { + return NaN; } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks - - if (state.corked) { - state.corked = 1; - this.uncork(); - } // ignore unnecessary end() calls. + var width = 2 - len % 2; + var idx = (len - width) / 2; + return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { + return a < b ? -1 : a > b ? 1 : 0; + }).slice(idx, idx + width)); +}); +module.exports = median; - if (!state.ending) endWritable(this, state, cb); - return this; -}; +/***/ }), +/* 224 */, +/* 225 */, +/* 226 */, +/* 227 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +/** + * Sorts a list according to a list of comparators. + * + * @func + * @memberOf R + * @since v0.23.0 + * @category Relation + * @sig [(a, a) -> Number] -> [a] -> [a] + * @param {Array} functions A list of comparator functions. + * @param {Array} list The list to sort. + * @return {Array} A new list sorted according to the comarator functions. + * @example + * + * const alice = { + * name: 'alice', + * age: 40 + * }; + * const bob = { + * name: 'bob', + * age: 30 + * }; + * const clara = { + * name: 'clara', + * age: 40 + * }; + * const people = [clara, bob, alice]; + * const ageNameSort = R.sortWith([ + * R.descend(R.prop('age')), + * R.ascend(R.prop('name')) + * ]); + * ageNameSort(people); //=> [alice, clara, bob] + */ -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; +var sortWith = +/*#__PURE__*/ +_curry2(function sortWith(fns, list) { + return Array.prototype.slice.call(list, 0).sort(function (a, b) { + var result = 0; + var i = 0; - if (err) { - errorOrDestroy(stream, err); + while (result === 0 && i < fns.length) { + result = fns[i](a, b); + i += 1; } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); + return result; }); -} - -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - - if (need) { - prefinish(stream, state); +}); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); +module.exports = sortWith; - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; +/***/ }), +/* 228 */, +/* 229 */, +/* 230 */, +/* 231 */, +/* 232 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } +var _checkForMethod = +/*#__PURE__*/ +__webpack_require__(417); - return need; -} +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); +/** + * Returns the elements of the given list or string (or object with a `slice` + * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). + * + * Dispatches to the `slice` method of the third argument, if present. + * + * @func + * @memberOf R + * @since v0.1.4 + * @category List + * @sig Number -> Number -> [a] -> [a] + * @sig Number -> Number -> String -> String + * @param {Number} fromIndex The start index (inclusive). + * @param {Number} toIndex The end index (exclusive). + * @param {*} list + * @return {*} + * @example + * + * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] + * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] + * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] + * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] + * R.slice(0, 3, 'ramda'); //=> 'ram' + */ -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } +var slice = +/*#__PURE__*/ +_curry3( +/*#__PURE__*/ +_checkForMethod('slice', function slice(fromIndex, toIndex, list) { + return Array.prototype.slice.call(list, fromIndex, toIndex); +})); - state.ended = true; - stream.writable = false; -} +module.exports = slice; -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; +/***/ }), +/* 233 */, +/* 234 */, +/* 235 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } // reuse the free corkReq. +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); +var _isArguments = +/*#__PURE__*/ +__webpack_require__(960); - state.corkedRequestsFree.next = corkReq; -} +var _isArray = +/*#__PURE__*/ +__webpack_require__(930); -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } +var _isObject = +/*#__PURE__*/ +__webpack_require__(662); - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed +var _isString = +/*#__PURE__*/ +__webpack_require__(285); +/** + * Returns the empty value of its argument's type. Ramda defines the empty + * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other + * types are supported if they define `.empty`, + * `.prototype.empty` or implement the + * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). + * + * Dispatches to the `empty` method of the first argument, if present. + * + * @func + * @memberOf R + * @since v0.3.0 + * @category Function + * @sig a -> a + * @param {*} x + * @return {*} + * @example + * + * R.empty(Just(42)); //=> Nothing() + * R.empty([1, 2, 3]); //=> [] + * R.empty('unicorns'); //=> '' + * R.empty({x: 1, y: 2}); //=> {} + */ - this._writableState.destroyed = value; - } +var empty = +/*#__PURE__*/ +_curry1(function empty(x) { + return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { + return arguments; + }() : void 0 // else + ; }); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; +module.exports = empty; -/***/ }), -/* 242 */, -/* 243 */, -/* 244 */, -/* 245 */, -/* 246 */ +/***/ }), +/* 236 */, +/* 237 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var _curry3 = +var _curry1 = /*#__PURE__*/ -__webpack_require__(78); +__webpack_require__(721); /** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. + * A function that returns the `!` of its argument. It will return `true` when + * passed false-y value, and `false` when passed a truth-y one. * * @func * @memberOf R - * @since v0.18.0 + * @since v0.1.0 * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless, R.cond + * @sig * -> Boolean + * @param {*} a any value + * @return {Boolean} the logical inverse of passed argument. + * @see R.complement * @example * - * // truncate :: String -> String - * const truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' + * R.not(true); //=> false + * R.not(false); //=> true + * R.not(0); //=> true + * R.not(1); //=> false */ -var when = +var not = /*#__PURE__*/ -_curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; +_curry1(function not(a) { + return !a; }); -module.exports = when; +module.exports = not; /***/ }), -/* 247 */, -/* 248 */ +/* 238 */, +/* 239 */, +/* 240 */, +/* 241 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var isFunction = __webpack_require__(10), - isMasked = __webpack_require__(159), - isObject = __webpack_require__(988), - toSource = __webpack_require__(473); - +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + * Returns a list of all the properties, including prototype properties, of the + * supplied object. + * Note that the order of the output array is not guaranteed to be consistent + * across different JS platforms. + * + * @func + * @memberOf R + * @since v0.2.0 + * @category Object + * @sig {k: v} -> [v] + * @param {Object} obj The object to extract values from + * @return {Array} An array of the values of the object's own and prototype properties. + * @see R.values, R.keysIn + * @example + * + * const F = function() { this.x = 'X'; }; + * F.prototype.y = 'Y'; + * const f = new F(); + * R.valuesIn(f); //=> ['X', 'Y'] */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +var valuesIn = +/*#__PURE__*/ +_curry1(function valuesIn(obj) { + var prop; + var vs = []; -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; + for (prop in obj) { + vs[vs.length] = obj[prop]; } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} -module.exports = baseIsNative; + return vs; +}); +module.exports = valuesIn; /***/ }), +/* 242 */, +/* 243 */, +/* 244 */, +/* 245 */, +/* 246 */, +/* 247 */, +/* 248 */, /* 249 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -13717,7 +8888,7 @@ __webpack_require__(830); var slice = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(232); /** * Returns a new list containing the last `n` elements of a given list, passing * each value to the supplied predicate function, and terminating when the @@ -13761,63 +8932,69 @@ module.exports = takeLastWhile; /***/ }), /* 250 */, -/* 251 */ -/***/ (function(module) { - -module.exports = {"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}; - -/***/ }), -/* 252 */ -/***/ (function(module) { - -module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}; - -/***/ }), -/* 253 */, -/* 254 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var curryN = -/*#__PURE__*/ -__webpack_require__(535); - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); -/** - * Creates a thunk out of a function. A thunk delays a calculation until - * its result is needed, providing lazy evaluation of arguments. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) - * @param {Function} fn A function to wrap in a thunk - * @return {Function} Expects arguments for `fn` and returns a new function - * that, when called, applies those arguments to `fn`. - * @see R.partial, R.partialRight - * @example - * - * R.thunkify(R.identity)(42)(); //=> 42 - * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 - */ +/* 251 */, +/* 252 */, +/* 253 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { +"use strict"; -var thunkify = -/*#__PURE__*/ -_curry1(function thunkify(fn) { - return curryN(fn.length, function createThunk() { - var fnArgs = arguments; - return function invokeThunk() { - return fn.apply(this, fnArgs); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; +var entities_json_1 = __importDefault(__webpack_require__(353)); +var legacy_json_1 = __importDefault(__webpack_require__(167)); +var xml_json_1 = __importDefault(__webpack_require__(370)); +var decode_codepoint_1 = __importDefault(__webpack_require__(737)); +var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; +exports.decodeXML = getStrictDecoder(xml_json_1.default); +exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); +function getStrictDecoder(map) { + var replace = getReplacer(map); + return function (str) { return String(str).replace(strictEntityRe, replace); }; +} +var sorter = function (a, b) { return (a < b ? 1 : -1); }; +exports.decodeHTML = (function () { + var legacy = Object.keys(legacy_json_1.default).sort(sorter); + var keys = Object.keys(entities_json_1.default).sort(sorter); + for (var i = 0, j = 0; i < keys.length; i++) { + if (legacy[j] === keys[i]) { + keys[i] += ";?"; + j++; + } + else { + keys[i] += ";"; + } + } + var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); + var replace = getReplacer(entities_json_1.default); + function replacer(str) { + if (str.substr(-1) !== ";") + str += ";"; + return replace(str); + } + // TODO consider creating a merged map + return function (str) { return String(str).replace(re, replacer); }; +})(); +function getReplacer(map) { + return function replace(str) { + if (str.charAt(1) === "#") { + var secondChar = str.charAt(2); + if (secondChar === "X" || secondChar === "x") { + return decode_codepoint_1.default(parseInt(str.substr(3), 16)); + } + return decode_codepoint_1.default(parseInt(str.substr(2), 10)); + } + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + return map[str.slice(1, -1)] || str; }; - }); -}); +} -module.exports = thunkify; /***/ }), +/* 254 */, /* 255 */, /* 256 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -13867,43 +9044,7 @@ _curry1(function values(obj) { module.exports = values; /***/ }), -/* 257 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var sum = -/*#__PURE__*/ -__webpack_require__(218); -/** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ - - -var mean = -/*#__PURE__*/ -_curry1(function mean(list) { - return sum(list) / list.length; -}); - -module.exports = mean; - -/***/ }), +/* 257 */, /* 258 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -13913,7 +9054,7 @@ __webpack_require__(830); var always = /*#__PURE__*/ -__webpack_require__(370); +__webpack_require__(657); var times = /*#__PURE__*/ @@ -14072,44 +9213,44 @@ module.exports = _isArrayLike; /***/ }), /* 261 */ -/***/ (function(module) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/***/ (function(module, __unusedexports, __webpack_require__) { -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); +var is = +/*#__PURE__*/ +__webpack_require__(452); /** - * The base implementation of `_.repeat` which doesn't coerce arguments. + * Returns `true` if the specified object property is of the given type; + * `false` otherwise. * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. + * @func + * @memberOf R + * @since v0.16.0 + * @category Type + * @sig Type -> String -> Object -> Boolean + * @param {Function} type + * @param {String} name + * @param {*} obj + * @return {Boolean} + * @see R.is, R.propSatisfies + * @example + * + * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true + * R.propIs(Number, 'x', {x: 'foo'}); //=> false + * R.propIs(Number, 'x', {}); //=> false */ -function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - return result; -} -module.exports = baseRepeat; +var propIs = +/*#__PURE__*/ +_curry3(function propIs(type, name, obj) { + return is(type, obj[name]); +}); +module.exports = propIs; /***/ }), /* 262 */ @@ -14121,7 +9262,7 @@ __webpack_require__(721); var _isNumber = /*#__PURE__*/ -__webpack_require__(582); +__webpack_require__(571); /** * Returns the number of elements in the array by returning `list.length`. * @@ -14148,55 +9289,7 @@ _curry1(function length(list) { module.exports = length; /***/ }), -/* 263 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseToString = __webpack_require__(280), - castSlice = __webpack_require__(532), - charsEndIndex = __webpack_require__(397), - stringToArray = __webpack_require__(854), - toString = __webpack_require__(428); - -/** Used to match leading and trailing whitespace. */ -var reTrimEnd = /\s+$/; - -/** - * Removes trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trimEnd(' abc '); - * // => ' abc' - * - * _.trimEnd('-_-abc-_-', '_-'); - * // => '-_-abc' - */ -function trimEnd(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrimEnd, ''); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), - end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; - - return castSlice(strSymbols, 0, end).join(''); -} - -module.exports = trimEnd; - - -/***/ }), +/* 263 */, /* 264 */, /* 265 */, /* 266 */ @@ -14255,7 +9348,7 @@ module.exports = typeof Object.is === 'function' ? Object.is : _objectIs; var _arity = /*#__PURE__*/ -__webpack_require__(456); +__webpack_require__(451); var _curry2 = /*#__PURE__*/ @@ -14337,58 +9430,58 @@ module.exports = _xmap; /* 272 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var identity = __webpack_require__(83), - overRest = __webpack_require__(430), - setToString = __webpack_require__(70); +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); + +var assocPath = +/*#__PURE__*/ +__webpack_require__(194); + +var lens = +/*#__PURE__*/ +__webpack_require__(596); +var path = +/*#__PURE__*/ +__webpack_require__(756); /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * Returns a lens whose focus is the specified path. * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @func + * @memberOf R + * @since v0.19.0 + * @category Object + * @typedefn Idx = String | Int + * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s + * @sig [Idx] -> Lens s a + * @param {Array} path The path to use. + * @return {Lens} + * @see R.view, R.set, R.over + * @example + * + * const xHeadYLens = R.lensPath(['x', 0, 'y']); + * + * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); + * //=> 2 + * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); + * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} + * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); + * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; - - -/***/ }), -/* 273 */ -/***/ (function(module) { - -module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}; - -/***/ }), -/* 274 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -var shebangRegex = __webpack_require__(816); - -module.exports = function (str) { - var match = str.match(shebangRegex); - - if (!match) { - return null; - } - var arr = match[0].replace(/#! ?/, '').split(' '); - var bin = arr[0].split('/').pop(); - var arg = arr[1]; - return (bin === 'env' ? - arg : - bin + (arg ? ' ' + arg : '') - ); -}; +var lensPath = +/*#__PURE__*/ +_curry1(function lensPath(p) { + return lens(path(p), assocPath(p)); +}); +module.exports = lensPath; /***/ }), +/* 273 */, +/* 274 */, /* 275 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -14448,75 +9541,40 @@ _curry2(function difference(first, second) { module.exports = difference; /***/ }), -/* 276 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseIndexOf = __webpack_require__(571); - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsStartIndex; - - -/***/ }), +/* 276 */, /* 277 */, /* 278 */, /* 279 */, /* 280 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var Symbol = __webpack_require__(498), - arrayMap = __webpack_require__(766), - isArray = __webpack_require__(143), - isSymbol = __webpack_require__(186); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +/***/ (function(module) { -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +module.exports = register; -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; + + if (!options) { + options = {}; } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} -module.exports = baseToString; + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} /***/ }), @@ -14551,12 +9609,7 @@ exports.create = create; //# sourceMappingURL=glob.js.map /***/ }), -/* 282 */ -/***/ (function(module) { - -module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}; - -/***/ }), +/* 282 */, /* 283 */, /* 284 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -14623,7 +9676,7 @@ module.exports = _isString; var _includes = /*#__PURE__*/ -__webpack_require__(958); +__webpack_require__(216); var _curry2 = /*#__PURE__*/ @@ -14659,131 +9712,531 @@ _curry2(_includes); module.exports = includes; /***/ }), -/* 288 */ +/* 288 */, +/* 289 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var _has = +/*#__PURE__*/ +__webpack_require__(390); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + + +function _objectAssign(target) { + if (target == null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + var idx = 1; + var length = arguments.length; + + while (idx < length) { + var source = arguments[idx]; + + if (source != null) { + for (var nextKey in source) { + if (_has(nextKey, source)) { + output[nextKey] = source[nextKey]; + } + } + } + + idx += 1; + } + + return output; +} + +module.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign; + +/***/ }), +/* 290 */, +/* 291 */ /***/ (function(module) { /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. + * Polyfill from . + */ +var pad = function pad(n) { + return (n < 10 ? '0' : '') + n; +}; + +var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { + return d.toISOString(); +} : function _toISOString(d) { + return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; +}; + +module.exports = _toISOString; + +/***/ }), +/* 292 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + + +const { trimCharacter } = __webpack_require__(322); +// eslint-disable-next-line no-unused-vars +const { StackItem, BlockStackItem, TableCellStackItem, TableRowStackItem, TableStackItem, TransformerStackItem } + = __webpack_require__(587); +const { tableToString } = __webpack_require__(489); +const { WhitespaceProcessor } = __webpack_require__(952); + +// eslint-disable-next-line import/no-unassigned-import +__webpack_require__(837); + + +/** + * Helps to build text from inline and block elements. * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. + * @class BlockTextBuilder */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); +class BlockTextBuilder { + + /** + * Creates an instance of BlockTextBuilder. + * + * @param { Options } options HtmlToText options. + */ + constructor (options) { + this.options = options; + this.whitepaceProcessor = new WhitespaceProcessor(options); + /** @type { StackItem } */ + this._stackItem = new BlockStackItem(options); + /** @type { TransformerStackItem } */ + this._wordTransformer = undefined; + } + + /** + * Put a word-by-word transform function onto the transformations stack. + * + * Mainly used for uppercasing. Can be bypassed to add unformatted text such as URLs. + * + * Word transformations applied before wrapping. + * + * @param { (str: string) => string } wordTransform Word transformation function. + */ + pushWordTransform (wordTransform) { + this._wordTransformer = new TransformerStackItem(this._wordTransformer, wordTransform); + } + + /** + * Remove a function from the word transformations stack. + * + * @returns { (str: string) => string } A function that was removed. + */ + popWordTransform () { + if (!this._wordTransformer) { return undefined; } + const transform = this._wordTransformer.transform; + this._wordTransformer = this._wordTransformer.next; + return transform; + } + + /** @returns { (str: string) => string } */ + _getCombinedWordTransformer () { + const applyTransformer = (str, transformer) => + ((transformer) ? applyTransformer(transformer.transform(str), transformer.next) : str); + return (str) => applyTransformer(str, this._wordTransformer); + } + + _popStackItem () { + const item = this._stackItem; + this._stackItem = item.next; + return item; + } + + /** + * Add a line break into currently built block. + */ + addLineBreak () { + if (!( + this._stackItem instanceof BlockStackItem + || this._stackItem instanceof TableCellStackItem + )) { return; } + if (this._stackItem.isPre) { + this._stackItem.rawText += '\n'; + } else { + this._stackItem.inlineTextBuilder.startNewLine(); + } + } + + /** + * Allow to break line in case directly following text will not fit. + */ + addWordBreakOpportunity () { + if ( + this._stackItem instanceof BlockStackItem + || this._stackItem instanceof TableCellStackItem + ) { + this._stackItem.inlineTextBuilder.wordBreakOpportunity = true; + } + } + + /** + * Add a node inline into the currently built block. + * + * @param { string } str + * Text content of a node to add. + * + * @param { object | boolean } [ optionsObjectOrNoWordTransform ] + * Object holding the parameters of the operation. + * + * Boolean value is deprecated. + * + * @param { boolean } [ optionsObjectOrNoWordTransform.noWordTransform = false ] + * Ignore word transformers if there are any. + */ + addInline (str, optionsObjectOrNoWordTransform = {}) { + if (typeof optionsObjectOrNoWordTransform === 'object') { + this._addInline(str, optionsObjectOrNoWordTransform); + } else { + this._addInline(str, { noWordTransform: optionsObjectOrNoWordTransform }); + } + } + + _addInline (str, { noWordTransform = false } = {}) { + if (!( + this._stackItem instanceof BlockStackItem + || this._stackItem instanceof TableCellStackItem + )) { return; } + + if (this._stackItem.isPre) { + this._stackItem.rawText += str; + return; + } + + if ( + this.whitepaceProcessor.testContainsWords(str) || // There are words to add; + (str.length && !this._stackItem.stashedLineBreaks) // or at least spaces to take into account. + ) { + if (this._stackItem.stashedLineBreaks) { + this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks); + } + this.whitepaceProcessor.shrinkWrapAdd( + str, + this._stackItem.inlineTextBuilder, + (this._wordTransformer && !noWordTransform) ? this._getCombinedWordTransformer() : undefined + ); + this._stackItem.stashedLineBreaks = 0; // inline text doesn't introduce line breaks + } + } + + /** + * Start building a new block. + * + * @param { object | number } [optionsObjectOrLeadingLineBreaks] + * Object holding the parameters of the block. + * + * Number value is deprecated. + * + * @param { number } [optionsObjectOrLeadingLineBreaks.leadingLineBreaks = 1] + * This block should have at least this number of line breaks to separate if from any preceding block. + * + * @param { number } [optionsObjectOrLeadingLineBreaks.reservedLineLength = 0] + * Reserve this number of characters on each line for block markup. + * + * @param { boolean } [optionsObjectOrLeadingLineBreaks.isPre = false] + * Should HTML whitespace be preserved inside this block. + * + * @param { number } [reservedLineLength] + * Deprecated. + * + * @param { boolean } [isPre] + * Deprecated. + */ + openBlock (optionsObjectOrLeadingLineBreaks = {}, reservedLineLength = undefined, isPre = undefined) { + if (typeof optionsObjectOrLeadingLineBreaks === 'object') { + this._openBlock(optionsObjectOrLeadingLineBreaks); + } else { + this._openBlock({ + isPre: isPre, + leadingLineBreaks: optionsObjectOrLeadingLineBreaks, + reservedLineLength: reservedLineLength, + }); + } + } + + _openBlock ({ leadingLineBreaks = 1, reservedLineLength = 0, isPre = false } = {}) { + const maxLineLength = Math.max(20, this._stackItem.inlineTextBuilder.maxLineLength - reservedLineLength); + this._stackItem = new BlockStackItem( + this.options, + this._stackItem, + leadingLineBreaks, + maxLineLength + ); + if (isPre) { this._stackItem.isPre = true; } + } - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; + /** + * Finalize currently built block, add it's content to the parent block. + * + * @param { object | number } [optionsObjectOrTrailingLineBreaks] + * Object holding the parameters of the block. + * + * Number value is deprecated. + * + * @param { number } [optionsObjectOrTrailingLineBreaks.trailingLineBreaks = 1] + * This block should have at least this number of line breaks to separate it from any following block. + * + * @param { (str: string) => string } [optionsObjectOrTrailingLineBreaks.blockTransform = undefined] + * A function to transform the block text before adding to the parent block. + * This happens after word wrap and should be used in combination with reserved line length + * in order to keep line lengths correct. + * Used for whole block markup. + * + * @param { (str: string) => string } [blockTransform] + * Deprecated. + */ + closeBlock (optionsObjectOrTrailingLineBreaks = {}, blockTransform = undefined) { + if (typeof optionsObjectOrTrailingLineBreaks === 'object') { + this._closeBlock(optionsObjectOrTrailingLineBreaks); + } else { + this._closeBlock({ + trailingLineBreaks: optionsObjectOrTrailingLineBreaks, + blockTransform: blockTransform, + }); } } - return -1; -} -module.exports = baseFindIndex; + _closeBlock ({ trailingLineBreaks = 1, blockTransform = undefined } = {}) { + const block = this._popStackItem(); + const blockText = (blockTransform) ? blockTransform(getText(block)) : getText(block); + addText(this._stackItem, blockText, block.leadingLineBreaks, Math.max(block.stashedLineBreaks, trailingLineBreaks)); + } + /** + * Start building a table. + */ + openTable () { + this._stackItem = new TableStackItem(this._stackItem); + } -/***/ }), -/* 289 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + /** + * Start building a table row. + */ + openTableRow () { + if (!(this._stackItem instanceof TableStackItem)) { + throw new Error('Can\'t add table row to something that is not a table! Check the formatter.'); + } + this._stackItem = new TableRowStackItem(this._stackItem); + } -var _has = -/*#__PURE__*/ -__webpack_require__(390); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + /** + * Start building a table cell. + * + * @param { object | number } [optionsObjectOrMaxColumnWidth = undefined] + * Object holding the parameters of the cell. + * + * Number value is deprecated. + * + * @param { number } [optionsObjectOrMaxColumnWidth.maxColumnWidth = undefined] + * Wrap cell content to this width. Fall back to global wordwrap value if undefined. + */ + openTableCell (optionsObjectOrMaxColumnWidth = {}) { + if (typeof optionsObjectOrMaxColumnWidth === 'object') { + this._openTableCell(optionsObjectOrMaxColumnWidth); + } else { + this._openTableCell({ maxColumnWidth: optionsObjectOrMaxColumnWidth }); + } + } + _openTableCell ({ maxColumnWidth = undefined } = {}) { + if (!(this._stackItem instanceof TableRowStackItem)) { + throw new Error('Can\'t add table cell to something that is not a table row! Check the formatter.'); + } + this._stackItem = new TableCellStackItem(this.options, this._stackItem, maxColumnWidth); + } -function _objectAssign(target) { - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); + /** + * Finalize currently built table cell and add it to parent table row's cells. + * + * @param { object | number } [optionsObjectOrColspan] + * Object holding the parameters of the cell. + * + * Number value is deprecated. + * + * @param { number } [optionsObjectOrColspan.colspan = 1] How many columns this cell should occupy. + * @param { number } [optionsObjectOrColspan.rowspan = 1] How many rows this cell should occupy. + * + * @param { number } [rowspan] Deprecated. + */ + closeTableCell (optionsObjectOrColspan = {}, rowspan = undefined) { + if (typeof optionsObjectOrColspan === 'object') { + this._closeTableCell(optionsObjectOrColspan); + } else { + this._closeTableCell({ + colspan: optionsObjectOrColspan, + rowspan: rowspan, + }); + } } - var output = Object(target); - var idx = 1; - var length = arguments.length; + _closeTableCell ({ colspan = 1, rowspan = 1 } = {}) { + const cell = this._popStackItem(); + const text = trimCharacter(getText(cell), '\n'); + cell.next.cells.push({ colspan: colspan, rowspan: rowspan, text: text }); + } - while (idx < length) { - var source = arguments[idx]; + /** + * Finalize currently built table row and add it to parent table's rows. + */ + closeTableRow () { + const row = this._popStackItem(); + row.next.rows.push(row.cells); + } - if (source != null) { - for (var nextKey in source) { - if (_has(nextKey, source)) { - output[nextKey] = source[nextKey]; - } - } + /** + * Finalize currently built table and add the rendered text to the parent block. + * + * @param { object | number } [optionsObjectOrColSpacing] + * Object holding the parameters of the table. + * + * Number value is depreceted. + * + * @param { number } [optionsObjectOrColSpacing.colSpacing = 3] + * Number of spaces between table columns. + * + * @param { number } [optionsObjectOrColSpacing.rowSpacing = 0] + * Number of empty lines between table rows. + * + * @param { number } [optionsObjectOrColSpacing.leadingLineBreaks = 2] + * This table should have at least this number of line breaks to separate if from any preceding block. + * + * @param { number } [optionsObjectOrColSpacing.trailingLineBreaks = 2] + * This table should have at least this number of line breaks to separate it from any following block. + * + * @param { number } [rowSpacing] + * Deprecated. + * + * @param { number } [leadingLineBreaks] + * Deprecated. + * + * @param { number } [trailingLineBreaks] + * Deprecated. + */ + closeTable ( + optionsObjectOrColSpacing = {}, + rowSpacing = undefined, + leadingLineBreaks = undefined, + trailingLineBreaks = undefined + ) { + if (typeof optionsObjectOrColSpacing === 'object') { + this._closeTable(optionsObjectOrColSpacing); + } else { + this._closeTable({ + colSpacing: optionsObjectOrColSpacing, + leadingLineBreaks: leadingLineBreaks, + rowSpacing: rowSpacing, + trailingLineBreaks: trailingLineBreaks + }); } + } - idx += 1; + _closeTable ({ colSpacing = 3, rowSpacing = 0, leadingLineBreaks = 2, trailingLineBreaks = 2 } = {}) { + const table = this._popStackItem(); + const output = tableToString(table.rows, rowSpacing, colSpacing); + if (output) { + addText(this._stackItem, output, leadingLineBreaks, trailingLineBreaks); + } } - return output; -} + /** + * Return the rendered text content of this builder. + * + * @returns { string } + */ + toString () { + return getText(this._stackItem.getRoot()); + // There should only be the root item if everything is closed properly. + } -module.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign; +} -/***/ }), -/* 290 */, -/* 291 */ -/***/ (function(module) { +function getText (stackItem) { + if (!( + stackItem instanceof BlockStackItem + || stackItem instanceof TableCellStackItem + )) { + throw new Error('Only blocks and table cells can be requested for text contents.'); + } + return (stackItem.inlineTextBuilder.isEmpty()) + ? stackItem.rawText + : stackItem.rawText + stackItem.inlineTextBuilder.toString(); +} -/** - * Polyfill from . - */ -var pad = function pad(n) { - return (n < 10 ? '0' : '') + n; -}; +function addText (stackItem, text, leadingLineBreaks, trailingLineBreaks) { + if (!( + stackItem instanceof BlockStackItem + || stackItem instanceof TableCellStackItem + )) { + throw new Error('Only blocks and table cells can contain text.'); + } + const parentText = getText(stackItem); + const lineBreaks = Math.max(stackItem.stashedLineBreaks, leadingLineBreaks); + stackItem.inlineTextBuilder.clear(); + if (parentText) { + stackItem.rawText = parentText + '\n'.repeat(lineBreaks) + text; + } else { + stackItem.rawText = text; + stackItem.leadingLineBreaks = lineBreaks; + } + stackItem.stashedLineBreaks = trailingLineBreaks; +} -var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { - return d.toISOString(); -} : function _toISOString(d) { - return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; -}; +module.exports = { BlockTextBuilder: BlockTextBuilder }; -module.exports = _toISOString; /***/ }), -/* 292 */ +/* 293 */, +/* 294 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var constant = __webpack_require__(817), - defineProperty = __webpack_require__(382), - identity = __webpack_require__(83); +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); +var keys = +/*#__PURE__*/ +__webpack_require__(89); /** - * The base implementation of `setToString` without support for hot loop shorting. + * Iterate over an input `object`, calling a provided function `fn` for each + * key and value in the object. * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -module.exports = baseSetToString; + * `fn` receives three argument: *(value, key, obj)*. + * + * @func + * @memberOf R + * @since v0.23.0 + * @category Object + * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a + * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. + * @param {Object} obj The object to iterate over. + * @return {Object} The original object. + * @example + * + * const printKeyConcatValue = (value, key) => console.log(key + ':' + value); + * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} + * // logs x:1 + * // logs y:2 + * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} + */ -/***/ }), -/* 293 */ -/***/ (function(module) { +var forEachObjIndexed = +/*#__PURE__*/ +_curry2(function forEachObjIndexed(fn, obj) { + var keyList = keys(obj); + var idx = 0; -module.exports = require("buffer"); + while (idx < keyList.length) { + var key = keyList[idx]; + fn(obj[key], key, obj); + idx += 1; + } -/***/ }), -/* 294 */ -/***/ (function(module) { + return obj; +}); -module.exports = {"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\"","QUOT":"\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}; +module.exports = forEachObjIndexed; /***/ }), /* 295 */ @@ -14791,7 +10244,7 @@ module.exports = {"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute": var _arity = /*#__PURE__*/ -__webpack_require__(456); +__webpack_require__(451); var _curry1 = /*#__PURE__*/ @@ -14870,12 +10323,19 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const core = __webpack_require__(470); -const fs = __webpack_require__(747); -const globOptionsHelper = __webpack_require__(601); -const path = __webpack_require__(622); -const patternHelper = __webpack_require__(597); +const core = __importStar(__webpack_require__(470)); +const fs = __importStar(__webpack_require__(747)); +const globOptionsHelper = __importStar(__webpack_require__(601)); +const path = __importStar(__webpack_require__(622)); +const patternHelper = __importStar(__webpack_require__(597)); const internal_match_kind_1 = __webpack_require__(327); const internal_pattern_1 = __webpack_require__(923); const internal_search_state_1 = __webpack_require__(728); @@ -15060,108 +10520,146 @@ exports.DefaultGlobber = DefaultGlobber; /***/ }), /* 298 */, /* 299 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/***/ (function(__unusedmodule, exports) { -var fs = __webpack_require__(747) -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __webpack_require__(587) -} else { - core = __webpack_require__(197) +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "2.9.1"; + +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +function normalizePaginatedListResponse(response) { + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + + response.data.total_count = totalCount; + return response; +} + +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) return { + done: true + }; + const response = await requestMethod({ + method, + url, + headers + }); + const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + + url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { + value: normalizedResponse + }; + } + + }) + }; +} + +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } + + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); } -module.exports = isexe -isexe.sync = sync +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then(result => { + if (result.done) { + return results; + } -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } + let earlyExit = false; - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') + function done() { + earlyExit = true; } - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } + if (earlyExit) { + return results; } - cb(er, is) - }) -} -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } + return gather(octokit, results, iterator, mapFn); + }); } - -/***/ }), -/* 300 */, -/* 301 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var isArrayLike = __webpack_require__(146), - isObjectLike = __webpack_require__(337); +const composePaginateRest = Object.assign(paginate, { + iterator +}); /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; } +paginateRest.VERSION = VERSION; -module.exports = isArrayLikeObject; +exports.composePaginateRest = composePaginateRest; +exports.paginateRest = paginateRest; +//# sourceMappingURL=index.js.map /***/ }), +/* 300 */, +/* 301 */, /* 302 */, /* 303 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -15226,9 +10724,181 @@ module.exports = hasPath; /***/ }), /* 304 */ -/***/ (function(module) { +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DomHandler = void 0; +var node_1 = __webpack_require__(555); +__exportStar(__webpack_require__(555), exports); +var reWhitespace = /\s+/g; +// Default options +var defaultOpts = { + normalizeWhitespace: false, + withStartIndices: false, + withEndIndices: false, +}; +var DomHandler = /** @class */ (function () { + /** + * @param callback Called once parsing has completed. + * @param options Settings for the handler. + * @param elementCB Callback whenever a tag is closed. + */ + function DomHandler(callback, options, elementCB) { + /** The elements of the DOM */ + this.dom = []; + /** The root element for the DOM */ + this.root = new node_1.Document(this.dom); + /** Indicated whether parsing has been completed. */ + this.done = false; + /** Stack of open tags. */ + this.tagStack = [this.root]; + /** A data node that is still being written to. */ + this.lastNode = null; + /** Reference to the parser instance. Used for location information. */ + this.parser = null; + // Make it possible to skip arguments, for backwards-compatibility + if (typeof options === "function") { + elementCB = options; + options = defaultOpts; + } + if (typeof callback === "object") { + options = callback; + callback = undefined; + } + this.callback = callback !== null && callback !== void 0 ? callback : null; + this.options = options !== null && options !== void 0 ? options : defaultOpts; + this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; + } + DomHandler.prototype.onparserinit = function (parser) { + this.parser = parser; + }; + // Resets the handler back to starting state + DomHandler.prototype.onreset = function () { + var _a; + this.dom = []; + this.root = new node_1.Document(this.dom); + this.done = false; + this.tagStack = [this.root]; + this.lastNode = null; + this.parser = (_a = this.parser) !== null && _a !== void 0 ? _a : null; + }; + // Signals the handler that parsing is done + DomHandler.prototype.onend = function () { + if (this.done) + return; + this.done = true; + this.parser = null; + this.handleCallback(null); + }; + DomHandler.prototype.onerror = function (error) { + this.handleCallback(error); + }; + DomHandler.prototype.onclosetag = function () { + this.lastNode = null; + var elem = this.tagStack.pop(); + if (this.options.withEndIndices) { + elem.endIndex = this.parser.endIndex; + } + if (this.elementCB) + this.elementCB(elem); + }; + DomHandler.prototype.onopentag = function (name, attribs) { + var element = new node_1.Element(name, attribs); + this.addNode(element); + this.tagStack.push(element); + }; + DomHandler.prototype.ontext = function (data) { + var normalizeWhitespace = this.options.normalizeWhitespace; + var lastNode = this.lastNode; + if (lastNode && lastNode.type === "text" /* Text */) { + if (normalizeWhitespace) { + lastNode.data = (lastNode.data + data).replace(reWhitespace, " "); + } + else { + lastNode.data += data; + } + } + else { + if (normalizeWhitespace) { + data = data.replace(reWhitespace, " "); + } + var node = new node_1.Text(data); + this.addNode(node); + this.lastNode = node; + } + }; + DomHandler.prototype.oncomment = function (data) { + if (this.lastNode && this.lastNode.type === "comment" /* Comment */) { + this.lastNode.data += data; + return; + } + var node = new node_1.Comment(data); + this.addNode(node); + this.lastNode = node; + }; + DomHandler.prototype.oncommentend = function () { + this.lastNode = null; + }; + DomHandler.prototype.oncdatastart = function () { + var text = new node_1.Text(""); + var node = new node_1.NodeWithChildren("cdata" /* CDATA */, [text]); + this.addNode(node); + text.parent = node; + this.lastNode = text; + }; + DomHandler.prototype.oncdataend = function () { + this.lastNode = null; + }; + DomHandler.prototype.onprocessinginstruction = function (name, data) { + var node = new node_1.ProcessingInstruction(name, data); + this.addNode(node); + }; + DomHandler.prototype.handleCallback = function (error) { + if (typeof this.callback === "function") { + this.callback(error, this.dom); + } + else if (error) { + throw error; + } + }; + DomHandler.prototype.addNode = function (node) { + var parent = this.tagStack[this.tagStack.length - 1]; + var previousSibling = parent.children[parent.children.length - 1]; + if (this.options.withStartIndices) { + node.startIndex = this.parser.startIndex; + } + if (this.options.withEndIndices) { + node.endIndex = this.parser.endIndex; + } + parent.children.push(node); + if (previousSibling) { + node.prev = previousSibling; + previousSibling.next = node; + } + node.parent = parent; + this.lastNode = null; + }; + DomHandler.prototype.addDataNode = function (node) { + this.addNode(node); + this.lastNode = node; + }; + return DomHandler; +}()); +exports.DomHandler = DomHandler; +exports.default = DomHandler; -module.exports = require("string_decoder"); /***/ }), /* 305 */ @@ -15496,80 +11166,7 @@ function expand(str, isTop) { /***/ }), -/* 307 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry2 = -/*#__PURE__*/ -__webpack_require__(830); - -var _dispatchable = -/*#__PURE__*/ -__webpack_require__(968); - -var _xtake = -/*#__PURE__*/ -__webpack_require__(694); - -var slice = -/*#__PURE__*/ -__webpack_require__(608); -/** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * const personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * const takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ - - -var take = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); -})); - -module.exports = take; - -/***/ }), +/* 307 */, /* 308 */, /* 309 */, /* 310 */, @@ -15672,39 +11269,7 @@ _curry1(function juxt(fns) { module.exports = juxt; /***/ }), -/* 315 */ -/***/ (function(module) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} - - -/***/ }), +/* 315 */, /* 316 */, /* 317 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -15741,29 +11306,7 @@ module.exports = isNil; /***/ }), /* 318 */, -/* 319 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseIsNative = __webpack_require__(248), - getValue = __webpack_require__(879); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; - - -/***/ }), +/* 319 */, /* 320 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -15800,205 +11343,211 @@ __webpack_require__(797); * * const equals3 = R.equals(3); * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ - - -var all = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - - idx += 1; - } - - return true; -})); - -module.exports = all; - -/***/ }), -/* 321 */, -/* 322 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -var zip = __webpack_require__(2); -var trimEnd = __webpack_require__(263); - -// Split a long word up to fit within the word wrap limit. Use either a -// character to split looking back from the word wrap limit, or -// truncate to the word wrap limit. -function splitLongWord(word, options) { - var wrapCharacters = options.longWordSplit.wrapCharacters || []; - var forceWrapOnLimit = options.longWordSplit.forceWrapOnLimit || false; - var max = options.wordwrap; - - var fuseWord = []; - var idx = 0; - while (word.length > max) { - var firstLine = word.substr(0, max); - var remainingChars = word.substr(max); - - var splitIndex = firstLine.lastIndexOf(wrapCharacters[idx]); - - if (splitIndex > -1) { - // We've found a character to split on, store before the split then check if we - // need to split again - word = firstLine.substr(splitIndex + 1) + remainingChars; - fuseWord.push(firstLine.substr(0, splitIndex + 1)); - } else { - idx++; - if (idx >= wrapCharacters.length) { - // Cannot split on character, so either split at 'max' or preserve length - if (forceWrapOnLimit) { - fuseWord.push(firstLine); - word = remainingChars; - if (word.length > max) { - continue; - } - } else { - word = firstLine + remainingChars; - if (!options.preserveNewlines) { - word += '\n'; - } - } - break; - } else { - word = firstLine + remainingChars; - } - } - } - fuseWord.push(word); - - return fuseWord.join('\n'); -} - -exports.wordwrap = function wordwrap(text, options) { - var max = options.wordwrap; - var preserveNewlines = options.preserveNewlines; - var length = options.lineCharCount; - - // Preserve leading space - var result = text.startsWith(' ') ? ' ' : ''; - length += result.length; - var buffer = []; - // Split the text into words, decide to preserve new lines or not. - var words = preserveNewlines - ? text.trim().replace(/\n/g, '\n ').split(/\ +/) - : text.trim().split(/\s+/); - - // Determine where to end line word by word. - words.forEach(function(word) { - // Add buffer to result if we can't fit any more words in the buffer. - if ((max || max === 0) && length > 0 && ((length + word.length > max) || (length + word.indexOf('\n') > max))) { - // Concat buffer and add it to the result - result += buffer.join(' ') + '\n'; - // Reset buffer and length - buffer.length = length = 0; - } - - // Check if the current word is long enough to be wrapped - if ((max || max === 0) && (options.longWordSplit) && (word.length > max)) { - word = splitLongWord(word, options); - } + * R.all(equals3)([3, 3, 1, 3]); //=> false + */ - buffer.push(word); - // If the word contains a newline then restart the count and add the buffer to the result - if (word.indexOf('\n') !== -1) { - result += buffer.join(' '); +var all = +/*#__PURE__*/ +_curry2( +/*#__PURE__*/ +_dispatchable(['all'], _xall, function all(fn, list) { + var idx = 0; - // Reset the buffer, let the length include any characters after the last newline - buffer.length = 0; - length = word.length - (word.lastIndexOf('\n') + 1); - // If there are characters after the newline, add a space and increase the length by 1 - if (length) { - result += ' '; - length++; - } - } else { - // Add word length + one whitespace - length += word.length + 1; + while (idx < list.length) { + if (!fn(list[idx])) { + return false; } - }); - // Add the rest to the result. - result += buffer.join(' '); - // Preserve trailing space - if (!text.endsWith(' ')) { - result = trimEnd(result); - } else if (!result.endsWith(' ')) { - result = result + ' '; + idx += 1; } - return result; -}; + return true; +})); -exports.arrayZip = function arrayZip(array) { - return zip.apply(null, array); -}; +module.exports = all; + +/***/ }), +/* 321 */, +/* 322 */ +/***/ (function(module) { -exports.splitCssSearchTag = function splitCssSearchTag(tagString) { - function getParams(re, string) { - var captures = [], found; + +/** + * Split given tag selector into it's components. + * Only element name, class names and ID names are supported. + * + * @param { string } selector Tag selector ("tag.class#id" etc). + * @returns { { classes: string[], element: string, ids: string[] } } + */ +function splitSelector (selector) { + function getParams (re, string) { + const captures = []; + let found; while ((found = re.exec(string)) !== null) { captures.push(found[1]); } return captures; } - var splitTag = {}; - var elementRe = /(^\w*)/g; - splitTag.element = elementRe.exec(tagString)[1]; - splitTag.classes = getParams( /\.([\d\w-]*)/g, tagString); - splitTag.ids = getParams( /#([\d\w-]*)/g, tagString); - - return splitTag; -}; - -exports.replaceAll = function replaceAll(str, find, replace) { - var reg = new RegExp(find, 'g'); - - return str.replace(reg, replace); -}; + return { + classes: getParams(/\.([\d\w-]*)/g, selector), + element: /(^\w*)/g.exec(selector)[1], + ids: getParams(/#([\d\w-]*)/g, selector) + }; +} +/** + * Given a list of class and ID selectors (prefixed with '.' and '#'), + * return them as separate lists of names without prefixes. + * + * @param { string[] } selectors Class and ID selectors (`[".class", "#id"]` etc). + * @returns { { classes: string[], ids: string[] } } + */ +function splitClassesAndIds (selectors) { + const classes = []; + const ids = []; + for (const selector of selectors) { + if (selector.startsWith('.')) { + classes.push(selector.substring(1)); + } else if (selector.startsWith('#')) { + ids.push(selector.substring(1)); + } + } + return { classes: classes, ids: ids }; +} -/***/ }), -/* 323 */ -/***/ (function(module) { +/** + * Make a recursive function that will only run to a given depth + * and switches to an alternative function at that depth. \ + * No limitation if `n` is `undefined` (Just wraps `f` in that case). + * + * @param { number | undefined } n Allowed depth of recursion. `undefined` for no limitation. + * @param { Function } f Function that accepts recursive callback as the first argument. + * @param { Function } [g] Function to run instead, when maximum depth was reached. Do nothing by default. + * @returns { Function } + */ +function limitedDepthRecursive (n, f, g = () => undefined) { + if (n === undefined) { + const f1 = function (...args) { return f(f1, ...args); }; + return f1; + } + if (n >= 0) { + return function (...args) { return f(limitedDepthRecursive(n - 1, f, g), ...args); }; + } + return g; +} -"use strict"; +/** + * Convert a number into alphabetic sequence representation (Sequence without zeroes). + * + * For example: `a, ..., z, aa, ..., zz, aaa, ...`. + * + * @param { number } num Number to convert. Must be >= 1. + * @param { string } [baseChar = 'a'] Character for 1 in the sequence. + * @param { number } [base = 26] Number of characters in the sequence. + * @returns { string } + */ +function numberToLetterSequence (num, baseChar = 'a', base = 26) { + const digits = []; + do { + num -= 1; + digits.push(num % base); + num = (num / base) >> 0; // quick `floor` + } while (num > 0); + const baseCode = baseChar.charCodeAt(0); + return digits + .reverse() + .map(n => String.fromCharCode(baseCode + n)) + .join(''); +} +const I = ['I', 'X', 'C', 'M']; +const V = ['V', 'L', 'D']; -var isStream = module.exports = function (stream) { - return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; -}; +/** + * Convert a number to it's Roman representation. No large numbers extension. + * + * @param { number } num Number to convert. `0 < num <= 3999`. + * @returns { string } + */ +function numberToRoman (num) { + return [...(num) + ''] + .map(n => +n) + .reverse() + .map((v, i) => ((v % 5 < 4) + ? (v < 5 ? '' : V[i]) + I[i].repeat(v % 5) + : I[i] + (v < 5 ? V[i] : I[i + 1]))) + .reverse() + .join(''); +} -isStream.writable = function (stream) { - return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; -}; +/** + * Return the same string or a substring with the given character occurences removed from each end if any. + * + * @param { string } str A string to trim. + * @param { string } char A character to be trimmed. + * @returns { string } + */ +function trimCharacter (str, char) { + let start = 0; + let end = str.length; + while (start < end && str[start] === char) { ++start; } + while (end > start && str[end - 1] === char) { --end; } + return (start > 0 || end < str.length) + ? str.substring(start, end) + : str; +} -isStream.readable = function (stream) { - return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; -}; +/** + * Get a nested property from an object. + * + * @param { object } obj The object to query for the value. + * @param { string[] } path The path to the property. + * @returns { any } + */ +function get (obj, path) { + for (const key of path) { + if (!obj) { return undefined; } + obj = obj[key]; + } + return obj; +} -isStream.duplex = function (stream) { - return isStream.writable(stream) && isStream.readable(stream); -}; +/** + * Set a nested property of an object. + * + * @param { object } obj The object to modify. + * @param { string[] } path The path to the property. + * @param { any } value The value to set. + */ +function set (obj, path, value) { + const valueKey = path.pop(); + for (const key of path) { + let nested = obj[key]; + if (!nested) { + nested = {}; + obj[key] = nested; + } + obj = nested; + } + obj[valueKey] = value; +} -isStream.transform = function (stream) { - return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +module.exports = { + get: get, + limitedDepthRecursive: limitedDepthRecursive, + numberToLetterSequence: numberToLetterSequence, + numberToRoman: numberToRoman, + set: set, + splitClassesAndIds: splitClassesAndIds, + splitSelector: splitSelector, + trimCharacter: trimCharacter }; /***/ }), +/* 323 */, /* 324 */, /* 325 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -16009,7 +11558,7 @@ __webpack_require__(798); var _includesWith = /*#__PURE__*/ -__webpack_require__(607); +__webpack_require__(680); var _functionName = /*#__PURE__*/ @@ -16199,7 +11748,7 @@ module.exports = _equals; var _arity = /*#__PURE__*/ -__webpack_require__(456); +__webpack_require__(451); var _curry2 = /*#__PURE__*/ @@ -16250,245 +11799,91 @@ var pipeWith = _curry2(function pipeWith(xf, list) { if (list.length <= 0) { return identity; - } - - var headList = head(list); - var tailList = tail(list); - return _arity(headList.length, function () { - return _reduce(function (result, f) { - return xf.call(this, f, result); - }, headList.apply(this, arguments), tailList); - }); -}); - -module.exports = pipeWith; - -/***/ }), -/* 327 */ -/***/ (function(__unusedmodule, exports) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Indicates whether a pattern matches a path - */ -var MatchKind; -(function (MatchKind) { - /** Not matched */ - MatchKind[MatchKind["None"] = 0] = "None"; - /** Matched if the path is a directory */ - MatchKind[MatchKind["Directory"] = 1] = "Directory"; - /** Matched if the path is a regular file */ - MatchKind[MatchKind["File"] = 2] = "File"; - /** Matched */ - MatchKind[MatchKind["All"] = 3] = "All"; -})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); -//# sourceMappingURL=internal-match-kind.js.map - -/***/ }), -/* 328 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry1 = -/*#__PURE__*/ -__webpack_require__(721); - -var curryN = -/*#__PURE__*/ -__webpack_require__(535); -/** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * const mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ - - -var flip = -/*#__PURE__*/ -_curry1(function flip(fn) { - return curryN(fn.length, function (a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); -}); - -module.exports = flip; - -/***/ }), -/* 329 */, -/* 330 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var endpoint = __webpack_require__(892); -var universalUserAgent = __webpack_require__(796); -var isPlainObject = _interopDefault(__webpack_require__(548)); -var nodeFetch = _interopDefault(__webpack_require__(369)); -var requestError = __webpack_require__(463); - -const VERSION = "5.4.5"; - -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -function fetchWrapper(requestOptions) { - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - - let headers = {}; - let status; - let url; - const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)).then(response => { - url = response.url; - status = response.status; - - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - - if (status === 204 || status === 205) { - return; - } // GitHub API returns 200 for HEAD requests - - - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - - throw new requestError.RequestError(response.statusText, status, { - headers, - request: requestOptions - }); - } - - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { - headers, - request: requestOptions - }); - } - - if (status >= 400) { - return response.text().then(message => { - const error = new requestError.RequestError(message, status, { - headers, - request: requestOptions - }); - - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; // Assumption `errors` would always be in Array format - - error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); - } catch (e) {// ignore, see octokit/rest.js#684 - } - - throw error; - }); - } - - const contentType = response.headers.get("content-type"); - - if (/application\/json/.test(contentType)) { - return response.json(); - } + } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } + var headList = head(list); + var tailList = tail(list); + return _arity(headList.length, function () { + return _reduce(function (result, f) { + return xf.call(this, f, result); + }, headList.apply(this, arguments), tailList); + }); +}); - return getBufferResponse(response); - }).then(data => { - return { - status, - url, - headers, - data - }; - }).catch(error => { - if (error instanceof requestError.RequestError) { - throw error; - } +module.exports = pipeWith; - throw new requestError.RequestError(error.message, 500, { - headers, - request: requestOptions - }); - }); -} +/***/ }), +/* 327 */ +/***/ (function(__unusedmodule, exports) { -function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); +"use strict"; - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Indicates whether a pattern matches a path + */ +var MatchKind; +(function (MatchKind) { + /** Not matched */ + MatchKind[MatchKind["None"] = 0] = "None"; + /** Matched if the path is a directory */ + MatchKind[MatchKind["Directory"] = 1] = "Directory"; + /** Matched if the path is a regular file */ + MatchKind[MatchKind["File"] = 2] = "File"; + /** Matched */ + MatchKind[MatchKind["All"] = 3] = "All"; +})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +//# sourceMappingURL=internal-match-kind.js.map - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } +/***/ }), +/* 328 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); - }; +var _curry1 = +/*#__PURE__*/ +__webpack_require__(721); - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); - return endpointOptions.request.hook(request, endpointOptions); - }; +var curryN = +/*#__PURE__*/ +__webpack_require__(535); +/** + * Returns a new function much like the supplied one, except that the first two + * arguments' order is reversed. + * + * @func + * @memberOf R + * @since v0.1.0 + * @category Function + * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) + * @param {Function} fn The function to invoke with its first two parameters reversed. + * @return {*} The result of invoking `fn` with its first two parameters' order reversed. + * @example + * + * const mergeThree = (a, b, c) => [].concat(a, b, c); + * + * mergeThree(1, 2, 3); //=> [1, 2, 3] + * + * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] + * @symb R.flip(f)(a, b, c) = f(b, a, c) + */ - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); -} -const request = withDefaults(endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` - } +var flip = +/*#__PURE__*/ +_curry1(function flip(fn) { + return curryN(fn.length, function (a, b) { + var args = Array.prototype.slice.call(arguments, 0); + args[0] = b; + args[1] = a; + return fn.apply(this, args); + }); }); -exports.request = request; -//# sourceMappingURL=index.js.map - +module.exports = flip; /***/ }), +/* 329 */, +/* 330 */, /* 331 */, /* 332 */, /* 333 */ @@ -16536,216 +11931,93 @@ module.exports = countBy; /* 336 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var once = __webpack_require__(969) -var eos = __webpack_require__(9) -var fs = __webpack_require__(747) // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump - - -/***/ }), -/* 337 */ -/***/ (function(module) { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - - -/***/ }), -/* 338 */, -/* 339 */, -/* 340 */ -/***/ (function(module) { - +var _curry2 = +/*#__PURE__*/ +__webpack_require__(830); /** - * Private `concat` function to merge two array-like objects. + * Creates a new list out of the two supplied by pairing up equally-positioned + * items from both lists. The returned list is truncated to the length of the + * shorter of the two input lists. + * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. * - * @private - * @param {Array|Arguments} [set1=[]] An array-like object. - * @param {Array|Arguments} [set2=[]] An array-like object. - * @return {Array} A new, merged array. + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig [a] -> [b] -> [[a,b]] + * @param {Array} list1 The first array to consider. + * @param {Array} list2 The second array to consider. + * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. * @example * - * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] + * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] + * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] */ -function _concat(set1, set2) { - set1 = set1 || []; - set2 = set2 || []; - var idx; - var len1 = set1.length; - var len2 = set2.length; - var result = []; - idx = 0; - while (idx < len1) { - result[result.length] = set1[idx]; - idx += 1; - } - idx = 0; +var zip = +/*#__PURE__*/ +_curry2(function zip(a, b) { + var rv = []; + var idx = 0; + var len = Math.min(a.length, b.length); - while (idx < len2) { - result[result.length] = set2[idx]; + while (idx < len) { + rv[idx] = [a[idx], b[idx]]; idx += 1; } - return result; -} + return rv; +}); -module.exports = _concat; +module.exports = zip; /***/ }), -/* 341 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _concat = -/*#__PURE__*/ -__webpack_require__(340); - -var _createPartialApplicator = -/*#__PURE__*/ -__webpack_require__(166); -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight, R.curry - * @example - * - * const multiply2 = (a, b) => a * b; - * const double = R.partial(multiply2, [2]); - * double(2); //=> 4 +/* 337 */, +/* 338 */, +/* 339 */, +/* 340 */ +/***/ (function(module) { + +/** + * Private `concat` function to merge two array-like objects. * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; + * @private + * @param {Array|Arguments} [set1=[]] An array-like object. + * @param {Array|Arguments} [set2=[]] An array-like object. + * @return {Array} A new, merged array. + * @example * - * const sayHello = R.partial(greet, ['Hello']); - * const sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) + * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] */ +function _concat(set1, set2) { + set1 = set1 || []; + set2 = set2 || []; + var idx; + var len1 = set1.length; + var len2 = set2.length; + var result = []; + idx = 0; + while (idx < len1) { + result[result.length] = set1[idx]; + idx += 1; + } -var partial = -/*#__PURE__*/ -_createPartialApplicator(_concat); + idx = 0; -module.exports = partial; + while (idx < len2) { + result[result.length] = set2[idx]; + idx += 1; + } + + return result; +} + +module.exports = _concat; /***/ }), +/* 341 */, /* 342 */, /* 343 */ /***/ (function(__unusedmodule, exports) { @@ -16796,9 +12068,9 @@ exports.merge = function(target, a, arrayMode) { const keys = Object.keys(a); // will return an array of own properties const len = keys.length; //don't make it inline for (let i = 0; i < len; i++) { - if(arrayMode === 'strict'){ + if (arrayMode === 'strict') { target[keys[i]] = [ a[keys[i]] ]; - }else{ + } else { target[keys[i]] = a[keys[i]]; } } @@ -16835,6 +12107,26 @@ exports.buildOptions = function(options, defaultOptions, props) { return newOptions; }; +/** + * Check if a tag name should be treated as array + * + * @param tagName the node tagname + * @param arrayMode the array mode option + * @param parentTagName the parent tag name + * @returns {boolean} true if node should be parsed as array + */ +exports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) { + if (arrayMode === false) { + return false; + } else if (arrayMode instanceof RegExp) { + return arrayMode.test(tagName); + } else if (typeof arrayMode === 'function') { + return !!arrayMode(tagName, parentTagName); + } + + return arrayMode === "strict"; +} + exports.isName = isName; exports.getAllMatches = getAllMatches; exports.nameRegexp = nameRegexp; @@ -16937,77 +12229,17 @@ var _flatCat = function _xcat(xf) { module.exports = _flatCat; /***/ }), -/* 348 */ -/***/ (function(module) { - -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = arrayFilter; - - -/***/ }), +/* 348 */, /* 349 */, /* 350 */, -/* 351 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var isPrototype = __webpack_require__(514), - nativeKeys = __webpack_require__(773); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -module.exports = baseKeys; +/* 351 */, +/* 352 */, +/* 353 */ +/***/ (function(module) { +module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}; /***/ }), -/* 352 */, -/* 353 */, /* 354 */, /* 355 */, /* 356 */ @@ -17061,45 +12293,7 @@ module.exports = require("assert"); /***/ }), /* 358 */, -/* 359 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseRepeat = __webpack_require__(261), - baseToString = __webpack_require__(280), - castSlice = __webpack_require__(532), - hasUnicode = __webpack_require__(506), - stringSize = __webpack_require__(680), - stringToArray = __webpack_require__(854); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; - -/** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ -function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); -} - -module.exports = createPadding; - - -/***/ }), +/* 359 */, /* 360 */, /* 361 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -17218,7 +12412,7 @@ __webpack_require__(262); var slice = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(232); /** * Splits a given list or string at a given index. * @@ -17306,7 +12500,7 @@ module.exports = dropLast; var _includesWith = /*#__PURE__*/ -__webpack_require__(607); +__webpack_require__(680); var _curry3 = /*#__PURE__*/ @@ -17419,10 +12613,10 @@ Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var Stream = _interopDefault(__webpack_require__(413)); +var Stream = _interopDefault(__webpack_require__(418)); var http = _interopDefault(__webpack_require__(363)); var Url = _interopDefault(__webpack_require__(835)); -var https = _interopDefault(__webpack_require__(583)); +var https = _interopDefault(__webpack_require__(34)); var zlib = _interopDefault(__webpack_require__(761)); // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js @@ -17880,6 +13074,12 @@ function convertBody(buffer, headers) { // html4 if (!res && str) { res = / (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * const t = R.always('Tee'); - * t(); //=> 'Tee' - */ - - -var always = -/*#__PURE__*/ -_curry1(function always(val) { - return function () { - return val; - }; -}); - -module.exports = always; - -/***/ }), -/* 371 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var freeGlobal = __webpack_require__(973); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; +/***/ (function(module) { +module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}; /***/ }), +/* 371 */, /* 372 */, /* 373 */, /* 374 */, @@ -19165,65 +14320,133 @@ module.exports = project; /* 378 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var arrayMap = __webpack_require__(766); +var register = __webpack_require__(280) +var addHook = __webpack_require__(510) +var removeHook = __webpack_require__(763) -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind +var bindable = bind.bind(bind) -module.exports = baseValues; +function bindApi (hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) + hook.api = { remove: removeHookRef } + hook.remove = removeHookRef + ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind] + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) + }) +} -/***/ }), -/* 379 */ -/***/ (function(module) { +function HookSingular () { + var singularHookName = 'h' + var singularHookState = { + registry: {} + } + var singularHook = register.bind(null, singularHookState, singularHookName) + bindApi(singularHook, singularHookState, singularHookName) + return singularHook +} -"use strict"; +function HookCollection () { + var state = { + registry: {} + } -module.exports = opts => { - opts = opts || {}; + var hook = register.bind(null, state) + bindApi(hook, state) - const env = opts.env || process.env; - const platform = opts.platform || process.platform; + return hook +} - if (platform !== 'win32') { - return 'PATH'; - } +var collectionHookDeprecationMessageDisplayed = false +function Hook () { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') + collectionHookDeprecationMessageDisplayed = true + } + return HookCollection() +} - return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; -}; +Hook.Singular = HookSingular.bind() +Hook.Collection = HookCollection.bind() + +module.exports = Hook +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook +module.exports.Singular = Hook.Singular +module.exports.Collection = Hook.Collection /***/ }), +/* 379 */, /* 380 */, /* 381 */, /* 382 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var getNative = __webpack_require__(319); +var _curry3 = +/*#__PURE__*/ +__webpack_require__(78); +/** + * Returns a single item by iterating through the list, successively calling + * the iterator function and passing it an accumulator value and the current + * value from the array, and then passing the result to the next call. + * + * Similar to [`reduce`](#reduce), except moves through the input list from the + * right to the left. + * + * The iterator function receives two values: *(value, acc)*, while the arguments' + * order of `reduce`'s iterator function is *(acc, value)*. + * + * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse + * arrays), unlike the native `Array.prototype.reduceRight` method. For more details + * on this behavior, see: + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description + * + * @func + * @memberOf R + * @since v0.1.0 + * @category List + * @sig ((a, b) -> b) -> b -> [a] -> b + * @param {Function} fn The iterator function. Receives two values, the current element from the array + * and the accumulator. + * @param {*} acc The accumulator value. + * @param {Array} list The list to iterate over. + * @return {*} The final, accumulated value. + * @see R.reduce, R.addIndex + * @example + * + * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 + * // - -2 + * // / \ / \ + * // 1 - 1 3 + * // / \ / \ + * // 2 - ==> 2 -1 + * // / \ / \ + * // 3 - 3 4 + * // / \ / \ + * // 4 0 4 0 + * + * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) + */ + + +var reduceRight = +/*#__PURE__*/ +_curry3(function reduceRight(fn, acc, list) { + var idx = list.length - 1; -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); + while (idx >= 0) { + acc = fn(list[idx], acc); + idx -= 1; + } -module.exports = defineProperty; + return acc; +}); +module.exports = reduceRight; /***/ }), /* 383 */ @@ -19231,10 +14454,20 @@ module.exports = defineProperty; "use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const assert = __webpack_require__(357); -const path = __webpack_require__(622); -const pathHelper = __webpack_require__(972); +const path = __importStar(__webpack_require__(622)); +const pathHelper = __importStar(__webpack_require__(972)); +const assert_1 = __importDefault(__webpack_require__(357)); const IS_WINDOWS = process.platform === 'win32'; /** * Helper class for parsing paths into segments @@ -19248,7 +14481,7 @@ class Path { this.segments = []; // String if (typeof itemPath === 'string') { - assert(itemPath, `Parameter 'itemPath' must not be empty`); + assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); // Normalize slashes and trim unnecessary trailing slash itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); // Not rooted @@ -19275,24 +14508,24 @@ class Path { // Array else { // Must not be empty - assert(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); // Each segment for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; // Must not be empty - assert(segment, `Parameter 'itemPath' must not contain any empty segments`); + assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); // Normalize slashes segment = pathHelper.normalizeSeparators(itemPath[i]); // Root segment if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } // All other segments else { // Must not contain slash - assert(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -19328,7 +14561,7 @@ exports.Path = Path; var _isFunction = /*#__PURE__*/ -__webpack_require__(67); +__webpack_require__(512); var _toString = /*#__PURE__*/ @@ -19346,61 +14579,7 @@ module.exports = _assertPromise; /* 386 */, /* 387 */, /* 388 */, -/* 389 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseTimes = __webpack_require__(553), - isArguments = __webpack_require__(846), - isArray = __webpack_require__(143), - isBuffer = __webpack_require__(546), - isIndex = __webpack_require__(160), - isTypedArray = __webpack_require__(850); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; - - -/***/ }), +/* 389 */, /* 390 */ /***/ (function(module) { @@ -19412,28 +14591,32 @@ module.exports = _has; /***/ }), /* 391 */, -/* 392 */, -/* 393 */ -/***/ (function(module) { +/* 392 */ +/***/ (function(__unusedmodule, exports) { -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + + if (typeof process === "object" && "version" in process) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + + return ""; } -module.exports = overArg; +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map /***/ }), +/* 393 */, /* 394 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -19453,7 +14636,7 @@ __webpack_require__(653); * * @func * @memberOf R - * @since v0.27.0 + * @since v0.27.1 * @category Object * @typedefn Idx = [String | Int] * @sig [Idx] -> {a} -> [a | Undefined] @@ -19494,43 +14677,8 @@ module.exports = paths; /***/ }), /* 395 */, -/* 396 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var root = __webpack_require__(371); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - - -/***/ }), -/* 397 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseIndexOf = __webpack_require__(571); - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsEndIndex; - - -/***/ }), +/* 396 */, +/* 397 */, /* 398 */, /* 399 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -19579,90 +14727,15 @@ module.exports = nthArg; /***/ }), /* 400 */, -/* 401 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var arrayFilter = __webpack_require__(348), - arrayMap = __webpack_require__(766), - baseProperty = __webpack_require__(974), - baseTimes = __webpack_require__(553), - isArrayLikeObject = __webpack_require__(301); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @since 1.2.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - * - * _.unzip(zipped); - * // => [['a', 'b'], [1, 2], [true, false]] - */ -function unzip(array) { - if (!(array && array.length)) { - return []; - } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); - }); -} - -module.exports = unzip; - - -/***/ }), -/* 402 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -// DOM-Level-1-compliant structure -var NodePrototype = __webpack_require__(555); -var ElementPrototype = module.exports = Object.create(NodePrototype); - -var domLvl1 = { - tagName: "name" -}; - -Object.keys(domLvl1).forEach(function(key) { - var shorthand = domLvl1[key]; - Object.defineProperty(ElementPrototype, key, { - get: function() { - return this[shorthand] || null; - }, - set: function(val) { - this[shorthand] = val; - return val; - } - }); -}); - - -/***/ }), +/* 401 */, +/* 402 */, /* 403 */, /* 404 */ /***/ (function(module, __unusedexports, __webpack_require__) { var _arity = /*#__PURE__*/ -__webpack_require__(456); +__webpack_require__(451); var _isPlaceholder = /*#__PURE__*/ @@ -19724,7 +14797,7 @@ __webpack_require__(830); var slice = /*#__PURE__*/ -__webpack_require__(608); +__webpack_require__(232); /** * Splits a collection into slices of the specified length. * @@ -19782,7 +14855,7 @@ __webpack_require__(944); var uniq = /*#__PURE__*/ -__webpack_require__(86); +__webpack_require__(732); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. @@ -19812,76 +14885,12 @@ module.exports = union; /***/ }), /* 411 */, -/* 412 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseGetTag = __webpack_require__(51), - isLength = __webpack_require__(611), - isObjectLike = __webpack_require__(337); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; - - -/***/ }), +/* 412 */, /* 413 */ -/***/ (function(module) { +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = __webpack_require__(141); -module.exports = require("stream"); /***/ }), /* 414 */ @@ -19942,228 +14951,81 @@ __webpack_require__(260); */ -function _makeFlat(recursive) { - return function flatt(list) { - var value, jlen, j; - var result = []; - var idx = 0; - var ilen = list.length; - - while (idx < ilen) { - if (_isArrayLike(list[idx])) { - value = recursive ? flatt(list[idx]) : list[idx]; - j = 0; - jlen = value.length; - - while (j < jlen) { - result[result.length] = value[j]; - j += 1; - } - } else { - result[result.length] = list[idx]; - } - - idx += 1; - } - - return result; - }; -} - -module.exports = _makeFlat; - -/***/ }), -/* 416 */, -/* 417 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _isArray = -/*#__PURE__*/ -__webpack_require__(930); -/** - * This checks whether a function has a [methodname] function. If it isn't an - * array it will execute that function otherwise it will default to the ramda - * implementation. - * - * @private - * @param {Function} fn ramda implemtation - * @param {String} methodname property to check for a custom implementation - * @return {Object} Whatever the return value of the method is. - */ - - -function _checkForMethod(methodname, fn) { - return function () { - var length = arguments.length; - - if (length === 0) { - return fn(); - } - - var obj = arguments[length - 1]; - return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); - }; -} - -module.exports = _checkForMethod; - -/***/ }), -/* 418 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var _curry3 = -/*#__PURE__*/ -__webpack_require__(78); -/** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.scan, R.addIndex, R.mapAccumRight - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ - - -var mapAccum = -/*#__PURE__*/ -_curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - - return [tuple[0], result]; -}); - -module.exports = mapAccum; - -/***/ }), -/* 419 */ -/***/ (function(module) { - -module.exports = register - -function register (state, name, method, options) { - if (typeof method !== 'function') { - throw new Error('method for before hook must be a function') - } - - if (!options) { - options = {} - } +function _makeFlat(recursive) { + return function flatt(list) { + var value, jlen, j; + var result = []; + var idx = 0; + var ilen = list.length; - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options) - }, method)() - } + while (idx < ilen) { + if (_isArrayLike(list[idx])) { + value = recursive ? flatt(list[idx]) : list[idx]; + j = 0; + jlen = value.length; - return Promise.resolve() - .then(function () { - if (!state.registry[name]) { - return method(options) + while (j < jlen) { + result[result.length] = value[j]; + j += 1; + } + } else { + result[result.length] = list[idx]; } - return (state.registry[name]).reduce(function (method, registered) { - return registered.hook.bind(null, method, options) - }, method)() - }) + idx += 1; + } + + return result; + }; } +module.exports = _makeFlat; /***/ }), -/* 420 */, -/* 421 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; +/* 416 */, +/* 417 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encode = exports.decodeStrict = exports.decode = void 0; -var decode_1 = __webpack_require__(434); -var encode_1 = __webpack_require__(697); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. - */ -function decode(data, level) { - return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); -} -exports.decode = decode; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. - */ -function decodeStrict(data, level) { - return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); -} -exports.decodeStrict = decodeStrict; +var _isArray = +/*#__PURE__*/ +__webpack_require__(930); /** - * Encodes a string with entities. + * This checks whether a function has a [methodname] function. If it isn't an + * array it will execute that function otherwise it will default to the ramda + * implementation. * - * @param data String to encode. - * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0. + * @private + * @param {Function} fn ramda implemtation + * @param {String} methodname property to check for a custom implementation + * @return {Object} Whatever the return value of the method is. */ -function encode(data, level) { - return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); + + +function _checkForMethod(methodname, fn) { + return function () { + var length = arguments.length; + + if (length === 0) { + return fn(); + } + + var obj = arguments[length - 1]; + return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); + }; } -exports.encode = encode; -var encode_2 = __webpack_require__(697); -Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return encode_2.encodeXML; } }); -Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_2.encodeHTML; } }); -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return encode_2.escape; } }); -// Legacy aliases -Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_2.encodeHTML; } }); -Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_2.encodeHTML; } }); -var decode_2 = __webpack_require__(434); -Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_2.decodeXML; } }); -Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }); -// Legacy aliases -Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_2.decodeXML; } }); +module.exports = _checkForMethod; + +/***/ }), +/* 418 */ +/***/ (function(module) { + +module.exports = require("stream"); /***/ }), +/* 419 */, +/* 420 */, +/* 421 */, /* 422 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -20357,90 +15219,10 @@ module.exports = nAry; /***/ }), /* 426 */, -/* 427 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = __webpack_require__(413); - - -/***/ }), -/* 428 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseToString = __webpack_require__(280); - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -module.exports = toString; - - -/***/ }), +/* 427 */, +/* 428 */, /* 429 */, -/* 430 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var apply = __webpack_require__(512); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -module.exports = overRest; - - -/***/ }), +/* 430 */, /* 431 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -20455,6 +15237,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os = __importStar(__webpack_require__(87)); +const utils_1 = __webpack_require__(82); /** * Commands * @@ -20508,28 +15291,14 @@ class Command { return cmdStr; } } -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; function escapeData(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -20541,68 +15310,47 @@ function escapeProperty(s) { /***/ }), /* 432 */, /* 433 */, -/* 434 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 434 */, +/* 435 */ +/***/ (function(__unusedmodule, exports) { "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; -var entities_json_1 = __importDefault(__webpack_require__(282)); -var legacy_json_1 = __importDefault(__webpack_require__(294)); -var xml_json_1 = __importDefault(__webpack_require__(782)); -var decode_codepoint_1 = __importDefault(__webpack_require__(219)); -exports.decodeXML = getStrictDecoder(xml_json_1.default); -exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); -function getStrictDecoder(map) { - var keys = Object.keys(map).join("|"); - var replace = getReplacer(map); - keys += "|#[xX][\\da-fA-F]+|#\\d+"; - var re = new RegExp("&(?:" + keys + ");", "g"); - return function (str) { return String(str).replace(re, replace); }; -} -var sorter = function (a, b) { return (a < b ? 1 : -1); }; -exports.decodeHTML = (function () { - var legacy = Object.keys(legacy_json_1.default).sort(sorter); - var keys = Object.keys(entities_json_1.default).sort(sorter); - for (var i = 0, j = 0; i < keys.length; i++) { - if (legacy[j] === keys[i]) { - keys[i] += ";?"; - j++; - } - else { - keys[i] += ";"; - } - } - var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); - var replace = getReplacer(entities_json_1.default); - function replacer(str) { - if (str.substr(-1) !== ";") - str += ";"; - return replace(str); - } - //TODO consider creating a merged map - return function (str) { return String(str).replace(re, replacer); }; -})(); -function getReplacer(map) { - return function replace(str) { - if (str.charAt(1) === "#") { - var secondChar = str.charAt(2); - if (secondChar === "X" || secondChar === "x") { - return decode_codepoint_1.default(parseInt(str.substr(3), 16)); - } - return decode_codepoint_1.default(parseInt(str.substr(2), 10)); - } - return map[str.slice(1, -1)]; - }; +exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = void 0; +/** + * Tests whether an element is a tag or not. + * + * @param elem Element to test + */ +function isTag(elem) { + return (elem.type === "tag" /* Tag */ || + elem.type === "script" /* Script */ || + elem.type === "style" /* Style */); } +exports.isTag = isTag; +// Exports for backwards compatibility +/** Type for the root element of a document */ +exports.Root = "root" /* Root */; +/** Type for Text */ +exports.Text = "text" /* Text */; +/** Type for */ +exports.Directive = "directive" /* Directive */; +/** Type for */ +exports.Comment = "comment" /* Comment */; +/** Type for