/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["vendors-node_modules_lumino_algorithm_dist_index_es6_js"],{

/***/ "../node_modules/@lumino/algorithm/dist/index.es6.js":
/*!***********************************************************!*\
  !*** ../node_modules/@lumino/algorithm/dist/index.es6.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"ArrayExt\": () => (/* binding */ ArrayExt),\n/* harmony export */   \"ArrayIterator\": () => (/* binding */ ArrayIterator),\n/* harmony export */   \"ChainIterator\": () => (/* binding */ ChainIterator),\n/* harmony export */   \"EmptyIterator\": () => (/* binding */ EmptyIterator),\n/* harmony export */   \"EnumerateIterator\": () => (/* binding */ EnumerateIterator),\n/* harmony export */   \"FilterIterator\": () => (/* binding */ FilterIterator),\n/* harmony export */   \"FnIterator\": () => (/* binding */ FnIterator),\n/* harmony export */   \"ItemIterator\": () => (/* binding */ ItemIterator),\n/* harmony export */   \"KeyIterator\": () => (/* binding */ KeyIterator),\n/* harmony export */   \"MapIterator\": () => (/* binding */ MapIterator),\n/* harmony export */   \"RangeIterator\": () => (/* binding */ RangeIterator),\n/* harmony export */   \"RepeatIterator\": () => (/* binding */ RepeatIterator),\n/* harmony export */   \"RetroArrayIterator\": () => (/* binding */ RetroArrayIterator),\n/* harmony export */   \"StrideIterator\": () => (/* binding */ StrideIterator),\n/* harmony export */   \"StringExt\": () => (/* binding */ StringExt),\n/* harmony export */   \"TakeIterator\": () => (/* binding */ TakeIterator),\n/* harmony export */   \"ValueIterator\": () => (/* binding */ ValueIterator),\n/* harmony export */   \"ZipIterator\": () => (/* binding */ ZipIterator),\n/* harmony export */   \"chain\": () => (/* binding */ chain),\n/* harmony export */   \"each\": () => (/* binding */ each),\n/* harmony export */   \"empty\": () => (/* binding */ empty),\n/* harmony export */   \"enumerate\": () => (/* binding */ enumerate),\n/* harmony export */   \"every\": () => (/* binding */ every),\n/* harmony export */   \"filter\": () => (/* binding */ filter),\n/* harmony export */   \"find\": () => (/* binding */ find),\n/* harmony export */   \"findIndex\": () => (/* binding */ findIndex),\n/* harmony export */   \"iter\": () => (/* binding */ iter),\n/* harmony export */   \"iterFn\": () => (/* binding */ iterFn),\n/* harmony export */   \"iterItems\": () => (/* binding */ iterItems),\n/* harmony export */   \"iterKeys\": () => (/* binding */ iterKeys),\n/* harmony export */   \"iterValues\": () => (/* binding */ iterValues),\n/* harmony export */   \"map\": () => (/* binding */ map),\n/* harmony export */   \"max\": () => (/* binding */ max),\n/* harmony export */   \"min\": () => (/* binding */ min),\n/* harmony export */   \"minmax\": () => (/* binding */ minmax),\n/* harmony export */   \"once\": () => (/* binding */ once),\n/* harmony export */   \"range\": () => (/* binding */ range),\n/* harmony export */   \"reduce\": () => (/* binding */ reduce),\n/* harmony export */   \"repeat\": () => (/* binding */ repeat),\n/* harmony export */   \"retro\": () => (/* binding */ retro),\n/* harmony export */   \"some\": () => (/* binding */ some),\n/* harmony export */   \"stride\": () => (/* binding */ stride),\n/* harmony export */   \"take\": () => (/* binding */ take),\n/* harmony export */   \"toArray\": () => (/* binding */ toArray),\n/* harmony export */   \"toObject\": () => (/* binding */ toObject),\n/* harmony export */   \"topologicSort\": () => (/* binding */ topologicSort),\n/* harmony export */   \"zip\": () => (/* binding */ zip)\n/* harmony export */ });\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * The namespace for array-specific algorithms.\n */\nvar ArrayExt;\n(function (ArrayExt) {\n    /**\n     * Find the index of the first occurrence of a value in an array.\n     *\n     * @param array - The array-like object to search.\n     *\n     * @param value - The value to locate in the array. Values are\n     *   compared using strict `===` equality.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the first occurrence of the value, or `-1`\n     *   if the value is not found.\n     *\n     * #### Notes\n     * If `stop < start` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = ['one', 'two', 'three', 'four', 'one'];\n     * ArrayExt.firstIndexOf(data, 'red');        // -1\n     * ArrayExt.firstIndexOf(data, 'one');        // 0\n     * ArrayExt.firstIndexOf(data, 'one', 1);     // 4\n     * ArrayExt.firstIndexOf(data, 'two', 2);     // -1\n     * ArrayExt.firstIndexOf(data, 'two', 2, 1);  // 1\n     * ```\n     */\n    function firstIndexOf(array, value, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return -1;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var span;\n        if (stop < start) {\n            span = (stop + 1) + (n - start);\n        }\n        else {\n            span = stop - start + 1;\n        }\n        for (var i = 0; i < span; ++i) {\n            var j = (start + i) % n;\n            if (array[j] === value) {\n                return j;\n            }\n        }\n        return -1;\n    }\n    ArrayExt.firstIndexOf = firstIndexOf;\n    /**\n     * Find the index of the last occurrence of a value in an array.\n     *\n     * @param array - The array-like object to search.\n     *\n     * @param value - The value to locate in the array. Values are\n     *   compared using strict `===` equality.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the last occurrence of the value, or `-1`\n     *   if the value is not found.\n     *\n     * #### Notes\n     * If `start < stop` the search will wrap at the front of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = ['one', 'two', 'three', 'four', 'one'];\n     * ArrayExt.lastIndexOf(data, 'red');        // -1\n     * ArrayExt.lastIndexOf(data, 'one');        // 4\n     * ArrayExt.lastIndexOf(data, 'one', 1);     // 0\n     * ArrayExt.lastIndexOf(data, 'two', 0);     // -1\n     * ArrayExt.lastIndexOf(data, 'two', 0, 1);  // 1\n     * ```\n     */\n    function lastIndexOf(array, value, start, stop) {\n        if (start === void 0) { start = -1; }\n        if (stop === void 0) { stop = 0; }\n        var n = array.length;\n        if (n === 0) {\n            return -1;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var span;\n        if (start < stop) {\n            span = (start + 1) + (n - stop);\n        }\n        else {\n            span = start - stop + 1;\n        }\n        for (var i = 0; i < span; ++i) {\n            var j = (start - i + n) % n;\n            if (array[j] === value) {\n                return j;\n            }\n        }\n        return -1;\n    }\n    ArrayExt.lastIndexOf = lastIndexOf;\n    /**\n     * Find the index of the first value which matches a predicate.\n     *\n     * @param array - The array-like object to search.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the first matching value, or `-1` if no\n     *   matching value is found.\n     *\n     * #### Notes\n     * If `stop < start` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [1, 2, 3, 4, 3, 2, 1];\n     * ArrayExt.findFirstIndex(data, isEven);       // 1\n     * ArrayExt.findFirstIndex(data, isEven, 4);    // 5\n     * ArrayExt.findFirstIndex(data, isEven, 6);    // -1\n     * ArrayExt.findFirstIndex(data, isEven, 6, 5); // 1\n     * ```\n     */\n    function findFirstIndex(array, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return -1;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var span;\n        if (stop < start) {\n            span = (stop + 1) + (n - start);\n        }\n        else {\n            span = stop - start + 1;\n        }\n        for (var i = 0; i < span; ++i) {\n            var j = (start + i) % n;\n            if (fn(array[j], j)) {\n                return j;\n            }\n        }\n        return -1;\n    }\n    ArrayExt.findFirstIndex = findFirstIndex;\n    /**\n     * Find the index of the last value which matches a predicate.\n     *\n     * @param object - The array-like object to search.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the last matching value, or `-1` if no\n     *   matching value is found.\n     *\n     * #### Notes\n     * If `start < stop` the search will wrap at the front of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [1, 2, 3, 4, 3, 2, 1];\n     * ArrayExt.findLastIndex(data, isEven);        // 5\n     * ArrayExt.findLastIndex(data, isEven, 4);     // 3\n     * ArrayExt.findLastIndex(data, isEven, 0);     // -1\n     * ArrayExt.findLastIndex(data, isEven, 0, 1);  // 5\n     * ```\n     */\n    function findLastIndex(array, fn, start, stop) {\n        if (start === void 0) { start = -1; }\n        if (stop === void 0) { stop = 0; }\n        var n = array.length;\n        if (n === 0) {\n            return -1;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var d;\n        if (start < stop) {\n            d = (start + 1) + (n - stop);\n        }\n        else {\n            d = start - stop + 1;\n        }\n        for (var i = 0; i < d; ++i) {\n            var j = (start - i + n) % n;\n            if (fn(array[j], j)) {\n                return j;\n            }\n        }\n        return -1;\n    }\n    ArrayExt.findLastIndex = findLastIndex;\n    /**\n     * Find the first value which matches a predicate.\n     *\n     * @param array - The array-like object to search.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The first matching value, or `undefined` if no matching\n     *   value is found.\n     *\n     * #### Notes\n     * If `stop < start` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [1, 2, 3, 4, 3, 2, 1];\n     * ArrayExt.findFirstValue(data, isEven);       // 2\n     * ArrayExt.findFirstValue(data, isEven, 2);    // 4\n     * ArrayExt.findFirstValue(data, isEven, 6);    // undefined\n     * ArrayExt.findFirstValue(data, isEven, 6, 5); // 2\n     * ```\n     */\n    function findFirstValue(array, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var index = findFirstIndex(array, fn, start, stop);\n        return index !== -1 ? array[index] : undefined;\n    }\n    ArrayExt.findFirstValue = findFirstValue;\n    /**\n     * Find the last value which matches a predicate.\n     *\n     * @param object - The array-like object to search.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The last matching value, or `undefined` if no matching\n     *   value is found.\n     *\n     * #### Notes\n     * If `start < stop` the search will wrap at the front of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [1, 2, 3, 4, 3, 2, 1];\n     * ArrayExt.findLastValue(data, isEven);        // 2\n     * ArrayExt.findLastValue(data, isEven, 4);     // 4\n     * ArrayExt.findLastValue(data, isEven, 0);     // undefined\n     * ArrayExt.findLastValue(data, isEven, 0, 1);  // 2\n     * ```\n     */\n    function findLastValue(array, fn, start, stop) {\n        if (start === void 0) { start = -1; }\n        if (stop === void 0) { stop = 0; }\n        var index = findLastIndex(array, fn, start, stop);\n        return index !== -1 ? array[index] : undefined;\n    }\n    ArrayExt.findLastValue = findLastValue;\n    /**\n     * Find the index of the first element which compares `>=` to a value.\n     *\n     * @param array - The sorted array-like object to search.\n     *\n     * @param value - The value to locate in the array.\n     *\n     * @param fn - The 3-way comparison function to apply to the values.\n     *   It should return `< 0` if an element is less than a value, `0` if\n     *   an element is equal to a value, or `> 0` if an element is greater\n     *   than a value.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the first element which compares `>=` to the\n     *   value, or `length` if there is no such element. If the computed\n     *   index for `stop` is less than `start`, then the computed index\n     *   for `start` is returned.\n     *\n     * #### Notes\n     * The array must already be sorted in ascending order according to\n     * the comparison function.\n     *\n     * #### Complexity\n     * Logarithmic.\n     *\n     * #### Undefined Behavior\n     * Searching a range which is not sorted in ascending order.\n     *\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function numberCmp(a: number, b: number): number {\n     *   return a - b;\n     * }\n     *\n     * let data = [0, 3, 4, 7, 7, 9];\n     * ArrayExt.lowerBound(data, 0, numberCmp);   // 0\n     * ArrayExt.lowerBound(data, 6, numberCmp);   // 3\n     * ArrayExt.lowerBound(data, 7, numberCmp);   // 3\n     * ArrayExt.lowerBound(data, -1, numberCmp);  // 0\n     * ArrayExt.lowerBound(data, 10, numberCmp);  // 6\n     * ```\n     */\n    function lowerBound(array, value, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return 0;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var begin = start;\n        var span = stop - start + 1;\n        while (span > 0) {\n            var half = span >> 1;\n            var middle = begin + half;\n            if (fn(array[middle], value) < 0) {\n                begin = middle + 1;\n                span -= half + 1;\n            }\n            else {\n                span = half;\n            }\n        }\n        return begin;\n    }\n    ArrayExt.lowerBound = lowerBound;\n    /**\n     * Find the index of the first element which compares `>` than a value.\n     *\n     * @param array - The sorted array-like object to search.\n     *\n     * @param value - The value to locate in the array.\n     *\n     * @param fn - The 3-way comparison function to apply to the values.\n     *   It should return `< 0` if an element is less than a value, `0` if\n     *   an element is equal to a value, or `> 0` if an element is greater\n     *   than a value.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the first element which compares `>` than the\n     *   value, or `length` if there is no such element. If the computed\n     *   index for `stop` is less than `start`, then the computed index\n     *   for `start` is returned.\n     *\n     * #### Notes\n     * The array must already be sorted in ascending order according to\n     * the comparison function.\n     *\n     * #### Complexity\n     * Logarithmic.\n     *\n     * #### Undefined Behavior\n     * Searching a range which is not sorted in ascending order.\n     *\n     * A `start` or `stop` which is non-integral.\n     *\n     * Modifying the length of the array while searching.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function numberCmp(a: number, b: number): number {\n     *   return a - b;\n     * }\n     *\n     * let data = [0, 3, 4, 7, 7, 9];\n     * ArrayExt.upperBound(data, 0, numberCmp);   // 1\n     * ArrayExt.upperBound(data, 6, numberCmp);   // 3\n     * ArrayExt.upperBound(data, 7, numberCmp);   // 5\n     * ArrayExt.upperBound(data, -1, numberCmp);  // 0\n     * ArrayExt.upperBound(data, 10, numberCmp);  // 6\n     * ```\n     */\n    function upperBound(array, value, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return 0;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var begin = start;\n        var span = stop - start + 1;\n        while (span > 0) {\n            var half = span >> 1;\n            var middle = begin + half;\n            if (fn(array[middle], value) > 0) {\n                span = half;\n            }\n            else {\n                begin = middle + 1;\n                span -= half + 1;\n            }\n        }\n        return begin;\n    }\n    ArrayExt.upperBound = upperBound;\n    /**\n     * Test whether two arrays are shallowly equal.\n     *\n     * @param a - The first array-like object to compare.\n     *\n     * @param b - The second array-like object to compare.\n     *\n     * @param fn - The comparison function to apply to the elements. It\n     *   should return `true` if the elements are \"equal\". The default\n     *   compares elements using strict `===` equality.\n     *\n     * @returns Whether the two arrays are shallowly equal.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * Modifying the length of the arrays while comparing.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let d1 = [0, 3, 4, 7, 7, 9];\n     * let d2 = [0, 3, 4, 7, 7, 9];\n     * let d3 = [42];\n     * ArrayExt.shallowEqual(d1, d2);  // true\n     * ArrayExt.shallowEqual(d2, d3);  // false\n     * ```\n     */\n    function shallowEqual(a, b, fn) {\n        // Check for object identity first.\n        if (a === b) {\n            return true;\n        }\n        // Bail early if the lengths are different.\n        if (a.length !== b.length) {\n            return false;\n        }\n        // Compare each element for equality.\n        for (var i = 0, n = a.length; i < n; ++i) {\n            if (fn ? !fn(a[i], b[i]) : a[i] !== b[i]) {\n                return false;\n            }\n        }\n        // The array are shallowly equal.\n        return true;\n    }\n    ArrayExt.shallowEqual = shallowEqual;\n    /**\n     * Create a slice of an array subject to an optional step.\n     *\n     * @param array - The array-like object of interest.\n     *\n     * @param options - The options for configuring the slice.\n     *\n     * @returns A new array with the specified values.\n     *\n     * @throws An exception if the slice `step` is `0`.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start`, `stop`, or `step` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 3, 4, 7, 7, 9];\n     * ArrayExt.slice(data);                         // [0, 3, 4, 7, 7, 9]\n     * ArrayExt.slice(data, { start: 2 });           // [4, 7, 7, 9]\n     * ArrayExt.slice(data, { start: 0, stop: 4 });  // [0, 3, 4, 7]\n     * ArrayExt.slice(data, { step: 2 });            // [0, 4, 7]\n     * ArrayExt.slice(data, { step: -1 });           // [9, 7, 7, 4, 3, 0]\n     * ```\n     */\n    function slice(array, options) {\n        if (options === void 0) { options = {}; }\n        // Extract the options.\n        var start = options.start, stop = options.stop, step = options.step;\n        // Set up the `step` value.\n        if (step === undefined) {\n            step = 1;\n        }\n        // Validate the step size.\n        if (step === 0) {\n            throw new Error('Slice `step` cannot be zero.');\n        }\n        // Look up the length of the array.\n        var n = array.length;\n        // Set up the `start` value.\n        if (start === undefined) {\n            start = step < 0 ? n - 1 : 0;\n        }\n        else if (start < 0) {\n            start = Math.max(start + n, step < 0 ? -1 : 0);\n        }\n        else if (start >= n) {\n            start = step < 0 ? n - 1 : n;\n        }\n        // Set up the `stop` value.\n        if (stop === undefined) {\n            stop = step < 0 ? -1 : n;\n        }\n        else if (stop < 0) {\n            stop = Math.max(stop + n, step < 0 ? -1 : 0);\n        }\n        else if (stop >= n) {\n            stop = step < 0 ? n - 1 : n;\n        }\n        // Compute the slice length.\n        var length;\n        if ((step < 0 && stop >= start) || (step > 0 && start >= stop)) {\n            length = 0;\n        }\n        else if (step < 0) {\n            length = Math.floor((stop - start + 1) / step + 1);\n        }\n        else {\n            length = Math.floor((stop - start - 1) / step + 1);\n        }\n        // Compute the sliced result.\n        var result = [];\n        for (var i = 0; i < length; ++i) {\n            result[i] = array[start + i * step];\n        }\n        // Return the result.\n        return result;\n    }\n    ArrayExt.slice = slice;\n    /**\n     * Move an element in an array from one index to another.\n     *\n     * @param array - The mutable array-like object of interest.\n     *\n     * @param fromIndex - The index of the element to move. Negative\n     *   values are taken as an offset from the end of the array.\n     *\n     * @param toIndex - The target index of the element. Negative\n     *   values are taken as an offset from the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `fromIndex` or `toIndex` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from from '@lumino/algorithm';\n     *\n     * let data = [0, 1, 2, 3, 4];\n     * ArrayExt.move(data, 1, 2);  // [0, 2, 1, 3, 4]\n     * ArrayExt.move(data, 4, 2);  // [0, 2, 4, 1, 3]\n     * ```\n     */\n    function move(array, fromIndex, toIndex) {\n        var n = array.length;\n        if (n <= 1) {\n            return;\n        }\n        if (fromIndex < 0) {\n            fromIndex = Math.max(0, fromIndex + n);\n        }\n        else {\n            fromIndex = Math.min(fromIndex, n - 1);\n        }\n        if (toIndex < 0) {\n            toIndex = Math.max(0, toIndex + n);\n        }\n        else {\n            toIndex = Math.min(toIndex, n - 1);\n        }\n        if (fromIndex === toIndex) {\n            return;\n        }\n        var value = array[fromIndex];\n        var d = fromIndex < toIndex ? 1 : -1;\n        for (var i = fromIndex; i !== toIndex; i += d) {\n            array[i] = array[i + d];\n        }\n        array[toIndex] = value;\n    }\n    ArrayExt.move = move;\n    /**\n     * Reverse an array in-place.\n     *\n     * @param array - The mutable array-like object of interest.\n     *\n     * @param start - The index of the first element in the range to be\n     *   reversed, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   reversed, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or  `stop` index which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 1, 2, 3, 4];\n     * ArrayExt.reverse(data, 1, 3);  // [0, 3, 2, 1, 4]\n     * ArrayExt.reverse(data, 3);     // [0, 3, 2, 4, 1]\n     * ArrayExt.reverse(data);        // [1, 4, 2, 3, 0]\n     * ```\n     */\n    function reverse(array, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n <= 1) {\n            return;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        while (start < stop) {\n            var a = array[start];\n            var b = array[stop];\n            array[start++] = b;\n            array[stop--] = a;\n        }\n    }\n    ArrayExt.reverse = reverse;\n    /**\n     * Rotate the elements of an array in-place.\n     *\n     * @param array - The mutable array-like object of interest.\n     *\n     * @param delta - The amount of rotation to apply to the elements. A\n     *   positive value will rotate the elements to the left. A negative\n     *   value will rotate the elements to the right.\n     *\n     * @param start - The index of the first element in the range to be\n     *   rotated, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   rotated, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `delta`, `start`, or `stop` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 1, 2, 3, 4];\n     * ArrayExt.rotate(data, 2);        // [2, 3, 4, 0, 1]\n     * ArrayExt.rotate(data, -2);       // [0, 1, 2, 3, 4]\n     * ArrayExt.rotate(data, 10);       // [0, 1, 2, 3, 4]\n     * ArrayExt.rotate(data, 9);        // [4, 0, 1, 2, 3]\n     * ArrayExt.rotate(data, 2, 1, 3);  // [4, 2, 0, 1, 3]\n     * ```\n     */\n    function rotate(array, delta, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n <= 1) {\n            return;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        if (start >= stop) {\n            return;\n        }\n        var length = stop - start + 1;\n        if (delta > 0) {\n            delta = delta % length;\n        }\n        else if (delta < 0) {\n            delta = ((delta % length) + length) % length;\n        }\n        if (delta === 0) {\n            return;\n        }\n        var pivot = start + delta;\n        reverse(array, start, pivot - 1);\n        reverse(array, pivot, stop);\n        reverse(array, start, stop);\n    }\n    ArrayExt.rotate = rotate;\n    /**\n     * Fill an array with a static value.\n     *\n     * @param array - The mutable array-like object to fill.\n     *\n     * @param value - The static value to use to fill the array.\n     *\n     * @param start - The index of the first element in the range to be\n     *   filled, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   filled, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * #### Notes\n     * If `stop < start` the fill will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * A `start` or `stop` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = ['one', 'two', 'three', 'four'];\n     * ArrayExt.fill(data, 'r');        // ['r', 'r', 'r', 'r']\n     * ArrayExt.fill(data, 'g', 1);     // ['r', 'g', 'g', 'g']\n     * ArrayExt.fill(data, 'b', 2, 3);  // ['r', 'g', 'b', 'b']\n     * ArrayExt.fill(data, 'z', 3, 1);  // ['z', 'z', 'b', 'z']\n     * ```\n     */\n    function fill(array, value, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var span;\n        if (stop < start) {\n            span = (stop + 1) + (n - start);\n        }\n        else {\n            span = stop - start + 1;\n        }\n        for (var i = 0; i < span; ++i) {\n            array[(start + i) % n] = value;\n        }\n    }\n    ArrayExt.fill = fill;\n    /**\n     * Insert a value into an array at a specific index.\n     *\n     * @param array - The array of interest.\n     *\n     * @param index - The index at which to insert the value. Negative\n     *   values are taken as an offset from the end of the array.\n     *\n     * @param value - The value to set at the specified index.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * An `index` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 1, 2];\n     * ArrayExt.insert(data, 0, -1);  // [-1, 0, 1, 2]\n     * ArrayExt.insert(data, 2, 12);  // [-1, 0, 12, 1, 2]\n     * ArrayExt.insert(data, -1, 7);  // [-1, 0, 12, 1, 7, 2]\n     * ArrayExt.insert(data, 6, 19);  // [-1, 0, 12, 1, 7, 2, 19]\n     * ```\n     */\n    function insert(array, index, value) {\n        var n = array.length;\n        if (index < 0) {\n            index = Math.max(0, index + n);\n        }\n        else {\n            index = Math.min(index, n);\n        }\n        for (var i = n; i > index; --i) {\n            array[i] = array[i - 1];\n        }\n        array[index] = value;\n    }\n    ArrayExt.insert = insert;\n    /**\n     * Remove and return a value at a specific index in an array.\n     *\n     * @param array - The array of interest.\n     *\n     * @param index - The index of the value to remove. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The value at the specified index, or `undefined` if the\n     *   index is out of range.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Undefined Behavior\n     * An `index` which is non-integral.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 12, 23, 39, 14, 12, 75];\n     * ArrayExt.removeAt(data, 2);   // 23\n     * ArrayExt.removeAt(data, -2);  // 12\n     * ArrayExt.removeAt(data, 10);  // undefined;\n     * ```\n     */\n    function removeAt(array, index) {\n        var n = array.length;\n        if (index < 0) {\n            index += n;\n        }\n        if (index < 0 || index >= n) {\n            return undefined;\n        }\n        var value = array[index];\n        for (var i = index + 1; i < n; ++i) {\n            array[i - 1] = array[i];\n        }\n        array.length = n - 1;\n        return value;\n    }\n    ArrayExt.removeAt = removeAt;\n    /**\n     * Remove the first occurrence of a value from an array.\n     *\n     * @param array - The array of interest.\n     *\n     * @param value - The value to remove from the array. Values are\n     *   compared using strict `===` equality.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the removed value, or `-1` if the value\n     *   is not contained in the array.\n     *\n     * #### Notes\n     * If `stop < start` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 12, 23, 39, 14, 12, 75];\n     * ArrayExt.removeFirstOf(data, 12);        // 1\n     * ArrayExt.removeFirstOf(data, 17);        // -1\n     * ArrayExt.removeFirstOf(data, 39, 3);     // -1\n     * ArrayExt.removeFirstOf(data, 39, 3, 2);  // 2\n     * ```\n     */\n    function removeFirstOf(array, value, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var index = firstIndexOf(array, value, start, stop);\n        if (index !== -1) {\n            removeAt(array, index);\n        }\n        return index;\n    }\n    ArrayExt.removeFirstOf = removeFirstOf;\n    /**\n     * Remove the last occurrence of a value from an array.\n     *\n     * @param array - The array of interest.\n     *\n     * @param value - The value to remove from the array. Values are\n     *   compared using strict `===` equality.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The index of the removed value, or `-1` if the value\n     *   is not contained in the array.\n     *\n     * #### Notes\n     * If `start < stop` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [0, 12, 23, 39, 14, 12, 75];\n     * ArrayExt.removeLastOf(data, 12);        // 5\n     * ArrayExt.removeLastOf(data, 17);        // -1\n     * ArrayExt.removeLastOf(data, 39, 2);     // -1\n     * ArrayExt.removeLastOf(data, 39, 2, 3);  // 3\n     * ```\n     */\n    function removeLastOf(array, value, start, stop) {\n        if (start === void 0) { start = -1; }\n        if (stop === void 0) { stop = 0; }\n        var index = lastIndexOf(array, value, start, stop);\n        if (index !== -1) {\n            removeAt(array, index);\n        }\n        return index;\n    }\n    ArrayExt.removeLastOf = removeLastOf;\n    /**\n     * Remove all occurrences of a value from an array.\n     *\n     * @param array - The array of interest.\n     *\n     * @param value - The value to remove from the array. Values are\n     *   compared using strict `===` equality.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The number of elements removed from the array.\n     *\n     * #### Notes\n     * If `stop < start` the search will conceptually wrap at the end of\n     * the array, however the array will be traversed front-to-back.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * let data = [14, 12, 23, 39, 14, 12, 19, 14];\n     * ArrayExt.removeAllOf(data, 12);        // 2\n     * ArrayExt.removeAllOf(data, 17);        // 0\n     * ArrayExt.removeAllOf(data, 14, 1, 4);  // 1\n     * ```\n     */\n    function removeAllOf(array, value, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return 0;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var count = 0;\n        for (var i = 0; i < n; ++i) {\n            if (start <= stop && (i >= start && i <= stop) && array[i] === value) {\n                count++;\n            }\n            else if (stop < start && (i <= stop || i >= start) && array[i] === value) {\n                count++;\n            }\n            else if (count > 0) {\n                array[i - count] = array[i];\n            }\n        }\n        if (count > 0) {\n            array.length = n - count;\n        }\n        return count;\n    }\n    ArrayExt.removeAllOf = removeAllOf;\n    /**\n     * Remove the first occurrence of a value which matches a predicate.\n     *\n     * @param array - The array of interest.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The removed `{ index, value }`, which will be `-1` and\n     *   `undefined` if the value is not contained in the array.\n     *\n     * #### Notes\n     * If `stop < start` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [0, 12, 23, 39, 14, 12, 75];\n     * ArrayExt.removeFirstWhere(data, isEven);     // { index: 0, value: 0 }\n     * ArrayExt.removeFirstWhere(data, isEven, 2);  // { index: 3, value: 14 }\n     * ArrayExt.removeFirstWhere(data, isEven, 4);  // { index: -1, value: undefined }\n     * ```\n     */\n    function removeFirstWhere(array, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var value;\n        var index = findFirstIndex(array, fn, start, stop);\n        if (index !== -1) {\n            value = removeAt(array, index);\n        }\n        return { index: index, value: value };\n    }\n    ArrayExt.removeFirstWhere = removeFirstWhere;\n    /**\n     * Remove the last occurrence of a value which matches a predicate.\n     *\n     * @param array - The array of interest.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The removed `{ index, value }`, which will be `-1` and\n     *   `undefined` if the value is not contained in the array.\n     *\n     * #### Notes\n     * If `start < stop` the search will wrap at the end of the array.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * let data = [0, 12, 23, 39, 14, 12, 75];\n     * ArrayExt.removeLastWhere(data, isEven);        // { index: 5, value: 12 }\n     * ArrayExt.removeLastWhere(data, isEven, 2);     // { index: 1, value: 12 }\n     * ArrayExt.removeLastWhere(data, isEven, 2, 1);  // { index: -1, value: undefined }\n     * ```\n     */\n    function removeLastWhere(array, fn, start, stop) {\n        if (start === void 0) { start = -1; }\n        if (stop === void 0) { stop = 0; }\n        var value;\n        var index = findLastIndex(array, fn, start, stop);\n        if (index !== -1) {\n            value = removeAt(array, index);\n        }\n        return { index: index, value: value };\n    }\n    ArrayExt.removeLastWhere = removeLastWhere;\n    /**\n     * Remove all occurrences of values which match a predicate.\n     *\n     * @param array - The array of interest.\n     *\n     * @param fn - The predicate function to apply to the values.\n     *\n     * @param start - The index of the first element in the range to be\n     *   searched, inclusive. The default value is `0`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @param stop - The index of the last element in the range to be\n     *   searched, inclusive. The default value is `-1`. Negative values\n     *   are taken as an offset from the end of the array.\n     *\n     * @returns The number of elements removed from the array.\n     *\n     * #### Notes\n     * If `stop < start` the search will conceptually wrap at the end of\n     * the array, however the array will be traversed front-to-back.\n     *\n     * #### Complexity\n     * Linear.\n     *\n     * #### Example\n     * ```typescript\n     * import { ArrayExt } from '@lumino/algorithm';\n     *\n     * function isEven(value: number): boolean {\n     *   return value % 2 === 0;\n     * }\n     *\n     * function isNegative(value: number): boolean {\n     *   return value < 0;\n     * }\n     *\n     * let data = [0, 12, -13, -9, 23, 39, 14, -15, 12, 75];\n     * ArrayExt.removeAllWhere(data, isEven);            // 4\n     * ArrayExt.removeAllWhere(data, isNegative, 0, 3);  // 2\n     * ```\n     */\n    function removeAllWhere(array, fn, start, stop) {\n        if (start === void 0) { start = 0; }\n        if (stop === void 0) { stop = -1; }\n        var n = array.length;\n        if (n === 0) {\n            return 0;\n        }\n        if (start < 0) {\n            start = Math.max(0, start + n);\n        }\n        else {\n            start = Math.min(start, n - 1);\n        }\n        if (stop < 0) {\n            stop = Math.max(0, stop + n);\n        }\n        else {\n            stop = Math.min(stop, n - 1);\n        }\n        var count = 0;\n        for (var i = 0; i < n; ++i) {\n            if (start <= stop && (i >= start && i <= stop) && fn(array[i], i)) {\n                count++;\n            }\n            else if (stop < start && (i <= stop || i >= start) && fn(array[i], i)) {\n                count++;\n            }\n            else if (count > 0) {\n                array[i - count] = array[i];\n            }\n        }\n        if (count > 0) {\n            array.length = n - count;\n        }\n        return count;\n    }\n    ArrayExt.removeAllWhere = removeAllWhere;\n})(ArrayExt || (ArrayExt = {}));\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * Create an iterator for an iterable object.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @returns A new iterator for the given object.\n *\n * #### Notes\n * This function allows iteration algorithms to operate on user-defined\n * iterable types and builtin array-like objects in a uniform fashion.\n */\nfunction iter(object) {\n    var it;\n    if (typeof object.iter === 'function') {\n        it = object.iter();\n    }\n    else {\n        it = new ArrayIterator(object);\n    }\n    return it;\n}\n/**\n * Create an iterator for the keys in an object.\n *\n * @param object - The object of interest.\n *\n * @returns A new iterator for the keys in the given object.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { each, keys } from '@lumino/algorithm';\n *\n * let data = { one: 1, two: 2, three: 3 };\n *\n * each(keys(data), key => { console.log(key); }); // 'one', 'two', 'three'\n * ```\n */\nfunction iterKeys(object) {\n    return new KeyIterator(object);\n}\n/**\n * Create an iterator for the values in an object.\n *\n * @param object - The object of interest.\n *\n * @returns A new iterator for the values in the given object.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { each, values } from '@lumino/algorithm';\n *\n * let data = { one: 1, two: 2, three: 3 };\n *\n * each(values(data), value => { console.log(value); }); // 1, 2, 3\n * ```\n */\nfunction iterValues(object) {\n    return new ValueIterator(object);\n}\n/**\n * Create an iterator for the items in an object.\n *\n * @param object - The object of interest.\n *\n * @returns A new iterator for the items in the given object.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { each, items } from '@lumino/algorithm';\n *\n * let data = { one: 1, two: 2, three: 3 };\n *\n * each(items(data), value => { console.log(value); }); // ['one', 1], ['two', 2], ['three', 3]\n * ```\n */\nfunction iterItems(object) {\n    return new ItemIterator(object);\n}\n/**\n * Create an iterator for an iterator-like function.\n *\n * @param fn - A function which behaves like an iterator `next` method.\n *\n * @returns A new iterator for the given function.\n *\n * #### Notes\n * The returned iterator **cannot** be cloned.\n *\n * #### Example\n * ```typescript\n * import { each, iterFn } from '@lumino/algorithm';\n *\n * let it = iterFn((() => {\n *   let i = 0;\n *   return () => i > 3 ? undefined : i++;\n * })());\n *\n * each(it, v => { console.log(v); }); // 0, 1, 2, 3\n * ```\n */\nfunction iterFn(fn) {\n    return new FnIterator(fn);\n}\n/**\n * Invoke a function for each value in an iterable.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param fn - The callback function to invoke for each value.\n *\n * #### Notes\n * Iteration can be terminated early by returning `false` from the\n * callback function.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { each } from '@lumino/algorithm';\n *\n * let data = [5, 7, 0, -2, 9];\n *\n * each(data, value => { console.log(value); });\n * ```\n */\nfunction each(object, fn) {\n    var index = 0;\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, index++) === false) {\n            return;\n        }\n    }\n}\n/**\n * Test whether all values in an iterable satisfy a predicate.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns `true` if all values pass the test, `false` otherwise.\n *\n * #### Notes\n * Iteration terminates on the first `false` predicate result.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { every } from '@lumino/algorithm';\n *\n * let data = [5, 7, 1];\n *\n * every(data, value => value % 2 === 0);  // false\n * every(data, value => value % 2 === 1);  // true\n * ```\n */\nfunction every(object, fn) {\n    var index = 0;\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        if (!fn(value, index++)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Test whether any value in an iterable satisfies a predicate.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns `true` if any value passes the test, `false` otherwise.\n *\n * #### Notes\n * Iteration terminates on the first `true` predicate result.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { some } from '@lumino/algorithm';\n *\n * let data = [5, 7, 1];\n *\n * some(data, value => value === 7);  // true\n * some(data, value => value === 3);  // false\n * ```\n */\nfunction some(object, fn) {\n    var index = 0;\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, index++)) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Create an array from an iterable of values.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @returns A new array of values from the given object.\n *\n * #### Example\n * ```typescript\n * import { iter, toArray } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = iter(data);\n *\n * toArray(stream);  // [1, 2, 3, 4, 5, 6];\n * ```\n */\nfunction toArray(object) {\n    var index = 0;\n    var result = [];\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        result[index++] = value;\n    }\n    return result;\n}\n/**\n * Create an object from an iterable of key/value pairs.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @returns A new object mapping keys to values.\n *\n * #### Example\n * ```typescript\n * import { toObject } from '@lumino/algorithm';\n *\n * let data = [['one', 1], ['two', 2], ['three', 3]];\n *\n * toObject(data);  // { one: 1, two: 2, three: 3 }\n * ```\n */\nfunction toObject(object) {\n    var it = iter(object);\n    var pair;\n    var result = {};\n    while ((pair = it.next()) !== undefined) {\n        result[pair[0]] = pair[1];\n    }\n    return result;\n}\n/**\n * An iterator for an array-like object.\n *\n * #### Notes\n * This iterator can be used for any builtin JS array-like object.\n */\nvar ArrayIterator = /** @class */ (function () {\n    /**\n     * Construct a new array iterator.\n     *\n     * @param source - The array-like object of interest.\n     */\n    function ArrayIterator(source) {\n        this._index = 0;\n        this._source = source;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    ArrayIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    ArrayIterator.prototype.clone = function () {\n        var result = new ArrayIterator(this._source);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    ArrayIterator.prototype.next = function () {\n        if (this._index >= this._source.length) {\n            return undefined;\n        }\n        return this._source[this._index++];\n    };\n    return ArrayIterator;\n}());\n/**\n * An iterator for the keys in an object.\n *\n * #### Notes\n * This iterator can be used for any JS object.\n */\nvar KeyIterator = /** @class */ (function () {\n    /**\n     * Construct a new key iterator.\n     *\n     * @param source - The object of interest.\n     *\n     * @param keys - The keys to iterate, if known.\n     */\n    function KeyIterator(source, keys) {\n        if (keys === void 0) { keys = Object.keys(source); }\n        this._index = 0;\n        this._source = source;\n        this._keys = keys;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    KeyIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    KeyIterator.prototype.clone = function () {\n        var result = new KeyIterator(this._source, this._keys);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    KeyIterator.prototype.next = function () {\n        if (this._index >= this._keys.length) {\n            return undefined;\n        }\n        var key = this._keys[this._index++];\n        if (key in this._source) {\n            return key;\n        }\n        return this.next();\n    };\n    return KeyIterator;\n}());\n/**\n * An iterator for the values in an object.\n *\n * #### Notes\n * This iterator can be used for any JS object.\n */\nvar ValueIterator = /** @class */ (function () {\n    /**\n     * Construct a new value iterator.\n     *\n     * @param source - The object of interest.\n     *\n     * @param keys - The keys to iterate, if known.\n     */\n    function ValueIterator(source, keys) {\n        if (keys === void 0) { keys = Object.keys(source); }\n        this._index = 0;\n        this._source = source;\n        this._keys = keys;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    ValueIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    ValueIterator.prototype.clone = function () {\n        var result = new ValueIterator(this._source, this._keys);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    ValueIterator.prototype.next = function () {\n        if (this._index >= this._keys.length) {\n            return undefined;\n        }\n        var key = this._keys[this._index++];\n        if (key in this._source) {\n            return this._source[key];\n        }\n        return this.next();\n    };\n    return ValueIterator;\n}());\n/**\n * An iterator for the items in an object.\n *\n * #### Notes\n * This iterator can be used for any JS object.\n */\nvar ItemIterator = /** @class */ (function () {\n    /**\n     * Construct a new item iterator.\n     *\n     * @param source - The object of interest.\n     *\n     * @param keys - The keys to iterate, if known.\n     */\n    function ItemIterator(source, keys) {\n        if (keys === void 0) { keys = Object.keys(source); }\n        this._index = 0;\n        this._source = source;\n        this._keys = keys;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    ItemIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    ItemIterator.prototype.clone = function () {\n        var result = new ItemIterator(this._source, this._keys);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    ItemIterator.prototype.next = function () {\n        if (this._index >= this._keys.length) {\n            return undefined;\n        }\n        var key = this._keys[this._index++];\n        if (key in this._source) {\n            return [key, this._source[key]];\n        }\n        return this.next();\n    };\n    return ItemIterator;\n}());\n/**\n * An iterator for an iterator-like function.\n */\nvar FnIterator = /** @class */ (function () {\n    /**\n     * Construct a new function iterator.\n     *\n     * @param fn - The iterator-like function of interest.\n     */\n    function FnIterator(fn) {\n        this._fn = fn;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    FnIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    FnIterator.prototype.clone = function () {\n        throw new Error('An `FnIterator` cannot be cloned.');\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    FnIterator.prototype.next = function () {\n        return this._fn.call(undefined);\n    };\n    return FnIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Chain together several iterables.\n *\n * @param objects - The iterable or array-like objects of interest.\n *\n * @returns An iterator which yields the values of the iterables\n *   in the order in which they are supplied.\n *\n * #### Example\n * ```typescript\n * import { chain, toArray } from '@lumino/algorithm';\n *\n * let data1 = [1, 2, 3];\n * let data2 = [4, 5, 6];\n *\n * let stream = chain(data1, data2);\n *\n * toArray(stream);  // [1, 2, 3, 4, 5, 6]\n * ```\n */\nfunction chain() {\n    var objects = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        objects[_i] = arguments[_i];\n    }\n    return new ChainIterator(iter(objects.map(iter)));\n}\n/**\n * An iterator which chains together several iterators.\n */\nvar ChainIterator = /** @class */ (function () {\n    /**\n     * Construct a new chain iterator.\n     *\n     * @param source - The iterator of iterators of interest.\n     */\n    function ChainIterator(source) {\n        this._cloned = false;\n        this._source = source;\n        this._active = undefined;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    ChainIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    ChainIterator.prototype.clone = function () {\n        var result = new ChainIterator(this._source.clone());\n        result._active = this._active && this._active.clone();\n        result._cloned = true;\n        this._cloned = true;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    ChainIterator.prototype.next = function () {\n        if (this._active === undefined) {\n            var active = this._source.next();\n            if (active === undefined) {\n                return undefined;\n            }\n            this._active = this._cloned ? active.clone() : active;\n        }\n        var value = this._active.next();\n        if (value !== undefined) {\n            return value;\n        }\n        this._active = undefined;\n        return this.next();\n    };\n    return ChainIterator;\n}());\n\n/**\n * Create an empty iterator.\n *\n * @returns A new iterator which yields nothing.\n *\n * #### Example\n * ```typescript\n * import { empty, toArray } from '@lumino/algorithm';\n *\n * let stream = empty<number>();\n *\n * toArray(stream);  // []\n * ```\n */\nfunction empty() {\n    return new EmptyIterator();\n}\n/**\n * An iterator which is always empty.\n */\nvar EmptyIterator = /** @class */ (function () {\n    /**\n     * Construct a new empty iterator.\n     */\n    function EmptyIterator() {\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    EmptyIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    EmptyIterator.prototype.clone = function () {\n        return new EmptyIterator();\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    EmptyIterator.prototype.next = function () {\n        return undefined;\n    };\n    return EmptyIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Enumerate an iterable object.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param start - The starting enum value. The default is `0`.\n *\n * @returns An iterator which yields the enumerated values.\n *\n * #### Example\n * ```typescript\n * import { enumerate, toArray } from '@lumino/algorithm';\n *\n * let data = ['foo', 'bar', 'baz'];\n *\n * let stream = enumerate(data, 1);\n *\n * toArray(stream);  // [[1, 'foo'], [2, 'bar'], [3, 'baz']]\n * ```\n */\nfunction enumerate(object, start) {\n    if (start === void 0) { start = 0; }\n    return new EnumerateIterator(iter(object), start);\n}\n/**\n * An iterator which enumerates the source values.\n */\nvar EnumerateIterator = /** @class */ (function () {\n    /**\n     * Construct a new enumerate iterator.\n     *\n     * @param source - The iterator of values of interest.\n     *\n     * @param start - The starting enum value.\n     */\n    function EnumerateIterator(source, start) {\n        this._source = source;\n        this._index = start;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    EnumerateIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    EnumerateIterator.prototype.clone = function () {\n        return new EnumerateIterator(this._source.clone(), this._index);\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    EnumerateIterator.prototype.next = function () {\n        var value = this._source.next();\n        if (value === undefined) {\n            return undefined;\n        }\n        return [this._index++, value];\n    };\n    return EnumerateIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Filter an iterable for values which pass a test.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param fn - The predicate function to invoke for each value.\n *\n * @returns An iterator which yields the values which pass the test.\n *\n * #### Example\n * ```typescript\n * import { filter, toArray } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = filter(data, value => value % 2 === 0);\n *\n * toArray(stream);  // [2, 4, 6]\n * ```\n */\nfunction filter(object, fn) {\n    return new FilterIterator(iter(object), fn);\n}\n/**\n * An iterator which yields values which pass a test.\n */\nvar FilterIterator = /** @class */ (function () {\n    /**\n     * Construct a new filter iterator.\n     *\n     * @param source - The iterator of values of interest.\n     *\n     * @param fn - The predicate function to invoke for each value.\n     */\n    function FilterIterator(source, fn) {\n        this._index = 0;\n        this._source = source;\n        this._fn = fn;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    FilterIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    FilterIterator.prototype.clone = function () {\n        var result = new FilterIterator(this._source.clone(), this._fn);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    FilterIterator.prototype.next = function () {\n        var fn = this._fn;\n        var it = this._source;\n        var value;\n        while ((value = it.next()) !== undefined) {\n            if (fn(value, this._index++)) {\n                return value;\n            }\n        }\n        return undefined;\n    };\n    return FilterIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Find the first value in an iterable which matches a predicate.\n *\n * @param object - The iterable or array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @returns The first matching value, or `undefined` if no matching\n *   value is found.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { find } from '@lumino/algorithm';\n *\n * interface IAnimal { species: string, name: string };\n *\n * function isCat(value: IAnimal): boolean {\n *   return value.species === 'cat';\n * }\n *\n * let data: IAnimal[] = [\n *   { species: 'dog', name: 'spot' },\n *   { species: 'cat', name: 'fluffy' },\n *   { species: 'alligator', name: 'pocho' }\n * ];\n *\n * find(data, isCat).name;  // 'fluffy'\n * ```\n */\nfunction find(object, fn) {\n    var index = 0;\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, index++)) {\n            return value;\n        }\n    }\n    return undefined;\n}\n/**\n * Find the index of the first value which matches a predicate.\n *\n * @param object - The iterable or array-like object to search.\n *\n * @param fn - The predicate function to apply to the values.\n *\n * @returns The index of the first matching value, or `-1` if no\n *   matching value is found.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { findIndex } from '@lumino/algorithm';\n *\n * interface IAnimal { species: string, name: string };\n *\n * function isCat(value: IAnimal): boolean {\n *   return value.species === 'cat';\n * }\n *\n * let data: IAnimal[] = [\n *   { species: 'dog', name: 'spot' },\n *   { species: 'cat', name: 'fluffy' },\n *   { species: 'alligator', name: 'pocho' }\n * ];\n *\n * findIndex(data, isCat);  // 1\n * ```\n */\nfunction findIndex(object, fn) {\n    var index = 0;\n    var it = iter(object);\n    var value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, index++)) {\n            return index - 1;\n        }\n    }\n    return -1;\n}\n/**\n * Find the minimum value in an iterable.\n *\n * @param object - The iterable or array-like object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n *   It should return `< 0` if the first value is less than the second.\n *   `0` if the values are equivalent, or `> 0` if the first value is\n *   greater than the second.\n *\n * @returns The minimum value in the iterable. If multiple values are\n *   equivalent to the minimum, the left-most value is returned. If\n *   the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { min } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n *   return a - b;\n * }\n *\n * min([7, 4, 0, 3, 9, 4], numberCmp);  // 0\n * ```\n */\nfunction min(object, fn) {\n    var it = iter(object);\n    var value = it.next();\n    if (value === undefined) {\n        return undefined;\n    }\n    var result = value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, result) < 0) {\n            result = value;\n        }\n    }\n    return result;\n}\n/**\n * Find the maximum value in an iterable.\n *\n * @param object - The iterable or array-like object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n *   It should return `< 0` if the first value is less than the second.\n *   `0` if the values are equivalent, or `> 0` if the first value is\n *   greater than the second.\n *\n * @returns The maximum value in the iterable. If multiple values are\n *   equivalent to the maximum, the left-most value is returned. If\n *   the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { max } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n *   return a - b;\n * }\n *\n * max([7, 4, 0, 3, 9, 4], numberCmp);  // 9\n * ```\n */\nfunction max(object, fn) {\n    var it = iter(object);\n    var value = it.next();\n    if (value === undefined) {\n        return undefined;\n    }\n    var result = value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, result) > 0) {\n            result = value;\n        }\n    }\n    return result;\n}\n/**\n * Find the minimum and maximum values in an iterable.\n *\n * @param object - The iterable or array-like object to search.\n *\n * @param fn - The 3-way comparison function to apply to the values.\n *   It should return `< 0` if the first value is less than the second.\n *   `0` if the values are equivalent, or `> 0` if the first value is\n *   greater than the second.\n *\n * @returns A 2-tuple of the `[min, max]` values in the iterable. If\n *   multiple values are equivalent, the left-most values are returned.\n *   If the iterable is empty, this returns `undefined`.\n *\n * #### Complexity\n * Linear.\n *\n * #### Example\n * ```typescript\n * import { minmax } from '@lumino/algorithm';\n *\n * function numberCmp(a: number, b: number): number {\n *   return a - b;\n * }\n *\n * minmax([7, 4, 0, 3, 9, 4], numberCmp);  // [0, 9]\n * ```\n */\nfunction minmax(object, fn) {\n    var it = iter(object);\n    var value = it.next();\n    if (value === undefined) {\n        return undefined;\n    }\n    var vmin = value;\n    var vmax = value;\n    while ((value = it.next()) !== undefined) {\n        if (fn(value, vmin) < 0) {\n            vmin = value;\n        }\n        else if (fn(value, vmax) > 0) {\n            vmax = value;\n        }\n    }\n    return [vmin, vmax];\n}\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Transform the values of an iterable with a mapping function.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param fn - The mapping function to invoke for each value.\n *\n * @returns An iterator which yields the transformed values.\n *\n * #### Example\n * ```typescript\n * import { map, toArray } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3];\n *\n * let stream = map(data, value => value * 2);\n *\n * toArray(stream);  // [2, 4, 6]\n * ```\n */\nfunction map(object, fn) {\n    return new MapIterator(iter(object), fn);\n}\n/**\n * An iterator which transforms values using a mapping function.\n */\nvar MapIterator = /** @class */ (function () {\n    /**\n     * Construct a new map iterator.\n     *\n     * @param source - The iterator of values of interest.\n     *\n     * @param fn - The mapping function to invoke for each value.\n     */\n    function MapIterator(source, fn) {\n        this._index = 0;\n        this._source = source;\n        this._fn = fn;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    MapIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    MapIterator.prototype.clone = function () {\n        var result = new MapIterator(this._source.clone(), this._fn);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    MapIterator.prototype.next = function () {\n        var value = this._source.next();\n        if (value === undefined) {\n            return undefined;\n        }\n        return this._fn.call(undefined, value, this._index++);\n    };\n    return MapIterator;\n}());\n\n/**\n * Create an iterator of evenly spaced values.\n *\n * @param start - The starting value for the range, inclusive.\n *\n * @param stop - The stopping value for the range, exclusive.\n *\n * @param step - The distance between each value.\n *\n * @returns An iterator which produces evenly spaced values.\n *\n * #### Notes\n * In the single argument form of `range(stop)`, `start` defaults to\n * `0` and `step` defaults to `1`.\n *\n * In the two argument form of `range(start, stop)`, `step` defaults\n * to `1`.\n */\nfunction range(start, stop, step) {\n    if (stop === undefined) {\n        return new RangeIterator(0, start, 1);\n    }\n    if (step === undefined) {\n        return new RangeIterator(start, stop, 1);\n    }\n    return new RangeIterator(start, stop, step);\n}\n/**\n * An iterator which produces a range of evenly spaced values.\n */\nvar RangeIterator = /** @class */ (function () {\n    /**\n     * Construct a new range iterator.\n     *\n     * @param start - The starting value for the range, inclusive.\n     *\n     * @param stop - The stopping value for the range, exclusive.\n     *\n     * @param step - The distance between each value.\n     */\n    function RangeIterator(start, stop, step) {\n        this._index = 0;\n        this._start = start;\n        this._stop = stop;\n        this._step = step;\n        this._length = Private.rangeLength(start, stop, step);\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    RangeIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    RangeIterator.prototype.clone = function () {\n        var result = new RangeIterator(this._start, this._stop, this._step);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    RangeIterator.prototype.next = function () {\n        if (this._index >= this._length) {\n            return undefined;\n        }\n        return this._start + this._step * this._index++;\n    };\n    return RangeIterator;\n}());\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Compute the effective length of a range.\n     *\n     * @param start - The starting value for the range, inclusive.\n     *\n     * @param stop - The stopping value for the range, exclusive.\n     *\n     * @param step - The distance between each value.\n     *\n     * @returns The number of steps need to traverse the range.\n     */\n    function rangeLength(start, stop, step) {\n        if (step === 0) {\n            return Infinity;\n        }\n        if (start > stop && step > 0) {\n            return 0;\n        }\n        if (start < stop && step < 0) {\n            return 0;\n        }\n        return Math.ceil((stop - start) / step);\n    }\n    Private.rangeLength = rangeLength;\n})(Private || (Private = {}));\n\n// Copyright (c) Jupyter Development Team.\nfunction reduce(object, fn, initial) {\n    // Setup the iterator and fetch the first value.\n    var index = 0;\n    var it = iter(object);\n    var first = it.next();\n    // An empty iterator and no initial value is an error.\n    if (first === undefined && initial === undefined) {\n        throw new TypeError('Reduce of empty iterable with no initial value.');\n    }\n    // If the iterator is empty, return the initial value.\n    if (first === undefined) {\n        return initial;\n    }\n    // If the iterator has a single item and no initial value, the\n    // reducer is not invoked and the first item is the return value.\n    var second = it.next();\n    if (second === undefined && initial === undefined) {\n        return first;\n    }\n    // If iterator has a single item and an initial value is provided,\n    // the reducer is invoked and that result is the return value.\n    if (second === undefined) {\n        return fn(initial, first, index++);\n    }\n    // Setup the initial accumlated value.\n    var accumulator;\n    if (initial === undefined) {\n        accumulator = fn(first, second, index++);\n    }\n    else {\n        accumulator = fn(fn(initial, first, index++), second, index++);\n    }\n    // Iterate the rest of the values, updating the accumulator.\n    var next;\n    while ((next = it.next()) !== undefined) {\n        accumulator = fn(accumulator, next, index++);\n    }\n    // Return the final accumulated value.\n    return accumulator;\n}\n\n/**\n * Create an iterator which repeats a value a number of times.\n *\n * @param value - The value to repeat.\n *\n * @param count - The number of times to repeat the value.\n *\n * @returns A new iterator which repeats the specified value.\n *\n * #### Example\n * ```typescript\n * import { repeat, toArray } from '@lumino/algorithm';\n *\n * let stream = repeat(7, 3);\n *\n * toArray(stream);  // [7, 7, 7]\n * ```\n */\nfunction repeat(value, count) {\n    return new RepeatIterator(value, count);\n}\n/**\n * Create an iterator which yields a value a single time.\n *\n * @param value - The value to wrap in an iterator.\n *\n * @returns A new iterator which yields the value a single time.\n *\n * #### Example\n * ```typescript\n * import { once, toArray } from '@lumino/algorithm';\n *\n * let stream = once(7);\n *\n * toArray(stream);  // [7]\n * ```\n */\nfunction once(value) {\n    return new RepeatIterator(value, 1);\n}\n/**\n * An iterator which repeats a value a specified number of times.\n */\nvar RepeatIterator = /** @class */ (function () {\n    /**\n     * Construct a new repeat iterator.\n     *\n     * @param value - The value to repeat.\n     *\n     * @param count - The number of times to repeat the value.\n     */\n    function RepeatIterator(value, count) {\n        this._value = value;\n        this._count = count;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    RepeatIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    RepeatIterator.prototype.clone = function () {\n        return new RepeatIterator(this._value, this._count);\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    RepeatIterator.prototype.next = function () {\n        if (this._count <= 0) {\n            return undefined;\n        }\n        this._count--;\n        return this._value;\n    };\n    return RepeatIterator;\n}());\n\n/**\n * Create an iterator for a retroable object.\n *\n * @param object - The retroable or array-like object of interest.\n *\n * @returns An iterator which traverses the object's values in reverse.\n *\n * #### Example\n * ```typescript\n * import { retro, toArray } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = retro(data);\n *\n * toArray(stream);  // [6, 5, 4, 3, 2, 1]\n * ```\n */\nfunction retro(object) {\n    var it;\n    if (typeof object.retro === 'function') {\n        it = object.retro();\n    }\n    else {\n        it = new RetroArrayIterator(object);\n    }\n    return it;\n}\n/**\n * An iterator which traverses an array-like object in reverse.\n *\n * #### Notes\n * This iterator can be used for any builtin JS array-like object.\n */\nvar RetroArrayIterator = /** @class */ (function () {\n    /**\n     * Construct a new retro iterator.\n     *\n     * @param source - The array-like object of interest.\n     */\n    function RetroArrayIterator(source) {\n        this._source = source;\n        this._index = source.length - 1;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    RetroArrayIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    RetroArrayIterator.prototype.clone = function () {\n        var result = new RetroArrayIterator(this._source);\n        result._index = this._index;\n        return result;\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    RetroArrayIterator.prototype.next = function () {\n        if (this._index < 0 || this._index >= this._source.length) {\n            return undefined;\n        }\n        return this._source[this._index--];\n    };\n    return RetroArrayIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Topologically sort an iterable of edges.\n *\n * @param edges - The iterable or array-like object of edges to sort.\n *   An edge is represented as a 2-tuple of `[fromNode, toNode]`.\n *\n * @returns The topologically sorted array of nodes.\n *\n * #### Notes\n * If a cycle is present in the graph, the cycle will be ignored and\n * the return value will be only approximately sorted.\n *\n * #### Example\n * ```typescript\n * import { topologicSort } from '@lumino/algorithm';\n *\n * let data = [\n *   ['d', 'e'],\n *   ['c', 'd'],\n *   ['a', 'b'],\n *   ['b', 'c']\n * ];\n *\n * topologicSort(data);  // ['a', 'b', 'c', 'd', 'e']\n * ```\n */\nfunction topologicSort(edges) {\n    // Setup the shared sorting state.\n    var sorted = [];\n    var visited = new Set();\n    var graph = new Map();\n    // Add the edges to the graph.\n    each(edges, addEdge);\n    // Visit each node in the graph.\n    graph.forEach(function (v, k) { visit(k); });\n    // Return the sorted results.\n    return sorted;\n    // Add an edge to the graph.\n    function addEdge(edge) {\n        var fromNode = edge[0], toNode = edge[1];\n        var children = graph.get(toNode);\n        if (children) {\n            children.push(fromNode);\n        }\n        else {\n            graph.set(toNode, [fromNode]);\n        }\n    }\n    // Recursively visit the node.\n    function visit(node) {\n        if (visited.has(node)) {\n            return;\n        }\n        visited.add(node);\n        var children = graph.get(node);\n        if (children) {\n            children.forEach(visit);\n        }\n        sorted.push(node);\n    }\n}\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Iterate over an iterable using a stepped increment.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param step - The distance to step on each iteration. A value\n *   of less than `1` will behave the same as a value of `1`.\n *\n * @returns An iterator which traverses the iterable step-wise.\n *\n * #### Example\n * ```typescript\n * import { stride, toArray } from '@lumino/algorithm';\n *\n * let data = [1, 2, 3, 4, 5, 6];\n *\n * let stream = stride(data, 2);\n *\n * toArray(stream);  // [1, 3, 5];\n * ```\n */\nfunction stride(object, step) {\n    return new StrideIterator(iter(object), step);\n}\n/**\n * An iterator which traverses a source iterator step-wise.\n */\nvar StrideIterator = /** @class */ (function () {\n    /**\n     * Construct a new stride iterator.\n     *\n     * @param source - The iterator of values of interest.\n     *\n     * @param step - The distance to step on each iteration. A value\n     *   of less than `1` will behave the same as a value of `1`.\n     */\n    function StrideIterator(source, step) {\n        this._source = source;\n        this._step = step;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    StrideIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    StrideIterator.prototype.clone = function () {\n        return new StrideIterator(this._source.clone(), this._step);\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    StrideIterator.prototype.next = function () {\n        var value = this._source.next();\n        for (var n = this._step - 1; n > 0; --n) {\n            this._source.next();\n        }\n        return value;\n    };\n    return StrideIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * The namespace for string-specific algorithms.\n */\nvar StringExt;\n(function (StringExt) {\n    /**\n     * Find the indices of characters in a source text.\n     *\n     * @param source - The source text which should be searched.\n     *\n     * @param query - The characters to locate in the source text.\n     *\n     * @param start - The index to start the search.\n     *\n     * @returns The matched indices, or `null` if there is no match.\n     *\n     * #### Complexity\n     * Linear on `sourceText`.\n     *\n     * #### Notes\n     * In order for there to be a match, all of the characters in `query`\n     * **must** appear in `source` in the order given by `query`.\n     *\n     * Characters are matched using strict `===` equality.\n     */\n    function findIndices(source, query, start) {\n        if (start === void 0) { start = 0; }\n        var indices = new Array(query.length);\n        for (var i = 0, j = start, n = query.length; i < n; ++i, ++j) {\n            j = source.indexOf(query[i], j);\n            if (j === -1) {\n                return null;\n            }\n            indices[i] = j;\n        }\n        return indices;\n    }\n    StringExt.findIndices = findIndices;\n    /**\n     * A string matcher which uses a sum-of-squares algorithm.\n     *\n     * @param source - The source text which should be searched.\n     *\n     * @param query - The characters to locate in the source text.\n     *\n     * @param start - The index to start the search.\n     *\n     * @returns The match result, or `null` if there is no match.\n     *   A lower `score` represents a stronger match.\n     *\n     * #### Complexity\n     * Linear on `sourceText`.\n     *\n     * #### Notes\n     * This scoring algorithm uses a sum-of-squares approach to determine\n     * the score. In order for there to be a match, all of the characters\n     * in `query` **must** appear in `source` in order. The index of each\n     * matching character is squared and added to the score. This means\n     * that early and consecutive character matches are preferred, while\n     * late matches are heavily penalized.\n     */\n    function matchSumOfSquares(source, query, start) {\n        if (start === void 0) { start = 0; }\n        var indices = findIndices(source, query, start);\n        if (!indices) {\n            return null;\n        }\n        var score = 0;\n        for (var i = 0, n = indices.length; i < n; ++i) {\n            var j = indices[i] - start;\n            score += j * j;\n        }\n        return { score: score, indices: indices };\n    }\n    StringExt.matchSumOfSquares = matchSumOfSquares;\n    /**\n     * A string matcher which uses a sum-of-deltas algorithm.\n     *\n     * @param source - The source text which should be searched.\n     *\n     * @param query - The characters to locate in the source text.\n     *\n     * @param start - The index to start the search.\n     *\n     * @returns The match result, or `null` if there is no match.\n     *   A lower `score` represents a stronger match.\n     *\n     * #### Complexity\n     * Linear on `sourceText`.\n     *\n     * #### Notes\n     * This scoring algorithm uses a sum-of-deltas approach to determine\n     * the score. In order for there to be a match, all of the characters\n     * in `query` **must** appear in `source` in order. The delta between\n     * the indices are summed to create the score. This means that groups\n     * of matched characters are preferred, while fragmented matches are\n     * penalized.\n     */\n    function matchSumOfDeltas(source, query, start) {\n        if (start === void 0) { start = 0; }\n        var indices = findIndices(source, query, start);\n        if (!indices) {\n            return null;\n        }\n        var score = 0;\n        var last = start - 1;\n        for (var i = 0, n = indices.length; i < n; ++i) {\n            var j = indices[i];\n            score += j - last - 1;\n            last = j;\n        }\n        return { score: score, indices: indices };\n    }\n    StringExt.matchSumOfDeltas = matchSumOfDeltas;\n    /**\n     * Highlight the matched characters of a source text.\n     *\n     * @param source - The text which should be highlighted.\n     *\n     * @param indices - The indices of the matched characters. They must\n     *   appear in increasing order and must be in bounds of the source.\n     *\n     * @param fn - The function to apply to the matched chunks.\n     *\n     * @returns An array of unmatched and highlighted chunks.\n     */\n    function highlight(source, indices, fn) {\n        // Set up the result array.\n        var result = [];\n        // Set up the counter variables.\n        var k = 0;\n        var last = 0;\n        var n = indices.length;\n        // Iterator over each index.\n        while (k < n) {\n            // Set up the chunk indices.\n            var i = indices[k];\n            var j = indices[k];\n            // Advance the right chunk index until it's non-contiguous.\n            while (++k < n && indices[k] === j + 1) {\n                j++;\n            }\n            // Extract the unmatched text.\n            if (last < i) {\n                result.push(source.slice(last, i));\n            }\n            // Extract and highlight the matched text.\n            if (i < j + 1) {\n                result.push(fn(source.slice(i, j + 1)));\n            }\n            // Update the last visited index.\n            last = j + 1;\n        }\n        // Extract any remaining unmatched text.\n        if (last < source.length) {\n            result.push(source.slice(last));\n        }\n        // Return the highlighted result.\n        return result;\n    }\n    StringExt.highlight = highlight;\n    /**\n     * A 3-way string comparison function.\n     *\n     * @param a - The first string of interest.\n     *\n     * @param b - The second string of interest.\n     *\n     * @returns `-1` if `a < b`, else `1` if `a > b`, else `0`.\n     */\n    function cmp(a, b) {\n        return a < b ? -1 : a > b ? 1 : 0;\n    }\n    StringExt.cmp = cmp;\n})(StringExt || (StringExt = {}));\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Take a fixed number of items from an iterable.\n *\n * @param object - The iterable or array-like object of interest.\n *\n * @param count - The number of items to take from the iterable.\n *\n * @returns An iterator which yields the specified number of items\n *   from the source iterable.\n *\n * #### Notes\n * The returned iterator will exhaust early if the source iterable\n * contains an insufficient number of items.\n */\nfunction take(object, count) {\n    return new TakeIterator(iter(object), count);\n}\n/**\n * An iterator which takes a fixed number of items from a source.\n */\nvar TakeIterator = /** @class */ (function () {\n    /**\n     * Construct a new take iterator.\n     *\n     * @param source - The iterator of interest.\n     *\n     * @param count - The number of items to take from the source.\n     */\n    function TakeIterator(source, count) {\n        this._source = source;\n        this._count = count;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    TakeIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    TakeIterator.prototype.clone = function () {\n        return new TakeIterator(this._source.clone(), this._count);\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    TakeIterator.prototype.next = function () {\n        if (this._count <= 0) {\n            return undefined;\n        }\n        var value = this._source.next();\n        if (value === undefined) {\n            return undefined;\n        }\n        this._count--;\n        return value;\n    };\n    return TakeIterator;\n}());\n\n// Copyright (c) Jupyter Development Team.\n/**\n * Iterate several iterables in lockstep.\n *\n * @param objects - The iterable or array-like objects of interest.\n *\n * @returns An iterator which yields successive tuples of values where\n *   each value is taken in turn from the provided iterables. It will\n *   be as long as the shortest provided iterable.\n *\n * #### Example\n * ```typescript\n * import { zip, toArray } from '@lumino/algorithm';\n *\n * let data1 = [1, 2, 3];\n * let data2 = [4, 5, 6];\n *\n * let stream = zip(data1, data2);\n *\n * toArray(stream);  // [[1, 4], [2, 5], [3, 6]]\n * ```\n */\nfunction zip() {\n    var objects = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        objects[_i] = arguments[_i];\n    }\n    return new ZipIterator(objects.map(iter));\n}\n/**\n * An iterator which iterates several sources in lockstep.\n */\nvar ZipIterator = /** @class */ (function () {\n    /**\n     * Construct a new zip iterator.\n     *\n     * @param source - The iterators of interest.\n     */\n    function ZipIterator(source) {\n        this._source = source;\n    }\n    /**\n     * Get an iterator over the object's values.\n     *\n     * @returns An iterator which yields the object's values.\n     */\n    ZipIterator.prototype.iter = function () {\n        return this;\n    };\n    /**\n     * Create an independent clone of the iterator.\n     *\n     * @returns A new independent clone of the iterator.\n     */\n    ZipIterator.prototype.clone = function () {\n        return new ZipIterator(this._source.map(function (it) { return it.clone(); }));\n    };\n    /**\n     * Get the next value from the iterator.\n     *\n     * @returns The next value from the iterator, or `undefined`.\n     */\n    ZipIterator.prototype.next = function () {\n        var result = new Array(this._source.length);\n        for (var i = 0, n = this._source.length; i < n; ++i) {\n            var value = this._source[i].next();\n            if (value === undefined) {\n                return undefined;\n            }\n            result[i] = value;\n        }\n        return result;\n    };\n    return ZipIterator;\n}());\n\n\n//# sourceMappingURL=index.es6.js.map\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@lumino/algorithm/dist/index.es6.js?");

/***/ })

}]);