diff --git a/.babelrc b/.babelrc index 2561971a..84c2aed1 100644 --- a/.babelrc +++ b/.babelrc @@ -29,6 +29,6 @@ } }, "ignore": [ - "src/grammar-parser/grammar-parser.js" + ] } diff --git a/.eslintrc b/.eslintrc index 59859948..23096ffd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,11 +1,183 @@ { "parser": "babel-eslint", - "rules": { - "strict": 0, - "quotes": [2, "single"] - }, + "extends": "airbnb-base", "env": { "browser": true, "node": true + }, + "globals": {}, + "rules": { + "class-methods-use-this": 0, + "no-undef": 0, + "new-cap": 2, + "newline-per-chained-call": 1, + "no-eq-null": 1, + "no-irregular-whitespace": 2, + "no-mixed-spaces-and-tabs": 2, + "no-multi-str": 2, + "no-multiple-empty-lines": 2, + "no-new": 2, + "no-param-reassign": 0, + "no-plusplus": 0, + "no-restricted-properties": 0, + "no-restricted-syntax": 1, + "no-shadow": 1, + "no-spaced-func": 2, + "no-trailing-spaces": 2, + "no-underscore-dangle": 0, + "no-unused-vars": 1, + "no-void": 0, + "no-with": 2, + "object-curly-spacing": 0, + "object-shorthand": 1, + "padded-blocks": 0, + "prefer-arrow-callback": 1, + "prefer-const": 0, + "prefer-rest-params": 1, + "prefer-spread": 1, + "prefer-template": 1, + "space-infix-ops": 2, + "arrow-body-style": [ + 2, + "as-needed" + ], + "camelcase": [ + 2, + { + "properties": "never" + } + ], + "curly": [ + 2, + "all" + ], + "no-mixed-operators": [ + 2, + "groups": [ + ["+", "-", "*", "/", "%", "**"] + ] + ], + "arrow-parens": [ + 2, + "always", + { + "requireForBlockBody": true + } + ], + "no-unneeded-ternary": [ + 2, + { + "defaultAssignment": true + } + ], + "no-confusing-arrow": [ + 2, + { + "allowParens": true + } + ], + "no-console": [ + 2, + { + "allow": ["error", "warn", "info"] + } + ], + "indent": [ + 2, + 2, + { + "SwitchCase": 1 + } + ], + "comma-style": [ + 2, + "last" + ], + "max-depth": [ + 2, + 5 + ], + "max-len": [ + 2, + { + "code": 150, + "ignoreComments": true + } + ], + "space-before-function-paren": [ + 2, + { + "anonymous": "ignore", + "named": "never" + } + ], + "array-bracket-spacing": [ + 2, + "never", + {} + ], + "space-in-parens": [ + 2, + "never" + ], + "quote-props": [ + 2, + "as-needed" + ], + "key-spacing": [ + 2, + { + "beforeColon": false, + "afterColon": true + } + ], + "space-unary-ops": [ + 2, + { + "words": false, + "nonwords": false + } + ], + "yoda": [ + 2, + "never" + ], + "brace-style": [ + 2, + "1tbs", + { + "allowSingleLine": true + } + ], + "comma-spacing": [ + 2, + { + "after": true, + "before": false + } + ], + "semi-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "space-before-blocks": [ + 2, + "always" + ], + "keyword-spacing": [ + 2, + {} + ], + "semi": [ + 2, + "always" + ], + "quotes": [ + 2, + "single" + ] } } diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index db3bad62..00000000 --- a/.jscsrc +++ /dev/null @@ -1,77 +0,0 @@ -{ - "disallowSpacesInNamedFunctionExpression": { - "beforeOpeningRoundBrace": true - }, - "disallowSpacesInFunctionExpression": { - "beforeOpeningRoundBrace": true - }, - "disallowSpacesInAnonymousFunctionExpression": { - "beforeOpeningRoundBrace": true - }, - "disallowSpacesInFunctionDeclaration": { - "beforeOpeningRoundBrace": true - }, - "disallowEmptyBlocks": true, - "disallowSpacesInCallExpression": true, - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowQuotedKeysInObjects": true, - "disallowSpaceAfterObjectKeys": true, - "disallowSpaceAfterPrefixUnaryOperators": true, - "disallowSpaceBeforePostfixUnaryOperators": true, - "disallowSpaceBeforeBinaryOperators": [ - "," - ], - "disallowMixedSpacesAndTabs": true, - "disallowTrailingWhitespace": true, - "requireTrailingComma": false, - "disallowYodaConditions": true, - "disallowKeywords": [ "with" ], - "disallowKeywordsOnNewLine": ["else"], - "disallowMultipleLineBreaks": true, - "disallowMultipleLineStrings": true, - "disallowMultipleVarDecl": false, - "disallowSpaceBeforeComma": true, - "disallowSpaceBeforeSemicolon": true, - "requireSpaceBeforeBlockStatements": true, - "requireParenthesesAroundIIFE": true, - "requireSpacesInConditionalExpression": true, - "requireBlocksOnNewline": 1, - "requireCommaBeforeLineBreak": true, - "requireSpaceBeforeBinaryOperators": true, - "requireSpaceAfterBinaryOperators": true, - "requireCamelCaseOrUpperCaseIdentifiers": true, - "requireLineFeedAtFileEnd": true, - "requireCapitalizedConstructors": true, - "requireDotNotation": true, - "requireSpacesInForStatement": true, - "requireSpaceBetweenArguments": true, - "requireCurlyBraces": [ - "if", - "else", - "for", - "while", - "do", - "switch" - ], - "requireSpaceAfterKeywords": [ - "if", - "else", - "for", - "while", - "do", - "switch", - "case", - "return", - "try", - "catch", - "typeof" - ], - "requirePaddingNewLinesBeforeLineComments": false, - "requirePaddingNewLinesAfterBlocks": false, - "requireSemicolons": true, - "validateQuoteMarks": "'", - "validateIndentation": 2, - "disallowNotOperatorsInConditionals": true, - "excludeFiles": ["src/grammar-parser/grammar-parser.js"] -} diff --git a/dist/formula-parser.js b/dist/formula-parser.js index 29b3cbff..57c15bc4 100644 --- a/dist/formula-parser.js +++ b/dist/formula-parser.js @@ -11,41 +11,41 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; - +/******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { - +/******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; - +/******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; - +/******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - +/******/ /******/ // Flag the module as loaded /******/ module.l = true; - +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } - - +/******/ +/******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; - +/******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; - +/******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; - +/******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { @@ -56,7 +56,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ }); /******/ } /******/ }; - +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -65,13 +65,13 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; - +/******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - +/******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; - +/******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 81); /******/ }) @@ -122,15 +122,15 @@ var errors = (_errors = {}, _errors[ERROR] = '#ERROR!', _errors[ERROR_DIV_ZERO] * @returns {String|null} Returns error id. */ function error(type) { - var error = void 0; + var result = void 0; type = (type + '').replace(/#|!|\?/g, ''); if (errors[type]) { - error = errors[type]; + result = errors[type]; } - return error ? error : null; + return result ? result : null; } /** @@ -143,7 +143,7 @@ function isValidStrict(type) { var valid = false; for (var i in errors) { - if (errors.hasOwnProperty(i) && errors[i] === type) { + if (Object.prototype.hasOwnProperty.call(errors, i) && errors[i] === type) { valid = true; break; } @@ -4452,54 +4452,44 @@ exports.VALUE = function(text) { exports.__esModule = true; -exports.extractLabel = extractLabel; -exports.toLabel = toLabel; -exports.columnLabelToIndex = columnLabelToIndex; -exports.columnIndexToLabel = columnIndexToLabel; exports.rowLabelToIndex = rowLabelToIndex; exports.rowIndexToLabel = rowIndexToLabel; -var LABEL_EXTRACT_REGEXP = /^([$])?([A-Za-z]+)([$])?([0-9]+)$/; - +exports.columnLabelToIndex = columnLabelToIndex; +exports.columnIndexToLabel = columnIndexToLabel; +exports.extractLabel = extractLabel; +exports.toLabel = toLabel; /** - * Extract cell coordinates. + * Convert row label to index. * - * @param {String} label Cell coordinates (eq. 'A1', '$B6', '$N$98'). - * @returns {Array} Returns an array of objects. + * @param {String} label Row label (eq. '1', '5') + * @returns {Number} Returns -1 if label is not recognized otherwise proper row index. */ -function extractLabel(label) { - if (typeof label !== 'string' || !LABEL_EXTRACT_REGEXP.test(label)) { - return []; - } +function rowLabelToIndex(label) { + var result = parseInt(label, 10); - var _label$toUpperCase$ma = label.toUpperCase().match(LABEL_EXTRACT_REGEXP), - columnAbs = _label$toUpperCase$ma[1], - column = _label$toUpperCase$ma[2], - rowAbs = _label$toUpperCase$ma[3], - row = _label$toUpperCase$ma[4]; + if (isNaN(result)) { + result = -1; + } else { + result = Math.max(result - 1, -1); + } - return [{ - index: rowLabelToIndex(row), - label: row, - isAbsolute: rowAbs === '$' - }, { - index: columnLabelToIndex(column), - label: column, - isAbsolute: columnAbs === '$' - }]; + return result; } /** - * Convert row and column indexes into cell label. + * Convert row index to label. * - * @param {Object} row Object with `index` and `isAbsolute` properties. - * @param {Object} column Object with `index` and `isAbsolute` properties. - * @returns {String} Returns cell label. + * @param {Number} row Row index. + * @returns {String} Returns row label (eq. '1', '7'). */ -function toLabel(row, column) { - var rowLabel = (row.isAbsolute ? '$' : '') + rowIndexToLabel(row.index); - var columnLabel = (column.isAbsolute ? '$' : '') + columnIndexToLabel(column.index); +function rowIndexToLabel(row) { + var result = ''; - return columnLabel + rowLabel; + if (row >= 0) { + result = '' + (row + 1); + } + + return result; } var COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -4543,38 +4533,48 @@ function columnIndexToLabel(column) { return result.toUpperCase(); } +var LABEL_EXTRACT_REGEXP = /^([$])?([A-Za-z]+)([$])?([0-9]+)$/; + /** - * Convert row label to index. + * Extract cell coordinates. * - * @param {String} label Row label (eq. '1', '5') - * @returns {Number} Returns -1 if label is not recognized otherwise proper row index. + * @param {String} label Cell coordinates (eq. 'A1', '$B6', '$N$98'). + * @returns {Array} Returns an array of objects. */ -function rowLabelToIndex(label) { - var result = parseInt(label, 10); - - if (isNaN(result)) { - result = -1; - } else { - result = Math.max(result - 1, -1); +function extractLabel(label) { + if (typeof label !== 'string' || !LABEL_EXTRACT_REGEXP.test(label)) { + return []; } - return result; + var _label$toUpperCase$ma = label.toUpperCase().match(LABEL_EXTRACT_REGEXP), + columnAbs = _label$toUpperCase$ma[1], + column = _label$toUpperCase$ma[2], + rowAbs = _label$toUpperCase$ma[3], + row = _label$toUpperCase$ma[4]; + + return [{ + index: rowLabelToIndex(row), + label: row, + isAbsolute: rowAbs === '$' + }, { + index: columnLabelToIndex(column), + label: column, + isAbsolute: columnAbs === '$' + }]; } /** - * Convert row index to label. + * Convert row and column indexes into cell label. * - * @param {Number} row Row index. - * @returns {String} Returns row label (eq. '1', '7'). + * @param {Object} row Object with `index` and `isAbsolute` properties. + * @param {Object} column Object with `index` and `isAbsolute` properties. + * @returns {String} Returns cell label. */ -function rowIndexToLabel(row) { - var result = ''; - - if (row >= 0) { - result = '' + (row + 1); - } +function toLabel(row, column) { + var rowLabel = (row.isAbsolute ? '$' : '') + rowIndexToLabel(row.index); + var columnLabel = (column.isAbsolute ? '$' : '') + columnIndexToLabel(column.index); - return result; + return columnLabel + rowLabel; } /***/ }), @@ -12208,22 +12208,9 @@ var _error = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +/* eslint-disable import/no-named-as-default-member */ var availableOperators = Object.create(null); -registerOperation(_add2['default'].SYMBOL, _add2['default']); -registerOperation(_ampersand2['default'].SYMBOL, _ampersand2['default']); -registerOperation(_divide2['default'].SYMBOL, _divide2['default']); -registerOperation(_equal2['default'].SYMBOL, _equal2['default']); -registerOperation(_power2['default'].SYMBOL, _power2['default']); -registerOperation(_formulaFunction2['default'].SYMBOL, _formulaFunction2['default']); -registerOperation(_greaterThan2['default'].SYMBOL, _greaterThan2['default']); -registerOperation(_greaterThanOrEqual2['default'].SYMBOL, _greaterThanOrEqual2['default']); -registerOperation(_lessThan2['default'].SYMBOL, _lessThan2['default']); -registerOperation(_lessThanOrEqual2['default'].SYMBOL, _lessThanOrEqual2['default']); -registerOperation(_multiply2['default'].SYMBOL, _multiply2['default']); -registerOperation(_notEqual2['default'].SYMBOL, _notEqual2['default']); -registerOperation(_minus2['default'].SYMBOL, _minus2['default']); - /** * Evaluate values by operator id.git * @@ -12262,6 +12249,20 @@ function registerOperation(symbol, func) { }); } +registerOperation(_add2['default'].SYMBOL, _add2['default']); +registerOperation(_ampersand2['default'].SYMBOL, _ampersand2['default']); +registerOperation(_divide2['default'].SYMBOL, _divide2['default']); +registerOperation(_equal2['default'].SYMBOL, _equal2['default']); +registerOperation(_power2['default'].SYMBOL, _power2['default']); +registerOperation(_formulaFunction2['default'].SYMBOL, _formulaFunction2['default']); +registerOperation(_greaterThan2['default'].SYMBOL, _greaterThan2['default']); +registerOperation(_greaterThanOrEqual2['default'].SYMBOL, _greaterThanOrEqual2['default']); +registerOperation(_lessThan2['default'].SYMBOL, _lessThan2['default']); +registerOperation(_lessThanOrEqual2['default'].SYMBOL, _lessThanOrEqual2['default']); +registerOperation(_multiply2['default'].SYMBOL, _multiply2['default']); +registerOperation(_notEqual2['default'].SYMBOL, _notEqual2['default']); +registerOperation(_minus2['default'].SYMBOL, _minus2['default']); + /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -12293,7 +12294,7 @@ function func(first) { } return result; -}; +} func.SYMBOL = SYMBOL; @@ -12316,7 +12317,7 @@ function func() { return params.reduce(function (acc, value) { return acc + value.toString(); }, ''); -}; +} func.SYMBOL = SYMBOL; @@ -12354,7 +12355,7 @@ function func(first) { } return result; -}; +} func.SYMBOL = SYMBOL; @@ -12371,7 +12372,7 @@ var SYMBOL = exports.SYMBOL = '='; function func(exp1, exp2) { return exp1 === exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12386,24 +12387,24 @@ exports.__esModule = true; exports.SYMBOL = undefined; exports['default'] = func; +var _formulajs = __webpack_require__(33); + +var formulajs = _interopRequireWildcard(_formulajs); + var _supportedFormulas = __webpack_require__(10); var _supportedFormulas2 = _interopRequireDefault(_supportedFormulas); var _error = __webpack_require__(1); -var _formulajs = __webpack_require__(33); - -var formulajs = _interopRequireWildcard(_formulajs); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var SYMBOL = exports.SYMBOL = _supportedFormulas2['default']; function func(symbol) { - return function () { + return function __formulaFunction() { symbol = symbol.toUpperCase(); var symbolParts = symbol.split('.'); @@ -12441,7 +12442,7 @@ function func(symbol) { return result; }; -}; +} func.isFactory = true; func.SYMBOL = SYMBOL; @@ -12459,7 +12460,7 @@ var SYMBOL = exports.SYMBOL = '>='; function func(exp1, exp2) { return exp1 >= exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12476,7 +12477,7 @@ var SYMBOL = exports.SYMBOL = '>'; function func(exp1, exp2) { return exp1 > exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12493,7 +12494,7 @@ var SYMBOL = exports.SYMBOL = '<='; function func(exp1, exp2) { return exp1 <= exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12510,7 +12511,7 @@ var SYMBOL = exports.SYMBOL = '<'; function func(exp1, exp2) { return exp1 < exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12545,7 +12546,7 @@ function func(first) { } return result; -}; +} func.SYMBOL = SYMBOL; @@ -12580,7 +12581,7 @@ function func(first) { } return result; -}; +} func.SYMBOL = SYMBOL; @@ -12597,7 +12598,7 @@ var SYMBOL = exports.SYMBOL = '<>'; function func(exp1, exp2) { return exp1 !== exp2; -}; +} func.SYMBOL = SYMBOL; @@ -12626,7 +12627,7 @@ function func(exp1, exp2) { } return result; -}; +} func.SYMBOL = SYMBOL; @@ -12639,6 +12640,7 @@ func.SYMBOL = SYMBOL; exports.__esModule = true; exports.trimEdges = trimEdges; +/* eslint-disable import/prefer-default-export */ /** * Trim value by cutting character starting from the beginning and ending at the same time. * diff --git a/dist/formula-parser.min.js b/dist/formula-parser.min.js index fe752957..e8c0df3c 100644 --- a/dist/formula-parser.min.js +++ b/dist/formula-parser.min.js @@ -1,15 +1,11 @@ -!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.formulaParser=t():r.formulaParser=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return r[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};return t.m=r,t.c=e,t.i=function(r){return r},t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(r){var e=r&&r.__esModule?function(){return r["default"]}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},t.p="",t(t.s=81)}([function(r,t){t.nil=Error("#NULL!"),t.div0=Error("#DIV/0!"),t.value=Error("#VALUE!"),t.ref=Error("#REF!"),t.name=Error("#NAME?"),t.num=Error("#NUM!"),t.na=Error("#N/A"),t.error=Error("#ERROR!"),t.data=Error("#GETTING_DATA")},function(r,t,e){"use strict";function n(r){var t=void 0;return r=(r+"").replace(/#|!|\?/g,""),h[r]&&(t=h[r]),t?t:null}function i(r){var t=!1;for(var e in h)if(h.hasOwnProperty(e)&&h[e]===r){t=!0;break}return t}t.__esModule=!0;var o;t["default"]=n,t.isValidStrict=i;var u=t.ERROR="ERROR",a=t.ERROR_DIV_ZERO="DIV/0",s=t.ERROR_NAME="NAME",l=t.ERROR_NOT_AVAILABLE="N/A",f=t.ERROR_NULL="NULL",c=t.ERROR_NUM="NUM",p=t.ERROR_REF="REF",m=t.ERROR_VALUE="VALUE",h=(o={},o[u]="#ERROR!",o[a]="#DIV/0!",o[s]="#NAME?",o[l]="#N/A",o[f]="#NULL!",o[c]="#NUM!",o[p]="#REF!",o[m]="#VALUE!",o)},function(r,t,e){var n=e(0);t.flattenShallow=function(r){return r&&r.reduce?r.reduce(function(r,t){var e=Array.isArray(r),n=Array.isArray(t);return e&&n?r.concat(t):e?(r.push(t),r):n?[r].concat(t):[r,t]}):r},t.isFlat=function(r){if(!r)return!1;for(var t=0;r.length>t;++t)if(Array.isArray(r[t]))return!1;return!0},t.flatten=function(){for(var r=t.argsToArray.apply(null,arguments);!t.isFlat(r);)r=t.flattenShallow(r);return r},t.argsToArray=function(r){var e=[];return t.arrayEach(r,function(r){e.push(r)}),e},t.numbers=function(){var r=this.flatten.apply(null,arguments);return r.filter(function(r){return"number"==typeof r})},t.cleanFloat=function(r){var t=1e14;return Math.round(r*t)/t},t.parseBool=function(r){if("boolean"==typeof r)return r;if(r instanceof Error)return r;if("number"==typeof r)return 0!==r;if("string"==typeof r){var t=r.toUpperCase();if("TRUE"===t)return!0;if("FALSE"===t)return!1}return r instanceof Date&&!isNaN(r)||n.value},t.parseNumber=function(r){return void 0===r||""===r?n.value:isNaN(r)?n.value:parseFloat(r)},t.parseNumberArray=function(r){var e;if(!r||0===(e=r.length))return n.value;for(var i;e--;){if(i=t.parseNumber(r[e]),i===n.value)return i;r[e]=i}return r},t.parseMatrix=function(r){var e;if(!r||0===(e=r.length))return n.value;for(var i,o=0;r.length>o;o++)if(i=t.parseNumberArray(r[o]),r[o]=i,i instanceof Error)return i;return r};var i=new Date(1900,0,1);t.parseDate=function(r){if(!isNaN(r)){if(r instanceof Date)return new Date(r);var t=parseInt(r,10);return 0>t?n.num:t>60?new Date(i.getTime()+864e5*(t-2)):new Date(i.getTime()+864e5*(t-1))}return"string"!=typeof r||(r=new Date(r),isNaN(r))?n.value:r},t.parseDateArray=function(r){for(var t,e=r.length;e--;){if(t=this.parseDate(r[e]),t===n.value)return t;r[e]=t}return r},t.anyIsError=function(){for(var r=arguments.length;r--;)if(arguments[r]instanceof Error)return!0;return!1},t.arrayValuesToNumbers=function(r){for(var t,e=r.length;e--;)if(t=r[e],"number"!=typeof t)if(t!==!0)if(t!==!1){if("string"==typeof t){var n=this.parseNumber(t);r[e]=n instanceof Error?0:n}}else r[e]=0;else r[e]=1;return r},t.rest=function(r,t){return t=t||1,r&&"function"==typeof r.slice?r.slice(t):r},t.initial=function(r,t){return t=t||1,r&&"function"==typeof r.slice?r.slice(0,r.length-t):r},t.arrayEach=function(r,t){for(var e=-1,n=r.length;++e-1?parseFloat(r):parseInt(r,10)),t}function i(r){return-1*n(r)}t.__esModule=!0,t.toNumber=n,t.invertNumber=i},function(module,exports,__webpack_require__){var utils=__webpack_require__(2),error=__webpack_require__(0),statistical=__webpack_require__(5),information=__webpack_require__(7);exports.ABS=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.abs(r);return t},exports.ACOS=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.acos(r);return isNaN(t)&&(t=error.num),t},exports.ACOSH=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.log(r+Math.sqrt(r*r-1));return isNaN(t)&&(t=error.num),t},exports.ACOT=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.atan(1/r);return t},exports.ACOTH=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=.5*Math.log((r+1)/(r-1));return isNaN(t)&&(t=error.num),t},exports.AGGREGATE=function(r,t,e,n){if(r=utils.parseNumber(r),t=utils.parseNumber(r),utils.anyIsError(r,t))return error.value;switch(r){case 1:return statistical.AVERAGE(e);case 2:return statistical.COUNT(e);case 3:return statistical.COUNTA(e);case 4:return statistical.MAX(e);case 5:return statistical.MIN(e);case 6:return exports.PRODUCT(e);case 7:return statistical.STDEV.S(e);case 8:return statistical.STDEV.P(e);case 9:return exports.SUM(e);case 10:return statistical.VAR.S(e);case 11:return statistical.VAR.P(e);case 12:return statistical.MEDIAN(e);case 13:return statistical.MODE.SNGL(e);case 14:return statistical.LARGE(e,n);case 15:return statistical.SMALL(e,n);case 16:return statistical.PERCENTILE.INC(e,n);case 17:return statistical.QUARTILE.INC(e,n);case 18:return statistical.PERCENTILE.EXC(e,n);case 19:return statistical.QUARTILE.EXC(e,n)}},exports.ARABIC=function(r){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(r))return error.value;var t=0;return r.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(r){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[r]}),t},exports.ASIN=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.asin(r);return isNaN(t)&&(t=error.num),t},exports.ASINH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r+Math.sqrt(r*r+1))},exports.ATAN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.atan(r)},exports.ATAN2=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.atan2(r,t)},exports.ATANH=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.log((1+r)/(1-r))/2;return isNaN(t)&&(t=error.num),t},exports.BASE=function(r,t,e){if(e=e||0,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;e=void 0===e?0:e;var n=r.toString(t);return Array(Math.max(e+1-n.length,0)).join("0")+n},exports.CEILING=function(r,t,e){if(t=void 0===t?1:Math.abs(t),e=e||0,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;if(0===t)return 0;var n=-Math.floor(Math.log(t)/Math.log(10));return 0>r?0===e?-exports.ROUND(Math.floor(Math.abs(r)/t)*t,n):-exports.ROUND(Math.ceil(Math.abs(r)/t)*t,n):exports.ROUND(Math.ceil(r/t)*t,n)},exports.CEILING.MATH=exports.CEILING,exports.CEILING.PRECISE=exports.CEILING,exports.COMBIN=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:exports.FACT(r)/(exports.FACT(t)*exports.FACT(r-t))},exports.COMBINA=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0===r&&0===t?1:exports.COMBIN(r+t-1,r-1)},exports.COS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.cos(r)},exports.COSH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:(Math.exp(r)+Math.exp(-r))/2},exports.COT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.tan(r)},exports.COTH=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.exp(2*r);return(t+1)/(t-1)},exports.CSC=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.sin(r)},exports.CSCH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:2/(Math.exp(r)-Math.exp(-r))},exports.DECIMAL=function(r,t){return 1>arguments.length?error.value:parseInt(r,t)},exports.DEGREES=function(r){return r=utils.parseNumber(r),r instanceof Error?r:180*r/Math.PI},exports.EVEN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:exports.CEILING(r,-2,-1)},exports.EXP=Math.exp;var MEMOIZED_FACT=[];exports.FACT=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.floor(r);return 0===t||1===t?1:MEMOIZED_FACT[t]>0?MEMOIZED_FACT[t]:MEMOIZED_FACT[t]=exports.FACT(t-1)*t},exports.FACTDOUBLE=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.floor(r);return t>0?t*exports.FACTDOUBLE(t-2):1},exports.FLOOR=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;if(0===t)return 0;if(!(r>0&&t>0||0>r&&0>t))return error.num;t=Math.abs(t);var e=-Math.floor(Math.log(t)/Math.log(10));return 0>r?-exports.ROUND(Math.ceil(Math.abs(r)/t),e):exports.ROUND(Math.floor(r/t)*t,e)},exports.FLOOR.MATH=function(r,t,e){if(t=void 0===t?1:t,e=void 0===e?0:e,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;if(0===t)return 0;t=t?Math.abs(t):1;var n=-Math.floor(Math.log(t)/Math.log(10));return 0>r?0===e||void 0===e?-exports.ROUND(Math.ceil(Math.abs(r)/t)*t,n):-exports.ROUND(Math.floor(Math.abs(r)/t)*t,n):exports.ROUND(Math.floor(r/t)*t,n)},exports.FLOOR.PRECISE=exports.FLOOR.MATH,exports.GCD=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=r.length,e=r[0],n=0>e?-e:e,i=1;t>i;i++){for(var o=r[i],u=0>o?-o:o;n&&u;)n>u?n%=u:u%=n;n+=u}return n},exports.INT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.floor(r)},exports.ISO={CEILING:exports.CEILING},exports.LCM=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t,e,n,i,o=1;void 0!==(n=r.pop());)for(;n>1;){if(n%2){for(t=3,e=Math.floor(Math.sqrt(n));e>=t&&n%t;t+=2);i=t>e?n:t}else i=2;for(n/=i,o*=i,t=r.length;t;r[--t]%i===0&&1===(r[t]/=i)&&r.splice(t,1));}return o},exports.LN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r)},exports.LN10=function(){return Math.log(10)},exports.LN2=function(){return Math.log(2)},exports.LOG10E=function(){return Math.LOG10E},exports.LOG2E=function(){return Math.LOG2E},exports.LOG=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:(t=void 0===t?10:t,Math.log(r)/Math.log(t))},exports.LOG10=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r)/Math.log(10)},exports.MOD=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;if(0===t)return error.div0;var e=Math.abs(r%t);return t>0?e:-e},exports.MROUND=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0>r*t?error.num:Math.round(r/t)*t},exports.MULTINOMIAL=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=0,e=1,n=0;r.length>n;n++)t+=r[n],e*=exports.FACT(r[n]);return exports.FACT(t)/e},exports.ODD=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.ceil(Math.abs(r));return t=1&t?t:t+1,r>0?t:-t},exports.PI=function(){return Math.PI},exports.E=function(){return Math.E},exports.POWER=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=Math.pow(r,t);return isNaN(e)?error.num:e},exports.PRODUCT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=1,e=0;r.length>e;e++)t*=r[e];return t},exports.QUOTIENT=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:parseInt(r/t,10)},exports.RADIANS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:r*Math.PI/180},exports.RAND=function(){return Math.random()},exports.RANDBETWEEN=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r+Math.ceil((t-r+1)*Math.random())-1},exports.ROMAN=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;for(var t=(r+"").split(""),e=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],n="",i=3;i--;)n=(e[+t.pop()+10*i]||"")+n;return Array(+t.join("")+1).join("M")+n},exports.ROUND=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.round(r*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDDOWN=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=r>0?1:-1;return e*Math.floor(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDUP=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=r>0?1:-1;return e*Math.ceil(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)},exports.SEC=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.cos(r)},exports.SECH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:2/(Math.exp(r)+Math.exp(-r))},exports.SERIESSUM=function(r,t,e,n){if(r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumberArray(n),utils.anyIsError(r,t,e,n))return error.value;for(var i=n[0]*Math.pow(r,t),o=1;n.length>o;o++)i+=n[o]*Math.pow(r,t+o*e);return i},exports.SIGN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0>r?-1:0===r?0:1},exports.SIN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.sin(r)},exports.SINH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:(Math.exp(r)-Math.exp(-r))/2},exports.SQRT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0>r?error.num:Math.sqrt(r)},exports.SQRTPI=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.sqrt(r*Math.PI)},exports.SQRT1_2=function(){return 1/Math.sqrt(2)},exports.SQRT2=function(){return Math.sqrt(2)},exports.SUBTOTAL=function(r,t){if(r=utils.parseNumber(r),r instanceof Error)return r;switch(r){case 1:return statistical.AVERAGE(t);case 2:return statistical.COUNT(t);case 3:return statistical.COUNTA(t);case 4:return statistical.MAX(t);case 5:return statistical.MIN(t);case 6:return exports.PRODUCT(t);case 7:return statistical.STDEV.S(t);case 8:return statistical.STDEV.P(t);case 9:return exports.SUM(t);case 10:return statistical.VAR.S(t);case 11:return statistical.VAR.P(t);case 101:return statistical.AVERAGE(t);case 102:return statistical.COUNT(t);case 103:return statistical.COUNTA(t);case 104:return statistical.MAX(t);case 105:return statistical.MIN(t);case 106:return exports.PRODUCT(t);case 107:return statistical.STDEV.S(t);case 108:return statistical.STDEV.P(t);case 109:return exports.SUM(t);case 110:return statistical.VAR.S(t);case 111:return statistical.VAR.P(t)}},exports.ADD=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r+t)},exports.MINUS=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r-t)},exports.DIVIDE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0===t?error.div0:r/t)},exports.MULTIPLY=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r*t)},exports.GTE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:r>=t)},exports.LT=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:t>r)},exports.LTE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:t>=r)},exports.EQ=function(r,t){return 2!==arguments.length?error.na:r===t},exports.NE=function(r,t){return 2!==arguments.length?error.na:r!==t},exports.POW=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:exports.POWER(r,t))},exports.SUM=function(){var r=0;return utils.arrayEach(utils.argsToArray(arguments),function(t){if("number"==typeof t)r+=t;else if("string"==typeof t){var e=parseFloat(t);!isNaN(e)&&(r+=e)}else Array.isArray(t)&&(r+=exports.SUM.apply(null,t))}),r},exports.SUMIF=function(range,criteria){if(range=utils.parseNumberArray(utils.flatten(range)),range instanceof Error)return range;for(var result=0,i=0;range.length>i;i++)result+=eval(range[i]+criteria)?range[i]:0;return result},exports.SUMIFS=function(){var args=utils.argsToArray(arguments),range=utils.parseNumberArray(utils.flatten(args.shift()));if(range instanceof Error)return range;for(var criteria=args,n_range_elements=range.length,n_criterias=criteria.length,result=0,i=0;n_range_elements>i;i++){for(var el=range[i],condition="",c=0;n_criterias>c;c++)condition+=el+criteria[c],c!==n_criterias-1&&(condition+="&&");eval(condition)&&(result+=el)}return result},exports.SUMPRODUCT=function(){if(!arguments||0===arguments.length)return error.value;for(var r,t,e,n,i=arguments.length+1,o=0,u=0;arguments[0].length>u;u++)if(arguments[0][u]instanceof Array)for(var a=0;arguments[0][u].length>a;a++){for(r=1,t=1;i>t;t++){if(n=utils.parseNumber(arguments[t-1][u][a]),n instanceof Error)return n;r*=n}o+=r}else{for(r=1,t=1;i>t;t++){if(e=utils.parseNumber(arguments[t-1][u]),e instanceof Error)return e;r*=e}o+=r}return o},exports.SUMSQ=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=0,e=r.length,n=0;e>n;n++)t+=information.ISNUMBER(r[n])?r[n]*r[n]:0;return t},exports.SUMX2MY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=0,n=0;r.length>n;n++)e+=r[n]*r[n]-t[n]*t[n];return e},exports.SUMX2PY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e=0;r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t));for(var n=0;r.length>n;n++)e+=r[n]*r[n]+t[n]*t[n];return e},exports.SUMXMY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e=0;r=utils.flatten(r),t=utils.flatten(t);for(var n=0;r.length>n;n++)e+=Math.pow(r[n]-t[n],2);return e},exports.TAN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.tan(r)},exports.TANH=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.exp(2*r);return(t-1)/(t+1)},exports.TRUNC=function(r,t){if(t=void 0===t?0:t,r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=r>0?1:-1;return e*Math.floor(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)}},function(module,exports,__webpack_require__){var mathTrig=__webpack_require__(4),text=__webpack_require__(8),jStat=__webpack_require__(13).jStat,utils=__webpack_require__(2),error=__webpack_require__(0),misc=__webpack_require__(12),SQRT2PI=2.5066282746310002;exports.AVEDEV=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:jStat.sum(jStat(r).subtract(jStat.mean(r)).abs()[0])/r.length},exports.AVERAGE=function(){for(var r,t=utils.numbers(utils.flatten(arguments)),e=t.length,n=0,i=0,o=0;e>o;o++)n+=t[o],i+=1;return r=n/i,isNaN(r)&&(r=error.num),r},exports.AVERAGEA=function(){for(var r,t=utils.flatten(arguments),e=t.length,n=0,i=0,o=0;e>o;o++){var u=t[o];"number"==typeof u&&(n+=u),u===!0&&n++,null!==u&&i++}return r=n/i,isNaN(r)&&(r=error.num),r},exports.AVERAGEIF=function(range,criteria,average_range){if(1>=arguments.length)return error.na;if(average_range=average_range||range,range=utils.flatten(range),average_range=utils.parseNumberArray(utils.flatten(average_range)),average_range instanceof Error)return average_range;for(var average_count=0,result=0,i=0;range.length>i;i++)eval(range[i]+criteria)&&(result+=average_range[i],average_count++);return result/average_count},exports.AVERAGEIFS=function(){for(var args=utils.argsToArray(arguments),criteria=(args.length-1)/2,range=utils.flatten(args[0]),count=0,result=0,i=0;range.length>i;i++){for(var condition="",j=0;criteria>j;j++)condition+=args[2*j+1][i]+args[2*j+2],j!==criteria-1&&(condition+="&&");eval(condition)&&(result+=range[i],count++)}var average=result/count;return isNaN(average)?0:average},exports.BETA={},exports.BETA.DIST=function(r,t,e,n,i,o){return 4>arguments.length?error.value:(i=void 0===i?0:i,o=void 0===o?1:o,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),i=utils.parseNumber(i),o=utils.parseNumber(o),utils.anyIsError(r,t,e,i,o)?error.value:(r=(r-i)/(o-i),n?jStat.beta.cdf(r,t,e):jStat.beta.pdf(r,t,e)))},exports.BETA.INV=function(r,t,e,n,i){return n=void 0===n?0:n,i=void 0===i?1:i,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),i=utils.parseNumber(i),utils.anyIsError(r,t,e,n,i)?error.value:jStat.beta.inv(r,t,e)*(i-n)+n},exports.BINOM={},exports.BINOM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n)?error.value:n?jStat.binomial.cdf(r,t,e):jStat.binomial.pdf(r,t,e)},exports.BINOM.DIST.RANGE=function(r,t,e,n){if(n=void 0===n?e:n,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n))return error.value;for(var i=0,o=e;n>=o;o++)i+=mathTrig.COMBIN(r,o)*Math.pow(t,o)*Math.pow(1-t,r-o);return i},exports.BINOM.INV=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;for(var n=0;r>=n;){if(jStat.binomial.cdf(n,r,t)>=e)return n;n++}},exports.CHISQ={},exports.CHISQ.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.chisquare.cdf(r,t):jStat.chisquare.pdf(r,t)},exports.CHISQ.DIST.RT=function(r,t){return!r|!t?error.na:1>r||t>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t?error.value:1-jStat.chisquare.cdf(r,t)},exports.CHISQ.INV=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:jStat.chisquare.inv(r,t)},exports.CHISQ.INV.RT=function(r,t){return!r|!t?error.na:0>r||r>1||1>t||t>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t?error.value:jStat.chisquare.inv(1-r,t)},exports.CHISQ.TEST=function(r,t){function e(r,t){var e=Math.exp(-.5*r);t%2===1&&(e*=Math.sqrt(2*r/f));for(var n=t;n>=2;)e=e*r/n,n-=2;for(var i=e,o=t;i>1e-10*e;)o+=2,i=i*r/o,e+=i;return 1-e}if(2!==arguments.length)return error.na;if(!(r instanceof Array&&t instanceof Array))return error.value;if(r.length!==t.length)return error.value;if(r[0]&&t[0]&&r[0].length!==t[0].length)return error.value;var n,i,o,u=r.length;for(i=0;u>i;i++)r[i]instanceof Array||(n=r[i],r[i]=[],r[i].push(n)),t[i]instanceof Array||(n=t[i],t[i]=[],t[i].push(n));var a=r[0].length,s=1===a?u-1:(u-1)*(a-1),l=0,f=Math.PI;for(i=0;u>i;i++)for(o=0;a>o;o++)l+=Math.pow(r[i][o]-t[i][o],2)/t[i][o];return Math.round(1e6*e(l,s))/1e6},exports.COLUMN=function(r,t){if(2!==arguments.length)return error.na;if(0>t)return error.num;if(!(r instanceof Array)||"number"!=typeof t)return error.value;if(0!==r.length)return jStat.col(r,t)},exports.COLUMNS=function(r){return 1!==arguments.length?error.na:r instanceof Array?0===r.length?0:jStat.cols(r):error.value},exports.CONFIDENCE={},exports.CONFIDENCE.NORM=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.normalci(1,r,t,e)[1]-1},exports.CONFIDENCE.T=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.tci(1,r,t,e)[1]-1},exports.CORREL=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:jStat.corrcoeff(r,t)},exports.COUNT=function(){return utils.numbers(utils.flatten(arguments)).length},exports.COUNTA=function(){var r=utils.flatten(arguments);return r.length-exports.COUNTBLANK(r)},exports.COUNTIN=function(r,t){var e=0;r=utils.flatten(r);for(var n=0;r.length>n;n++)r[n]===t&&e++;return e},exports.COUNTBLANK=function(){for(var r,t=utils.flatten(arguments),e=0,n=0;t.length>n;n++)r=t[n],null!==r&&""!==r||e++;return e},exports.COUNTIF=function(range,criteria){range=utils.flatten(range),/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var matches=0,i=0;range.length>i;i++)"string"!=typeof range[i]?eval(range[i]+criteria)&&matches++:eval('"'+range[i]+'"'+criteria)&&matches++;return matches},exports.COUNTIFS=function(){for(var args=utils.argsToArray(arguments),results=Array(utils.flatten(args[0]).length),i=0;results.length>i;i++)results[i]=!0;for(i=0;args.length>i;i+=2){var range=utils.flatten(args[i]),criteria=args[i+1];/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var j=0;range.length>j;j++)results[j]="string"!=typeof range[j]?results[j]&&eval(range[j]+criteria):results[j]&&eval('"'+range[j]+'"'+criteria)}var result=0;for(i=0;results.length>i;i++)results[i]&&result++;return result},exports.COUNTUNIQUE=function(){return misc.UNIQUE.apply(null,utils.flatten(arguments)).length},exports.COVARIANCE={},exports.COVARIANCE.P=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),i=0,o=r.length,u=0;o>u;u++)i+=(r[u]-e)*(t[u]-n);return i/o},exports.COVARIANCE.S=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:jStat.covariance(r,t)},exports.DEVSQ=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=0,n=0;r.length>n;n++)e+=Math.pow(r[n]-t,2);return e},exports.EXPON={},exports.EXPON.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.exponential.cdf(r,t):jStat.exponential.pdf(r,t)},exports.F={},exports.F.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.centralF.cdf(r,t,e):jStat.centralF.pdf(r,t,e)},exports.F.DIST.RT=function(r,t,e){return 3!==arguments.length?error.na:0>r||1>t||1>e?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:1-jStat.centralF.cdf(r,t,e)},exports.F.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:0>=r||r>1?error.num:jStat.centralF.inv(r,t,e)},exports.F.INV.RT=function(r,t,e){return 3!==arguments.length?error.na:0>r||r>1||1>t||t>Math.pow(10,10)||1>e||e>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:jStat.centralF.inv(1-r,t,e)},exports.F.TEST=function(r,t){if(!r||!t)return error.na;if(!(r instanceof Array&&t instanceof Array))return error.na;if(2>r.length||2>t.length)return error.div0;var e=function(r,t){for(var e=0,n=0;r.length>n;n++)e+=Math.pow(r[n]-t,2);return e},n=mathTrig.SUM(r)/r.length,i=mathTrig.SUM(t)/t.length,o=e(r,n)/(r.length-1),u=e(t,i)/(t.length-1);return o/u},exports.FISHER=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log((1+r)/(1-r))/2},exports.FISHERINV=function(r){if(r=utils.parseNumber(r),r instanceof Error)return r;var t=Math.exp(2*r);return(t-1)/(t+1)},exports.FORECAST=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(r,t,e))return error.value;for(var n=jStat.mean(e),i=jStat.mean(t),o=e.length,u=0,a=0,s=0;o>s;s++)u+=(e[s]-n)*(t[s]-i),a+=Math.pow(e[s]-n,2);var l=u/a,f=i-l*n;return f+l*r},exports.FREQUENCY=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=r.length,n=t.length,i=[],o=0;n>=o;o++){i[o]=0;for(var u=0;e>u;u++)0===o?r[u]>t[0]||(i[0]+=1):n>o?r[u]>t[o-1]&&t[o]>=r[u]&&(i[o]+=1):o===n&&r[u]>t[n-1]&&(i[n]+=1)}return i},exports.GAMMA=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0===r?error.num:parseInt(r,10)===r&&0>r?error.num:jStat.gammafn(r)},exports.GAMMA.DIST=function(r,t,e,n){return 4!==arguments.length?error.na:r>=0&&t>0&&e>0?"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:n?jStat.gamma.cdf(r,t,e,!0):jStat.gamma.pdf(r,t,e,!1):error.value},exports.GAMMA.INV=function(r,t,e){return 3!==arguments.length?error.na:0>r||r>1||0>=t||0>=e?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:jStat.gamma.inv(r,t,e)},exports.GAMMALN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:jStat.gammaln(r)},exports.GAMMALN.PRECISE=function(r){return 1!==arguments.length?error.na:r>0?"number"!=typeof r?error.value:jStat.gammaln(r):error.num},exports.GAUSS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:jStat.normal.cdf(r,0,1)-.5},exports.GEOMEAN=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:jStat.geomean(r)},exports.GROWTH=function(r,t,e,n){if(r=utils.parseNumberArray(r),r instanceof Error)return r;var i;if(void 0===t)for(t=[],i=1;r.length>=i;i++)t.push(i);if(void 0===e)for(e=[],i=1;r.length>=i;i++)e.push(i);if(t=utils.parseNumberArray(t),e=utils.parseNumberArray(e),utils.anyIsError(t,e))return error.value;void 0===n&&(n=!0);var o=r.length,u=0,a=0,s=0,l=0;for(i=0;o>i;i++){var f=t[i],c=Math.log(r[i]);u+=f,a+=c,s+=f*c,l+=f*f}u/=o,a/=o,s/=o,l/=o;var p,m;n?(p=(s-u*a)/(l-u*u),m=a-p*u):(p=s/l,m=0);var h=[];for(i=0;e.length>i;i++)h.push(Math.exp(m+p*e[i]));return h},exports.HARMEAN=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=r.length,e=0,n=0;t>n;n++)e+=1/r[n];return t/e},exports.HYPGEOM={},exports.HYPGEOM.DIST=function(r,t,e,n,i){function o(r,t,e,n){return mathTrig.COMBIN(e,r)*mathTrig.COMBIN(n-e,t-r)/mathTrig.COMBIN(n,t)}function u(r,t,e,n){for(var i=0,u=0;r>=u;u++)i+=o(u,t,e,n);return i}return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n)?error.value:i?u(r,t,e,n):o(r,t,e,n)},exports.INTERCEPT=function(r,t){return r=utils.parseNumberArray(r),t=utils.parseNumberArray(t),utils.anyIsError(r,t)?error.value:r.length!==t.length?error.na:exports.FORECAST(0,r,t)},exports.KURT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,i=0;e>i;i++)n+=Math.pow(r[i]-t,4);return n/=Math.pow(jStat.stdev(r,!0),4),e*(e+1)/((e-1)*(e-2)*(e-3))*n-3*(e-1)*(e-1)/((e-2)*(e-3))},exports.LARGE=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t)?r:r.sort(function(r,t){return t-r})[t-1]},exports.LINEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),i=t.length,o=0,u=0,a=0;i>a;a++)o+=(t[a]-n)*(r[a]-e),u+=Math.pow(t[a]-n,2); -var s=o/u,l=e-s*n;return[s,l]},exports.LOGEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=0;r.length>e;e++)r[e]=Math.log(r[e]);var n=exports.LINEST(r,t);return n[0]=Math.round(1e6*Math.exp(n[0]))/1e6,n[1]=Math.round(1e6*Math.exp(n[1]))/1e6,n},exports.LOGNORM={},exports.LOGNORM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.lognormal.cdf(r,t,e):jStat.lognormal.pdf(r,t,e)},exports.LOGNORM.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.lognormal.inv(r,t,e)},exports.MAX=function(){var r=utils.numbers(utils.flatten(arguments));return 0===r.length?0:Math.max.apply(Math,r)},exports.MAXA=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===r.length?0:Math.max.apply(Math,r)},exports.MEDIAN=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments)),t=jStat.median(r);return isNaN(t)&&(t=error.num),t},exports.MIN=function(){var r=utils.numbers(utils.flatten(arguments));return 0===r.length?0:Math.min.apply(Math,r)},exports.MINA=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===r.length?0:Math.min.apply(Math,r)},exports.MODE={},exports.MODE.MULT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t,e=r.length,n={},i=[],o=0,u=0;e>u;u++)t=r[u],n[t]=n[t]?n[t]+1:1,n[t]>o&&(o=n[t],i=[]),n[t]===o&&(i[i.length]=t);return i},exports.MODE.SNGL=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:exports.MODE.MULT(r).sort(function(r,t){return r-t})[0]},exports.NEGBINOM={},exports.NEGBINOM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.negbin.cdf(r,t,e):jStat.negbin.pdf(r,t,e)},exports.NORM={},exports.NORM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:e>0?n?jStat.normal.cdf(r,t,e):jStat.normal.pdf(r,t,e):error.num},exports.NORM.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.normal.inv(r,t,e)},exports.NORM.S={},exports.NORM.S.DIST=function(r,t){return r=utils.parseNumber(r),r instanceof Error?error.value:t?jStat.normal.cdf(r,0,1):jStat.normal.pdf(r,0,1)},exports.NORM.S.INV=function(r){return r=utils.parseNumber(r),r instanceof Error?error.value:jStat.normal.inv(r,0,1)},exports.PEARSON=function(r,t){if(t=utils.parseNumberArray(utils.flatten(t)),r=utils.parseNumberArray(utils.flatten(r)),utils.anyIsError(t,r))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),i=r.length,o=0,u=0,a=0,s=0;i>s;s++)o+=(r[s]-e)*(t[s]-n),u+=Math.pow(r[s]-e,2),a+=Math.pow(t[s]-n,2);return o/Math.sqrt(u*a)},exports.PERCENTILE={},exports.PERCENTILE.EXC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;r=r.sort(function(r,t){return r-t});var e=r.length;if(1/(e+1)>t||t>1-1/(e+1))return error.num;var n=t*(e+1)-1,i=Math.floor(n);return utils.cleanFloat(n===i?r[n]:r[i]+(n-i)*(r[i+1]-r[i]))},exports.PERCENTILE.INC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;r=r.sort(function(r,t){return r-t});var e=r.length,n=t*(e-1),i=Math.floor(n);return utils.cleanFloat(n===i?r[n]:r[i]+(n-i)*(r[i+1]-r[i]))},exports.PERCENTRANK={},exports.PERCENTRANK.EXC=function(r,t,e){if(e=void 0===e?3:e,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;r=r.sort(function(r,t){return r-t});for(var n=misc.UNIQUE.apply(null,r),i=r.length,o=n.length,u=Math.pow(10,e),a=0,s=!1,l=0;!s&&o>l;)t===n[l]?(a=(r.indexOf(n[l])+1)/(i+1),s=!0):n[l]>t||t>=n[l+1]&&l!==o-1||(a=(r.indexOf(n[l])+1+(t-n[l])/(n[l+1]-n[l]))/(i+1),s=!0),l++;return Math.floor(a*u)/u},exports.PERCENTRANK.INC=function(r,t,e){if(e=void 0===e?3:e,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;r=r.sort(function(r,t){return r-t});for(var n=misc.UNIQUE.apply(null,r),i=r.length,o=n.length,u=Math.pow(10,e),a=0,s=!1,l=0;!s&&o>l;)t===n[l]?(a=r.indexOf(n[l])/(i-1),s=!0):n[l]>t||t>=n[l+1]&&l!==o-1||(a=(r.indexOf(n[l])+(t-n[l])/(n[l+1]-n[l]))/(i-1),s=!0),l++;return Math.floor(a*u)/u},exports.PERMUT=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:mathTrig.FACT(r)/mathTrig.FACT(r-t)},exports.PERMUTATIONA=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.pow(r,t)},exports.PHI=function(r){return r=utils.parseNumber(r),r instanceof Error?error.value:Math.exp(-.5*r*r)/SQRT2PI},exports.POISSON={},exports.POISSON.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.poisson.cdf(r,t):jStat.poisson.pdf(r,t)},exports.PROB=function(r,t,e,n){if(void 0===e)return 0;if(n=void 0===n?e:n,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n))return error.value;if(e===n)return r.indexOf(e)<0?0:t[r.indexOf(e)];for(var i=r.sort(function(r,t){return r-t}),o=i.length,u=0,a=0;o>a;a++)e>i[a]||i[a]>n||(u+=t[r.indexOf(i[a])]);return u},exports.QUARTILE={},exports.QUARTILE.EXC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;switch(t){case 1:return exports.PERCENTILE.EXC(r,.25);case 2:return exports.PERCENTILE.EXC(r,.5);case 3:return exports.PERCENTILE.EXC(r,.75);default:return error.num}},exports.QUARTILE.INC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;switch(t){case 1:return exports.PERCENTILE.INC(r,.25);case 2:return exports.PERCENTILE.INC(r,.5);case 3:return exports.PERCENTILE.INC(r,.75);default:return error.num}},exports.RANK={},exports.RANK.AVG=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;t=utils.flatten(t),e=e||!1;var n=e?function(r,t){return r-t}:function(r,t){return t-r};t=t.sort(n);for(var i=t.length,o=0,u=0;i>u;u++)t[u]===r&&o++;return o>1?(2*t.indexOf(r)+o+1)/2:t.indexOf(r)+1},exports.RANK.EQ=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;e=e||!1;var n=e?function(r,t){return r-t}:function(r,t){return t-r};return t=t.sort(n),t.indexOf(r)+1},exports.ROW=function(r,t){if(2!==arguments.length)return error.na;if(0>t)return error.num;if(!(r instanceof Array)||"number"!=typeof t)return error.value;if(0!==r.length)return jStat.row(r,t)},exports.ROWS=function(r){return 1!==arguments.length?error.na:r instanceof Array?0===r.length?0:jStat.rows(r):error.value},exports.RSQ=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:Math.pow(exports.PEARSON(r,t),2)},exports.SKEW=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,i=0;e>i;i++)n+=Math.pow(r[i]-t,3);return e*n/((e-1)*(e-2)*Math.pow(jStat.stdev(r,!0),3))},exports.SKEW.P=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,i=0,o=0;e>o;o++)i+=Math.pow(r[o]-t,3),n+=Math.pow(r[o]-t,2);return i/=e,n/=e,i/Math.pow(n,1.5)},exports.SLOPE=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(t),n=jStat.mean(r),i=t.length,o=0,u=0,a=0;i>a;a++)o+=(t[a]-e)*(r[a]-n),u+=Math.pow(t[a]-e,2);return o/u},exports.SMALL=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t)?r:r.sort(function(r,t){return r-t})[t-1]},exports.STANDARDIZE=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:(r-t)/e},exports.STDEV={},exports.STDEV.P=function(){var r=exports.VAR.P.apply(this,arguments),t=Math.sqrt(r);return isNaN(t)&&(t=error.num),t},exports.STDEV.S=function(){var r=exports.VAR.S.apply(this,arguments),t=Math.sqrt(r);return t},exports.STDEVA=function(){var r=exports.VARA.apply(this,arguments),t=Math.sqrt(r);return t},exports.STDEVPA=function(){var r=exports.VARPA.apply(this,arguments),t=Math.sqrt(r);return isNaN(t)&&(t=error.num),t},exports.STEYX=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(t),n=jStat.mean(r),i=t.length,o=0,u=0,a=0,s=0;i>s;s++)o+=Math.pow(r[s]-n,2),u+=(t[s]-e)*(r[s]-n),a+=Math.pow(t[s]-e,2);return Math.sqrt((o-u*u/a)/(i-2))},exports.TRANSPOSE=function(r){return r?jStat.transpose(r):error.na},exports.T=text.T,exports.T.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.studentt.cdf(r,t):jStat.studentt.pdf(r,t)},exports.T.DIST["2T"]=function(r,t){return 2!==arguments.length?error.na:0>r||1>t?error.num:"number"!=typeof r||"number"!=typeof t?error.value:2*(1-jStat.studentt.cdf(r,t))},exports.T.DIST.RT=function(r,t){return 2!==arguments.length?error.na:0>r||1>t?error.num:"number"!=typeof r||"number"!=typeof t?error.value:1-jStat.studentt.cdf(r,t)},exports.T.INV=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:jStat.studentt.inv(r,t)},exports.T.INV["2T"]=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),0>=r||r>1||1>t?error.num:utils.anyIsError(r,t)?error.value:Math.abs(jStat.studentt.inv(r/2,t))},exports.T.TEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e,n=jStat.mean(r),i=jStat.mean(t),o=0,u=0;for(e=0;r.length>e;e++)o+=Math.pow(r[e]-n,2);for(e=0;t.length>e;e++)u+=Math.pow(t[e]-i,2);o/=r.length-1,u/=t.length-1;var a=Math.abs(n-i)/Math.sqrt(o/r.length+u/t.length);return exports.T.DIST["2T"](a,r.length+t.length-2)},exports.TREND=function(r,t,e){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(r,t,e))return error.value;var n=exports.LINEST(r,t),i=n[0],o=n[1],u=[];return e.forEach(function(r){u.push(i*r+o)}),u},exports.TRIMMEAN=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=mathTrig.FLOOR(r.length*t,2)/2;return jStat.mean(utils.initial(utils.rest(r.sort(function(r,t){return r-t}),e),e))},exports.VAR={},exports.VAR.P=function(){for(var r,t=utils.numbers(utils.flatten(arguments)),e=t.length,n=0,i=exports.AVERAGE(t),o=0;e>o;o++)n+=Math.pow(t[o]-i,2);return r=n/e,isNaN(r)&&(r=error.num),r},exports.VAR.S=function(){for(var r=utils.numbers(utils.flatten(arguments)),t=r.length,e=0,n=exports.AVERAGE(r),i=0;t>i;i++)e+=Math.pow(r[i]-n,2);return e/(t-1)},exports.VARA=function(){for(var r=utils.flatten(arguments),t=r.length,e=0,n=0,i=exports.AVERAGEA(r),o=0;t>o;o++){var u=r[o];e+="number"==typeof u?Math.pow(u-i,2):u===!0?Math.pow(1-i,2):Math.pow(0-i,2),null!==u&&n++}return e/(n-1)},exports.VARPA=function(){for(var r,t=utils.flatten(arguments),e=t.length,n=0,i=0,o=exports.AVERAGEA(t),u=0;e>u;u++){var a=t[u];n+="number"==typeof a?Math.pow(a-o,2):a===!0?Math.pow(1-o,2):Math.pow(0-o,2),null!==a&&i++}return r=n/i,isNaN(r)&&(r=error.num),r},exports.WEIBULL={},exports.WEIBULL.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?1-Math.exp(-Math.pow(r/e,t)):Math.pow(r,t-1)*Math.exp(-Math.pow(r/e,t))*t/Math.pow(e,t)},exports.Z={},exports.Z.TEST=function(r,t,e){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;e=e||exports.STDEV.S(r);var n=r.length;return 1-exports.NORM.S.DIST((exports.AVERAGE(r)-t)/(e/Math.sqrt(n)),!0)}},function(r,t,e){function n(r){return 1===new Date(r,1,29).getMonth()}function i(r,t){return Math.ceil((t-r)/1e3/60/60/24)}function o(r){var t=r>-22038912e5?2:1;return(r-s)/864e5+t}var u=e(0),a=e(2),s=new Date(1900,0,1),l=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],f=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],c=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];t.DATE=function(r,t,e){var n;return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.anyIsError(r,t,e)?u.value:0>r||0>t||0>e?u.num:new Date(r,t-1,e)},t.DATEVALUE=function(r){if("string"!=typeof r)return u.value;var t=Date.parse(r);return isNaN(t)?u.value:t>-22038912e5?(t-s)/864e5+2:(t-s)/864e5+1},t.DAY=function(r){var t=a.parseDate(r);return t instanceof Error?t:t.getDate()},t.DAYS=function(r,t){return r=a.parseDate(r),t=a.parseDate(t),r instanceof Error?r:t instanceof Error?t:o(r)-o(t)},t.DAYS360=function(r,t,e){if(e=a.parseBool(e),r=a.parseDate(r),t=a.parseDate(t),r instanceof Error)return r;if(t instanceof Error)return t;if(e instanceof Error)return e;var n,i,o=r.getMonth(),u=t.getMonth();if(e)n=31===r.getDate()?30:r.getDate(),i=31===t.getDate()?30:t.getDate();else{var s=new Date(r.getFullYear(),o+1,0).getDate(),l=new Date(t.getFullYear(),u+1,0).getDate();n=r.getDate()===s?30:r.getDate(),t.getDate()===l?30>n?(u++,i=1):i=30:i=t.getDate()}return 360*(t.getFullYear()-r.getFullYear())+30*(u-o)+(i-n)},t.EDATE=function(r,t){return r=a.parseDate(r),r instanceof Error?r:isNaN(t)?u.value:(t=parseInt(t,10),r.setMonth(r.getMonth()+t),o(r))},t.EOMONTH=function(r,t){return r=a.parseDate(r),r instanceof Error?r:isNaN(t)?u.value:(t=parseInt(t,10),o(new Date(r.getFullYear(),r.getMonth()+t+1,0)))},t.HOUR=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getHours()},t.INTERVAL=function(r){if("number"!=typeof r&&"string"!=typeof r)return u.value;r=parseInt(r,10);var t=Math.floor(r/94608e4);r%=94608e4;var e=Math.floor(r/2592e3);r%=2592e3;var n=Math.floor(r/86400);r%=86400;var i=Math.floor(r/3600);r%=3600;var o=Math.floor(r/60);r%=60;var a=r;return t=t>0?t+"Y":"",e=e>0?e+"M":"",n=n>0?n+"D":"",i=i>0?i+"H":"",o=o>0?o+"M":"",a=a>0?a+"S":"","P"+t+e+n+"T"+i+o+a},t.ISOWEEKNUM=function(r){if(r=a.parseDate(r),r instanceof Error)return r;r.setHours(0,0,0),r.setDate(r.getDate()+4-(r.getDay()||7));var t=new Date(r.getFullYear(),0,1);return Math.ceil(((r-t)/864e5+1)/7)},t.MINUTE=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getMinutes()},t.MONTH=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getMonth()+1},t.NETWORKDAYS=function(r,t,e){return this.NETWORKDAYS.INTL(r,t,1,e)},t.NETWORKDAYS.INTL=function(r,t,e,n){if(r=a.parseDate(r),r instanceof Error)return r;if(t=a.parseDate(t),t instanceof Error)return t;if(e=void 0===e?c[1]:c[e],!(e instanceof Array))return u.value;void 0===n?n=[]:n instanceof Array||(n=[n]);for(var i=0;n.length>i;i++){var o=a.parseDate(n[i]);if(o instanceof Error)return o;n[i]=o}var s=(t-r)/864e5+1,l=s,f=r;for(i=0;s>i;i++){var p=(new Date).getTimezoneOffset()>0?f.getUTCDay():f.getDay(),m=!1;p!==e[0]&&p!==e[1]||(m=!0);for(var h=0;n.length>h;h++){var d=n[h];if(d.getDate()===f.getDate()&&d.getMonth()===f.getMonth()&&d.getFullYear()===f.getFullYear()){m=!0;break}}m&&l--,f.setDate(f.getDate()+1)}return l},t.NOW=function(){return new Date},t.SECOND=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getSeconds()},t.TIME=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?u.value:0>r||0>t||0>e?u.num:(3600*r+60*t+e)/86400},t.TIMEVALUE=function(r){return r=a.parseDate(r),r instanceof Error?r:(3600*r.getHours()+60*r.getMinutes()+r.getSeconds())/86400},t.TODAY=function(){return new Date},t.WEEKDAY=function(r,t){if(r=a.parseDate(r),r instanceof Error)return r;void 0===t&&(t=1);var e=r.getDay();return f[t][e]},t.WEEKNUM=function(r,t){if(r=a.parseDate(r),r instanceof Error)return r;if(void 0===t&&(t=1),21===t)return this.ISOWEEKNUM(r);var e=l[t],n=new Date(r.getFullYear(),0,1),i=n.getDay()t)return u.num;if(e=void 0===e?c[1]:c[e],!(e instanceof Array))return u.value;void 0===n?n=[]:n instanceof Array||(n=[n]);for(var i=0;n.length>i;i++){var o=a.parseDate(n[i]);if(o instanceof Error)return o;n[i]=o}for(var s=0;t>s;){r.setDate(r.getDate()+1);var l=r.getDay();if(l!==e[0]&&l!==e[1]){for(var f=0;n.length>f;f++){var p=n[f];if(p.getDate()===r.getDate()&&p.getMonth()===r.getMonth()&&p.getFullYear()===r.getFullYear()){s--;break}}s++}}return r},t.YEAR=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getFullYear()},t.YEARFRAC=function(r,t,e){if(r=a.parseDate(r),r instanceof Error)return r;if(t=a.parseDate(t),t instanceof Error)return t;e=e||0;var o=r.getDate(),u=r.getMonth()+1,s=r.getFullYear(),l=t.getDate(),f=t.getMonth()+1,c=t.getFullYear();switch(e){case 0:return 31===o&&31===l?(o=30,l=30):31===o?o=30:30===o&&31===l&&(l=30),(l+30*f+360*c-(o+30*u+360*s))/360;case 1:var p=function(r,t){var e=r.getFullYear(),i=new Date(e,2,1);if(n(e)&&i>r&&t>=i)return!0;var o=t.getFullYear(),u=new Date(o,2,1);return n(o)&&t>=u&&u>r},m=365;if(s===c||s+1===c&&(u>f||u===f&&o>=l))return(s===c&&n(s)||p(r,t)||1===f&&29===l)&&(m=366),i(r,t)/m;var h=c-s+1,d=(new Date(c+1,0,1)-new Date(s,0,1))/1e3/60/60/24,v=d/h;return i(r,t)/v;case 2:return i(r,t)/360;case 3:return i(r,t)/365;case 4:return(l+30*f+360*c-(o+30*u+360*s))/360}}},function(r,t,e){var n=e(0);t.CELL=function(){throw Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(r){switch(r){case n.nil:return 1;case n.div0:return 2;case n.value:return 3;case n.ref:return 4;case n.name:return 5;case n.num:return 6;case n.na:return 7;case n.data:return 8}return n.na},t.INFO=function(){throw Error("INFO is not implemented")},t.ISBLANK=function(r){return null===r},t.ISBINARY=function(r){return/^[01]{1,10}$/.test(r)},t.ISERR=function(r){return[n.value,n.ref,n.div0,n.num,n.name,n.nil].indexOf(r)>=0||"number"==typeof r&&(isNaN(r)||!isFinite(r))},t.ISERROR=function(r){return t.ISERR(r)||r===n.na},t.ISEVEN=function(r){return!(1&Math.floor(Math.abs(r)))},t.ISFORMULA=function(){throw Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(r){return r===!0||r===!1},t.ISNA=function(r){return r===n.na},t.ISNONTEXT=function(r){return"string"!=typeof r},t.ISNUMBER=function(r){return"number"==typeof r&&!isNaN(r)&&isFinite(r)},t.ISODD=function(r){return!!(1&Math.floor(Math.abs(r)))},t.ISREF=function(){throw Error("ISREF is not implemented")},t.ISTEXT=function(r){return"string"==typeof r},t.N=function(r){return this.ISNUMBER(r)?r:r instanceof Date?r.getTime():r===!0?1:r===!1?0:this.ISERROR(r)?r:0},t.NA=function(){return n.na},t.SHEET=function(){throw Error("SHEET is not implemented")},t.SHEETS=function(){throw Error("SHEETS is not implemented")},t.TYPE=function(r){return this.ISNUMBER(r)?1:this.ISTEXT(r)?2:this.ISLOGICAL(r)?4:this.ISERROR(r)?16:Array.isArray(r)?64:void 0}},function(r,t,e){var n=e(2),i=e(0),o=e(14);t.ASC=function(){throw Error("ASC is not implemented")},t.BAHTTEXT=function(){throw Error("BAHTTEXT is not implemented")},t.CHAR=function(r){return r=n.parseNumber(r),r instanceof Error?r:String.fromCharCode(r)},t.CLEAN=function(r){r=r||"";var t=/[\0-\x1F]/g;return r.replace(t,"")},t.CODE=function(r){r=r||"";var t=r.charCodeAt(0);return isNaN(t)&&(t=i.na),t},t.CONCATENATE=function(){for(var r=n.flatten(arguments),t=0;(t=r.indexOf(!0))>-1;)r[t]="TRUE";for(var e=0;(e=r.indexOf(!1))>-1;)r[e]="FALSE";return r.join("")},t.DBCS=function(){throw Error("DBCS is not implemented")},t.DOLLAR=function(r,t){if(t=void 0===t?2:t,r=n.parseNumber(r),t=n.parseNumber(t),n.anyIsError(r,t))return i.value;var e="";return t>0?t>0&&(e="($0,0."+Array(t+1).join("0")+")"):(r=Math.round(r*Math.pow(10,t))/Math.pow(10,t),e="($0,0)"),o(r).format(e)},t.EXACT=function(r,t){return 2!==arguments.length?i.na:r===t},t.FIND=function(r,t,e){return 2>arguments.length?i.na:(e=void 0===e?0:e,t?t.indexOf(r,e-1)+1:null)},t.FIXED=function(r,t,e){if(t=void 0===t?2:t,e=void 0!==e&&e,r=n.parseNumber(r),t=n.parseNumber(t),n.anyIsError(r,t))return i.value;var u=e?"0":"0,0";return t>0?t>0&&(u+="."+Array(t+1).join("0")):r=Math.round(r*Math.pow(10,t))/Math.pow(10,t),o(r).format(u)},t.HTML2TEXT=function(r){var t="";return r&&(r instanceof Array?r.forEach(function(r){""!==t&&(t+="\n"),t+=r.replace(/<(?:.|\n)*?>/gm,"")}):t=r.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(r,t){return t=void 0===t?1:t,t=n.parseNumber(t),t instanceof Error||"string"!=typeof r?i.value:r?r.substring(0,t):null},t.LEN=function(r){return 0===arguments.length?i.error:"string"==typeof r?r?r.length:0:r.length?r.length:i.value},t.LOWER=function(r){return"string"!=typeof r?i.value:r?r.toLowerCase():r},t.MID=function(r,t,e){if(t=n.parseNumber(t),e=n.parseNumber(e),n.anyIsError(t,e)||"string"!=typeof r)return e;var i=t-1,o=i+e;return r.substring(i,o)},t.NUMBERVALUE=function(r,t,e){return t=void 0===t?".":t,e=void 0===e?",":e,+r.replace(t,".").replace(e,"")},t.PRONETIC=function(){throw Error("PRONETIC is not implemented")},t.PROPER=function(r){return void 0===r||0===r.length?i.value:(r===!0&&(r="TRUE"),r===!1&&(r="FALSE"),isNaN(r)&&"number"==typeof r?i.value:("number"==typeof r&&(r=""+r),r.replace(/\w\S*/g,function(r){return r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(r,t){if(2>arguments.length)return i.na;var e=r.match(RegExp(t));return e?e[e.length>1?e.length-1:0]:null},t.REGEXMATCH=function(r,t,e){if(2>arguments.length)return i.na;var n=r.match(RegExp(t));return e?n:!!n},t.REGEXREPLACE=function(r,t,e){return 3>arguments.length?i.na:r.replace(RegExp(t),e)},t.REPLACE=function(r,t,e,o){return t=n.parseNumber(t),e=n.parseNumber(e),n.anyIsError(t,e)||"string"!=typeof r||"string"!=typeof o?i.value:r.substr(0,t-1)+o+r.substr(t-1+e)},t.REPT=function(r,t){return t=n.parseNumber(t),t instanceof Error?t:Array(t+1).join(r)},t.RIGHT=function(r,t){return t=void 0===t?1:t,t=n.parseNumber(t),t instanceof Error?t:r?r.substring(r.length-t):i.na},t.SEARCH=function(r,t,e){var n;return"string"!=typeof r||"string"!=typeof t?i.value:(e=void 0===e?0:e,n=t.toLowerCase().indexOf(r.toLowerCase(),e-1)+1,0===n?i.value:n)},t.SPLIT=function(r,t){return r.split(t)},t.SUBSTITUTE=function(r,t,e,n){if(2>arguments.length)return i.na;if(!(r&&t&&e))return r;if(void 0===n)return r.replace(RegExp(t,"g"),e);for(var o=0,u=0;r.indexOf(t,o)>0;)if(o=r.indexOf(t,o+1),u++,u===n)return r.substring(0,o)+e+r.substring(o+t.length)},t.T=function(r){return"string"==typeof r?r:""},t.TEXT=function(r,t){return r=n.parseNumber(r),n.anyIsError(r)?i.na:o(r).format(t)},t.TRIM=function(r){return"string"!=typeof r?i.value:r.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(r){return"string"!=typeof r?i.value:r.toUpperCase()},t.VALUE=function(r){if("string"!=typeof r)return i.value;var t=o().unformat(r);return void 0===t?0:t}},function(r,t,e){"use strict";function n(r){if("string"!=typeof r||!l.test(r))return[];var t=r.toUpperCase().match(l),e=t[1],n=t[2],i=t[3],u=t[4];return[{index:a(u),label:u,isAbsolute:"$"===i},{index:o(n),label:n,isAbsolute:"$"===e}]}function i(r,t){var e=(r.isAbsolute?"$":"")+s(r.index),n=(t.isAbsolute?"$":"")+u(t.index);return n+e}function o(r){var t=0;if("string"==typeof r){r=r.toUpperCase();for(var e=0,n=r.length-1;r.length>e;e+=1,n-=1)t+=Math.pow(c,n)*(f.indexOf(r[e])+1)}return--t,t}function u(r){for(var t="";r>=0;)t=String.fromCharCode(r%c+97)+t,r=Math.floor(r/c)-1;return t.toUpperCase()}function a(r){var t=parseInt(r,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function s(r){var t="";return 0>r||(t=""+(r+1)),t}t.__esModule=!0,t.extractLabel=n,t.toLabel=i,t.columnLabelToIndex=o,t.columnIndexToLabel=u,t.rowLabelToIndex=a,t.rowIndexToLabel=s;var l=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/,f="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c=f.length},function(r,t,e){"use strict";t.__esModule=!0;var n=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLAR","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FIXED","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","NUMERAL","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TEXT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"];t["default"]=n},function(r,t,e){function n(r){return/^[01]{1,10}$/.test(r)}var i=e(0),o=e(13).jStat,u=e(8),a=e(2),s=e(32);t.BESSELI=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:s.besseli(r,t)},t.BESSELJ=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:s.besselj(r,t)},t.BESSELK=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:s.besselk(r,t)},t.BESSELY=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:s.bessely(r,t)},t.BIN2DEC=function(r){if(!n(r))return i.num;var t=parseInt(r,2),e=""+r;return 10===e.length&&"1"===e.substring(0,1)?parseInt(e.substring(1),2)-512:t},t.BIN2HEX=function(r,t){if(!n(r))return i.num;var e=""+r;if(10===e.length&&"1"===e.substring(0,1))return(0xfffffffe00+parseInt(e.substring(1),2)).toString(16);var o=parseInt(r,2).toString(16);return void 0===t?o:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),o.length>t?i.num:u.REPT("0",t-o.length)+o)},t.BIN2OCT=function(r,t){if(!n(r))return i.num;var e=""+r;if(10===e.length&&"1"===e.substring(0,1))return(1073741312+parseInt(e.substring(1),2)).toString(8);var o=parseInt(r,2).toString(8);return void 0===t?o:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),o.length>t?i.num:u.REPT("0",t-o.length)+o)},t.BITAND=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>r||0>t?i.num:Math.floor(r)!==r||Math.floor(t)!==t?i.num:r>0xffffffffffff||t>0xffffffffffff?i.num:r&t},t.BITLSHIFT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>r?i.num:Math.floor(r)!==r?i.num:r>0xffffffffffff?i.num:Math.abs(t)>53?i.num:0>t?r>>-t:r<r||0>t?i.num:Math.floor(r)!==r||Math.floor(t)!==t?i.num:r>0xffffffffffff||t>0xffffffffffff?i.num:r|t},t.BITRSHIFT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>r?i.num:Math.floor(r)!==r?i.num:r>0xffffffffffff?i.num:Math.abs(t)>53?i.num:0>t?r<<-t:r>>t},t.BITXOR=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>r||0>t?i.num:Math.floor(r)!==r||Math.floor(t)!==t?i.num:r>0xffffffffffff||t>0xffffffffffff?i.num:r^t},t.COMPLEX=function(r,t,e){if(r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t))return r;if(e=void 0===e?"i":e,"i"!==e&&"j"!==e)return i.value;if(0===r&&0===t)return 0;if(0===r)return 1===t?e:""+t+e;if(0===t)return""+r;var n=t>0?"+":"";return""+r+n+(1===t?e:""+t+e)},t.CONVERT=function(r,t,e){if(r=a.parseNumber(r),r instanceof Error)return r;for(var n,o=[["a.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["a.u. of charge","e",null,"electric_charge",!1,!1,1.60217653141414e-19],["a.u. of energy","Eh",null,"energy",!1,!1,4.35974417757576e-18],["a.u. of length","a?",null,"length",!1,!1,5.29177210818182e-11],["a.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["a.u. of time","?/Eh",null,"time",!1,!1,2.41888432650516e-17],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,1.49597870691667e-11],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,8.46786664623715e-47],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,1.66053886282828e-27],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["n.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,1.28808866778687e-21],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,8.95054210748189e31],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],u={ -Yi:["yobi",80,1.2089258196146292e24,"Yi","yotta"],Zi:["zebi",70,0x400000000000000000,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},s={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},l=null,f=null,c=t,p=e,m=1,h=1,d=0;o.length>d;d++)n=null===o[d][2]?[]:o[d][2],o[d][1]!==c&&n.indexOf(c)<0||(l=o[d]),o[d][1]!==p&&n.indexOf(p)<0||(f=o[d]);if(null===l){var v=u[t.substring(0,2)],E=s[t.substring(0,1)];"da"===t.substring(0,2)&&(E=["dekao",10,"da"]),v?(m=v[2],c=t.substring(2)):E&&(m=E[1],c=t.substring(E[2].length));for(var g=0;o.length>g;g++)n=null===o[g][2]?[]:o[g][2],o[g][1]!==c&&n.indexOf(c)<0||(l=o[g])}if(null===f){var N=u[e.substring(0,2)],b=s[e.substring(0,1)];"da"===e.substring(0,2)&&(b=["dekao",10,"da"]),N?(h=N[2],p=e.substring(2)):b&&(h=b[1],p=e.substring(b[2].length));for(var y=0;o.length>y;y++)n=null===o[y][2]?[]:o[y][2],o[y][1]!==p&&n.indexOf(p)<0||(f=o[y])}return null===l||null===f?i.na:l[3]!==f[3]?i.na:r*l[6]*m/(f[6]*h)},t.DEC2BIN=function(r,t){if(r=a.parseNumber(r),r instanceof Error)return r;if(!/^-?[0-9]{1,3}$/.test(r)||-512>r||r>511)return i.num;if(0>r)return"1"+u.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var e=parseInt(r,10).toString(2);return void 0===t?e:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),e.length>t?i.num:u.REPT("0",t-e.length)+e)},t.DEC2HEX=function(r,t){if(r=a.parseNumber(r),r instanceof Error)return r;if(!/^-?[0-9]{1,12}$/.test(r)||-549755813888>r||r>549755813887)return i.num;if(0>r)return(1099511627776+r).toString(16);var e=parseInt(r,10).toString(16);return void 0===t?e:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),e.length>t?i.num:u.REPT("0",t-e.length)+e)},t.DEC2OCT=function(r,t){if(r=a.parseNumber(r),r instanceof Error)return r;if(!/^-?[0-9]{1,9}$/.test(r)||-536870912>r||r>536870911)return i.num;if(0>r)return(1073741824+r).toString(8);var e=parseInt(r,10).toString(8);return void 0===t?e:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),e.length>t?i.num:u.REPT("0",t-e.length)+e)},t.DELTA=function(r,t){return t=void 0===t?0:t,r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:r===t?1:0},t.ERF=function(r,t){return t=void 0===t?0:t,r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:o.erf(r)},t.ERF.PRECISE=function(){throw Error("ERF.PRECISE is not implemented")},t.ERFC=function(r){return isNaN(r)?i.value:o.erfc(r)},t.ERFC.PRECISE=function(){throw Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(r,t){return t=t||0,r=a.parseNumber(r),a.anyIsError(t,r)?r:t>r?0:1},t.HEX2BIN=function(r,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return i.num;var e=10===r.length&&"f"===r.substring(0,1).toLowerCase(),n=e?parseInt(r,16)-1099511627776:parseInt(r,16);if(-512>n||n>511)return i.num;if(e)return"1"+u.REPT("0",9-(512+n).toString(2).length)+(512+n).toString(2);var o=n.toString(2);return void 0===t?o:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),o.length>t?i.num:u.REPT("0",t-o.length)+o)},t.HEX2DEC=function(r){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return i.num;var t=parseInt(r,16);return 549755813888>t?t:t-1099511627776},t.HEX2OCT=function(r,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return i.num;var e=parseInt(r,16);if(e>536870911&&0xffe0000000>e)return i.num;if(e>=0xffe0000000)return(e-0xffc0000000).toString(8);var n=e.toString(8);return void 0===t?n:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),n.length>t?i.num:u.REPT("0",t-n.length)+n)},t.IMABS=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:Math.sqrt(Math.pow(e,2)+Math.pow(n,2))},t.IMAGINARY=function(r){if(void 0===r||r===!0||r===!1)return i.value;if(0===r||"0"===r)return 0;if(["i","j"].indexOf(r)>=0)return 1;r=r.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j");var t=r.indexOf("+"),e=r.indexOf("-");0===t&&(t=r.indexOf("+",1)),0===e&&(e=r.indexOf("-",1));var n=r.substring(r.length-1,r.length),o="i"===n||"j"===n;return 0>t&&0>e?o?isNaN(r.substring(0,r.length-1))?i.num:r.substring(0,r.length-1):isNaN(r)?i.num:0:o?0>t?isNaN(r.substring(0,e))||isNaN(r.substring(e+1,r.length-1))?i.num:-+r.substring(e+1,r.length-1):isNaN(r.substring(0,t))||isNaN(r.substring(t+1,r.length-1))?i.num:+r.substring(t+1,r.length-1):i.num},t.IMARGUMENT=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:0===e&&0===n?i.div0:0===e&&n>0?Math.PI/2:0===e&&0>n?-Math.PI/2:0===n&&e>0?0:0===n&&0>e?-Math.PI:e>0?Math.atan(n/e):0>e&&n>=0?Math.atan(n/e)+Math.PI:Math.atan(n/e)-Math.PI},t.IMCONJUGATE=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",0!==n?t.COMPLEX(e,-n,o):r},t.IMCOS=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(e)*(Math.exp(n)+Math.exp(-n))/2,-Math.sin(e)*(Math.exp(n)-Math.exp(-n))/2,o)},t.IMCOSH=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(n)*(Math.exp(e)+Math.exp(-e))/2,Math.sin(n)*(Math.exp(e)-Math.exp(-e))/2,o)},t.IMCOT=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:t.IMDIV(t.IMCOS(r),t.IMSIN(r))},t.IMDIV=function(r,e){var n=t.IMREAL(r),o=t.IMAGINARY(r),u=t.IMREAL(e),s=t.IMAGINARY(e);if(a.anyIsError(n,o,u,s))return i.value;var l=r.substring(r.length-1),f=e.substring(e.length-1),c="i";if("j"===l?c="j":"j"===f&&(c="j"),0===u&&0===s)return i.num;var p=u*u+s*s;return t.COMPLEX((n*u+o*s)/p,(o*u-n*s)/p,c)},t.IMEXP=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);o="i"===o||"j"===o?o:"i";var u=Math.exp(e);return t.COMPLEX(u*Math.cos(n),u*Math.sin(n),o)},t.IMLN=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n)),Math.atan(n/e),o)},t.IMLOG10=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n))/Math.log(10),Math.atan(n/e)/Math.log(10),o)},t.IMLOG2=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n))/Math.log(2),Math.atan(n/e)/Math.log(2),o)},t.IMPOWER=function(r,e){e=a.parseNumber(e);var n=t.IMREAL(r),o=t.IMAGINARY(r);if(a.anyIsError(e,n,o))return i.value;var u=r.substring(r.length-1);u="i"===u||"j"===u?u:"i";var s=Math.pow(t.IMABS(r),e),l=t.IMARGUMENT(r);return t.COMPLEX(s*Math.cos(e*l),s*Math.sin(e*l),u)},t.IMPRODUCT=function(){var r=arguments[0];if(!arguments.length)return i.value;for(var e=1;arguments.length>e;e++){var n=t.IMREAL(r),o=t.IMAGINARY(r),u=t.IMREAL(arguments[e]),s=t.IMAGINARY(arguments[e]);if(a.anyIsError(n,o,u,s))return i.value;r=t.COMPLEX(n*u-o*s,n*s+o*u)}return r},t.IMREAL=function(r){if(void 0===r||r===!0||r===!1)return i.value;if(0===r||"0"===r)return 0;if(["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(r)>=0)return 0;var t=r.indexOf("+"),e=r.indexOf("-");0===t&&(t=r.indexOf("+",1)),0===e&&(e=r.indexOf("-",1));var n=r.substring(r.length-1,r.length),o="i"===n||"j"===n;return 0>t&&0>e?o?isNaN(r.substring(0,r.length-1))?i.num:0:isNaN(r)?i.num:r:o?0>t?isNaN(r.substring(0,e))||isNaN(r.substring(e+1,r.length-1))?i.num:+r.substring(0,e):isNaN(r.substring(0,t))||isNaN(r.substring(t+1,r.length-1))?i.num:+r.substring(0,t):i.num},t.IMSEC=function(r){if(r===!0||r===!1)return i.value;var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:t.IMDIV("1",t.IMCOS(r))},t.IMSECH=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:t.IMDIV("1",t.IMCOSH(r))},t.IMSIN=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.sin(e)*(Math.exp(n)+Math.exp(-n))/2,Math.cos(e)*(Math.exp(n)-Math.exp(-n))/2,o)},t.IMSINH=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);return o="i"===o||"j"===o?o:"i",t.COMPLEX(Math.cos(n)*(Math.exp(e)-Math.exp(-e))/2,Math.sin(n)*(Math.exp(e)+Math.exp(-e))/2,o)},t.IMSQRT=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return i.value;var o=r.substring(r.length-1);o="i"===o||"j"===o?o:"i";var u=Math.sqrt(t.IMABS(r)),s=t.IMARGUMENT(r);return t.COMPLEX(u*Math.cos(s/2),u*Math.sin(s/2),o)},t.IMCSC=function(r){if(r===!0||r===!1)return i.value;var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.num:t.IMDIV("1",t.IMSIN(r))},t.IMCSCH=function(r){if(r===!0||r===!1)return i.value;var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.num:t.IMDIV("1",t.IMSINH(r))},t.IMSUB=function(r,t){var e=this.IMREAL(r),n=this.IMAGINARY(r),o=this.IMREAL(t),u=this.IMAGINARY(t);if(a.anyIsError(e,n,o,u))return i.value;var s=r.substring(r.length-1),l=t.substring(t.length-1),f="i";return"j"===s?f="j":"j"===l&&(f="j"),this.COMPLEX(e-o,n-u,f)},t.IMSUM=function(){if(!arguments.length)return i.value;for(var r=a.flatten(arguments),t=r[0],e=1;r.length>e;e++){var n=this.IMREAL(t),o=this.IMAGINARY(t),u=this.IMREAL(r[e]),s=this.IMAGINARY(r[e]);if(a.anyIsError(n,o,u,s))return i.value;t=this.COMPLEX(n+u,o+s)}return t},t.IMTAN=function(r){if(r===!0||r===!1)return i.value;var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?i.value:this.IMDIV(this.IMSIN(r),this.IMCOS(r))},t.OCT2BIN=function(r,t){if(!/^[0-7]{1,10}$/.test(r))return i.num;var e=10===r.length&&"7"===r.substring(0,1),n=e?parseInt(r,8)-1073741824:parseInt(r,8);if(-512>n||n>511)return i.num;if(e)return"1"+u.REPT("0",9-(512+n).toString(2).length)+(512+n).toString(2);var o=n.toString(2);return void 0===t?o:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),o.length>t?i.num:u.REPT("0",t-o.length)+o)},t.OCT2DEC=function(r){if(!/^[0-7]{1,10}$/.test(r))return i.num;var t=parseInt(r,8);return 536870912>t?t:t-1073741824},t.OCT2HEX=function(r,t){if(!/^[0-7]{1,10}$/.test(r))return i.num;var e=parseInt(r,8);if(e>=536870912)return"ff"+(e+3221225472).toString(16);var n=e.toString(16);return void 0===t?n:isNaN(t)?i.value:0>t?i.num:(t=Math.floor(t),n.length>t?i.num:u.REPT("0",t-n.length)+n)}},function(r,t,e){var n=e(2),i=e(14),o=e(0);t.UNIQUE=function(){for(var r=[],t=0;arguments.length>t;++t){for(var e=!1,n=arguments[t],i=0;r.length>i&&!(e=r[i]===n);++i);e||r.push(n)}return r},t.FLATTEN=n.flatten,t.ARGS2ARRAY=function(){return Array.prototype.slice.call(arguments,0)},t.REFERENCE=function(r,t){if(!arguments.length)return s.error;try{for(var e=t.split("."),n=r,i=0;e.length>i;++i){var o=e[i];if("]"===o[o.length-1]){var u=o.indexOf("["),a=o.substring(u+1,o.length-1);n=n[o.substring(0,u)][a]}else n=n[o]}return n}catch(s){}},t.JOIN=function(r,t){return r.join(t)},t.NUMBERS=function(){var r=n.flatten(arguments);return r.filter(function(r){return"number"==typeof r})},t.NUMERAL=function(r,t){return i(r).format(t)}},function(r,t){this.j$=this.jStat=function(r,t){function e(t,e){var n=t>e?t:e;return r.pow(10,17-~~(r.log(n>0?n:-n)*r.LOG10E))}function n(r){return"[object Function]"===m.call(r)}function o(r){return"number"==typeof r&&r===r}function u(r){return c.apply([],r)}function a(){return new a._init(arguments)}function s(){return 0}function l(){return 1}function f(r,t){return r===t?1:0}var c=Array.prototype.concat,p=Array.prototype.slice,m=Object.prototype.toString,h=Array.isArray||function(r){return"[object Array]"===m.call(r)};a.fn=a.prototype,a._init=function(r){var t;if(h(r[0]))if(h(r[0][0])){n(r[1])&&(r[0]=a.map(r[0],r[1]));for(var t=0;r[0].length>t;t++)this[t]=r[0][t];this.length=r[0].length}else this[0]=n(r[1])?a.map(r[0],r[1]):r[0],this.length=1;else if(o(r[0]))this[0]=a.seq.apply(null,r),this.length=1;else{if(r[0]instanceof a)return a(r[0].toArray());this[0]=[],this.length=1}return this},a._init.prototype=a.prototype,a._init.constructor=a,a.utils={calcRdx:e,isArray:h,isFunction:n,isNumber:o,toVector:u},a.extend=function(r){var t,e;if(1===arguments.length){for(e in r)a[e]=r[e];return this}for(var t=1;arguments.length>t;t++)for(e in arguments[t])r[e]=arguments[t][e];return r},a.rows=function(r){return r.length||1},a.cols=function(r){return r[0].length||1},a.dimensions=function(r){return{rows:a.rows(r),cols:a.cols(r)}},a.row=function(r,t){return h(t)?t.map(function(t){return a.row(r,t)}):r[t]},a.rowa=function(r,t){return a.row(r,t)},a.col=function(r,t){if(h(t)){var e=a.arange(r.length).map(function(r){return Array(t.length)});return t.forEach(function(t,n){a.arange(r.length).forEach(function(i){e[i][n]=r[i][t]})}),e}for(var n=Array(r.length),i=0;r.length>i;i++)n[i]=[r[i][t]];return n},a.cola=function(r,t){return a.col(r,t).map(function(r){return r[0]})},a.diag=function(r){for(var t=a.rows(r),e=Array(t),n=0;t>n;n++)e[n]=[r[n][n]];return e},a.antidiag=function(r){for(var t=a.rows(r)-1,e=Array(t),n=0;t>=0;t--,n++)e[n]=[r[n][t]];return e},a.transpose=function(r){var t,e,n,i,o,u=[];h(r[0])||(r=[r]),e=r.length,n=r[0].length;for(var o=0;n>o;o++){for(t=Array(e),i=0;e>i;i++)t[i]=r[i][o];u.push(t)}return 1===u.length?u[0]:u},a.map=function(r,t,e){var n,i,o,u,a;for(h(r[0])||(r=[r]),i=r.length,o=r[0].length,u=e?r:Array(i),n=0;i>n;n++)for(u[n]||(u[n]=Array(o)),a=0;o>a;a++)u[n][a]=t(r[n][a],n,a);return 1===u.length?u[0]:u},a.cumreduce=function(r,t,e){var n,i,o,u,a;for(h(r[0])||(r=[r]),i=r.length,o=r[0].length,u=e?r:Array(i),n=0;i>n;n++)for(u[n]||(u[n]=Array(o)),o>0&&(u[n][0]=r[n][0]),a=1;o>a;a++)u[n][a]=t(u[n][a-1],r[n][a]);return 1===u.length?u[0]:u},a.alter=function(r,t){return a.map(r,t,!0)},a.create=function(r,t,e){var i,o,u=Array(r);n(t)&&(e=t,t=r);for(var i=0;r>i;i++)for(u[i]=Array(t),o=0;t>o;o++)u[i][o]=e(i,o);return u},a.zeros=function(r,t){return o(t)||(t=r),a.create(r,t,s)},a.ones=function(r,t){return o(t)||(t=r),a.create(r,t,l)},a.rand=function(t,e){return o(e)||(e=t),a.create(t,e,r.random)},a.identity=function(r,t){return o(t)||(t=r),a.create(r,t,f)},a.symmetric=function(r){var t,e,n=r.length;if(r.length!==r[0].length)return!1;for(t=0;n>t;t++)for(e=0;n>e;e++)if(r[e][t]!==r[t][e])return!1;return!0},a.clear=function(r){return a.alter(r,s)},a.seq=function(r,t,i,o){n(o)||(o=!1);var u,a=[],s=e(r,t),l=(t*s-r*s)/((i-1)*s),f=r;for(u=0;t>=f;u++,f=(r*s+l*s*u)/s)a.push(o?o(f,u):f);return a},a.arange=function(r,e,n){var o=[];if(n=n||1,e===t&&(e=r,r=0),r===e||0===n)return[];if(e>r&&0>n)return[];if(r>e&&n>0)return[];if(n>0)for(i=r;ie;i+=n)o.push(i);return o},a.slice=function(){function r(r,e,n,i){var o,u=[],s=r.length;if(e===t&&n===t&&i===t)return a.copy(r);if(e=e||0,n=n||r.length,e=0>e?s+e:e,n=0>n?s+n:n,i=i||1,e===n||0===i)return[];if(n>e&&0>i)return[];if(e>n&&i>0)return[];if(i>0)for(o=e;n>o;o+=i)u.push(r[o]);else for(o=e;o>n;o+=i)u.push(r[o]);return u}function e(t,e){if(e=e||{},o(e.row)){if(o(e.col))return t[e.row][e.col];var n=a.rowa(t,e.row),i=e.col||{};return r(n,i.start,i.end,i.step)}if(o(e.col)){var u=a.cola(t,e.col),s=e.row||{};return r(u,s.start,s.end,s.step)}var s=e.row||{},i=e.col||{},l=r(t,s.start,s.end,s.step);return l.map(function(t){return r(t,i.start,i.end,i.step)})}return e}(),a.sliceAssign=function(e,n,i){if(o(n.row)){if(o(n.col))return e[n.row][n.col]=i;n.col=n.col||{},n.col.start=n.col.start||0,n.col.end=n.col.end||e[0].length,n.col.step=n.col.step||1;var u=a.arange(n.col.start,r.min(e.length,n.col.end),n.col.step),s=n.row;return u.forEach(function(r,t){e[s][r]=i[t]}),e}if(o(n.col)){n.row=n.row||{},n.row.start=n.row.start||0,n.row.end=n.row.end||e.length,n.row.step=n.row.step||1;var l=a.arange(n.row.start,r.min(e[0].length,n.row.end),n.row.step),f=n.col;return l.forEach(function(r,t){e[r][f]=i[t]}),e}i[0].length===t&&(i=[i]),n.row.start=n.row.start||0,n.row.end=n.row.end||e.length,n.row.step=n.row.step||1,n.col.start=n.col.start||0,n.col.end=n.col.end||e[0].length,n.col.step=n.col.step||1;var l=a.arange(n.row.start,r.min(e.length,n.row.end),n.row.step),u=a.arange(n.col.start,r.min(e[0].length,n.col.end),n.col.step);return l.forEach(function(r,t){u.forEach(function(n,o){e[r][n]=i[t][o]})}),e},a.diagonal=function(r){var t=a.zeros(r.length,r.length);return r.forEach(function(r,e){t[e][e]=r}),t},a.copy=function(r){return r.map(function(r){return o(r)?r:r.map(function(r){return r})})};var d=a.prototype;return d.length=0,d.push=Array.prototype.push,d.sort=Array.prototype.sort,d.splice=Array.prototype.splice,d.slice=Array.prototype.slice,d.toArray=function(){return this.length>1?p.call(this):p.call(this)[0]},d.map=function(r,t){return a(a.map(this,r,t))},d.cumreduce=function(r,t){return a(a.cumreduce(this,r,t))},d.alter=function(r){return a.alter(this,r),this},function(r){for(var t=0;r.length>t;t++)(function(r){d[r]=function(t){var e,n=this;return t?(setTimeout(function(){t.call(n,d[r].call(n))}),this):(e=a[r](this),h(e)?a(e):e)}})(r[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(r){for(var t=0;r.length>t;t++)(function(r){d[r]=function(t,e){var n=this;return e?(setTimeout(function(){e.call(n,d[r].call(n,t))}),this):a(a[r](this,t))}})(r[t])}("row col".split(" ")),function(r){for(var t=0;r.length>t;t++)(function(r){d[r]=Function("return jStat(jStat."+r+".apply(null, arguments));")})(r[t])}("create zeros ones rand identity".split(" ")),a}(Math),function(r,t){function e(r,t){return r-t}function n(r,e,n){return t.max(e,t.min(r,n))}var i=r.utils.isFunction;r.sum=function u(r){for(var u=0,t=r.length;--t>=0;)u+=r[t];return u},r.sumsqrd=function(r){for(var t=0,e=r.length;--e>=0;)t+=r[e]*r[e];return t},r.sumsqerr=function(t){for(var e,n=r.mean(t),i=0,o=t.length;--o>=0;)e=t[o]-n,i+=e*e;return i},r.sumrow=function(r){for(var t=0,e=r.length;--e>=0;)t+=r[e];return t},r.product=function(r){for(var t=1,e=r.length;--e>=0;)t*=r[e];return t},r.min=function(r){for(var t=r[0],e=0;++er[e]&&(t=r[e]);return t},r.max=function(r){for(var t=r[0],e=0;++et&&(t=r[e]);return t},r.unique=function(r){for(var t={},e=[],n=0;r.length>n;n++)t[r[n]]||(t[r[n]]=!0,e.push(r[n]));return e},r.mean=function(t){return r.sum(t)/t.length},r.meansqerr=function(t){return r.sumsqerr(t)/t.length},r.geomean=function(e){return t.pow(r.product(e),1/e.length)},r.median=function(r){var t=r.length,n=r.slice().sort(e);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},r.cumsum=function(t){return r.cumreduce(t,function(r,t){return r+t})},r.cumprod=function(t){return r.cumreduce(t,function(r,t){return r*t})},r.diff=function(r){for(var t,e=[],n=r.length,t=1;n>t;t++)e.push(r[t]-r[t-1]);return e},r.rank=function(r){for(var t=r.length,n=r.slice().sort(e),i=Array(t),o=0;t>o;o++){var u=n.indexOf(r[o]),a=n.lastIndexOf(r[o]);if(u===a)var s=u;else var s=(u+a)/2;i[o]=s+1}return i},r.mode=function(r){for(var t,n=r.length,i=r.slice().sort(e),o=1,u=0,a=0,s=[],t=0;n>t;t++)i[t]===i[t+1]?o++:(o>u?(s=[i[t]],u=o,a=0):o===u&&(s.push(i[t]),a++),o=1);return 0===a?s[0]:s},r.range=function(t){return r.max(t)-r.min(t)},r.variance=function(t,e){return r.sumsqerr(t)/(t.length-(e?1:0))},r.deviation=function(t){for(var e=r.mean(t),n=t.length,i=Array(n),o=0;n>o;o++)i[o]=t[o]-e;return i},r.stdev=function(e,n){return t.sqrt(r.variance(e,n))},r.meandev=function(e){for(var n,i=0,o=r.mean(e),n=e.length-1;n>=0;n--)i+=t.abs(e[n]-o);return i/e.length},r.meddev=function(e){for(var n,i=0,o=r.median(e),n=e.length-1;n>=0;n--)i+=t.abs(e[n]-o);return i/e.length},r.coeffvar=function(t){return r.stdev(t)/r.mean(t)},r.quartiles=function(r){var n=r.length,i=r.slice().sort(e);return[i[t.round(n/4)-1],i[t.round(n/2)-1],i[t.round(3*n/4)-1]]},r.quantiles=function(r,i,o,u){var a,s,l,f,c,p,m=r.slice().sort(e),h=[i.length],d=r.length;void 0===o&&(o=3/8),void 0===u&&(u=3/8);for(var a=0;i.length>a;a++)s=i[a],l=o+s*(1-o-u),f=d*s+l,c=t.floor(n(f,1,d-1)),p=n(f-c,0,1),h[a]=(1-p)*m[c-1]+p*m[c];return h},r.percentile=function(r,t){var n=r.slice().sort(e),i=t*(n.length-1),o=parseInt(i),u=i-o;return n.length>o+1?n[o]*(1-u)+n[o+1]*u:n[o]},r.percentileOfScore=function(r,t,e){var n,i,o=0,u=r.length,a=!1;"strict"===e&&(a=!0);for(var i=0;u>i;i++)n=r[i],(a&&t>n||!a&&t>=n)&&o++;return o/u},r.histogram=function(e,n){for(var i,o=r.min(e),u=n||4,a=(r.max(e)-o)/u,s=e.length,n=[],i=0;u>i;i++)n[i]=0;for(var i=0;s>i;i++)n[t.min(t.floor((e[i]-o)/a),u-1)]+=1;return n},r.covariance=function(t,e){for(var n,i=r.mean(t),o=r.mean(e),u=t.length,a=Array(u),n=0;u>n;n++)a[n]=(t[n]-i)*(e[n]-o);return r.sum(a)/(u-1)},r.corrcoeff=function(t,e){return r.covariance(t,e)/r.stdev(t,1)/r.stdev(e,1)},r.spearmancoeff=function(e,n){e=r.rank(e),n=r.rank(n);var i=r.deviation(e),o=r.deviation(n);return r.sum(i.map(function(r,t){return r*o[t]}))/t.sqrt(r.sum(i.map(function(r){return t.pow(r,2)}))*r.sum(o.map(function(r){return t.pow(r,2)})))},r.stanMoment=function(e,n){for(var i=r.mean(e),o=r.stdev(e),u=e.length,a=0,s=0;u>s;s++)a+=t.pow((e[s]-i)/o,n);return a/e.length},r.skewness=function(t){return r.stanMoment(t,3)},r.kurtosis=function(t){return r.stanMoment(t,4)-3};var o=r.prototype;!function(t){for(var e=0;t.length>e;e++)(function(t){o[t]=function(e,n){var u=[],a=0,s=this;if(i(e)&&(n=e,e=!1),n)return setTimeout(function(){n.call(s,o[t].call(s,e))}),this;if(this.length>1){for(s=e===!0?this:this.transpose();s.length>a;a++)u[a]=r[t](s[a]);return u}return r[t](this[0],e)}})(t[e])}("cumsum cumprod".split(" ")),function(t){for(var e=0;t.length>e;e++)(function(t){o[t]=function(e,n){var u=[],a=0,s=this;if(i(e)&&(n=e,e=!1),n)return setTimeout(function(){n.call(s,o[t].call(s,e))}),this;if(this.length>1){for("sumrow"!==t&&(s=e===!0?this:this.transpose());s.length>a;a++)u[a]=r[t](s[a]);return e===!0?r[t](r.utils.toVector(u)):u}return r[t](this[0],e)}})(t[e])}("sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" ")),function(t){for(var e=0;t.length>e;e++)(function(t){o[t]=function(){var e=[],n=0,u=this,a=Array.prototype.slice.call(arguments);if(i(a[a.length-1])){var s=a[a.length-1],l=a.slice(0,a.length-1);return setTimeout(function(){s.call(u,o[t].apply(u,l))}),this}var s=void 0,f=function(e){return r[t].apply(u,[e].concat(a))};if(this.length>1){for(u=u.transpose();u.length>n;n++)e[n]=f(u[n]);return e}return f(this[0])}})(t[e])}("quantiles percentileOfScore".split(" "))}(this.jStat,Math),function(r,t){r.gammaln=function(r){var e,n,i,o=0,u=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],a=1.000000000190015;for(i=(n=e=r)+5.5,i-=(e+.5)*t.log(i);6>o;o++)a+=u[o]/++n;return t.log(2.5066282746310007*a/e)-i},r.gammafn=function(r){var e,n,i,o,u=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],a=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],s=!1,l=0,f=0,c=0,p=r;if(0>=p){if(o=p%1+3.6e-16,!o)return 1/0;s=(1&p?-1:1)*t.PI/t.sin(t.PI*o),p=1-p}i=p,n=1>p?p++:(p-=l=(0|p)-1)-1;for(var e=0;8>e;++e)c=(c+u[e])*n,f=f*n+a[e];if(o=c/f+1,p>i)o/=i;else if(i>p)for(var e=0;l>e;++e)o*=p,p++;return s&&(o=s/o),o},r.gammap=function(t,e){return r.lowRegGamma(t,e)*r.gammafn(t)},r.lowRegGamma=function(e,n){var i,o=r.gammaln(e),u=e,a=1/e,s=a,l=n+1-e,f=1/1e-30,c=1/l,p=c,m=1,h=-~(8.5*t.log(1>e?1/e:e)+.4*e+17);if(0>n||0>=e)return NaN;if(e+1>n){for(;h>=m;m++)a+=s*=n/++u;return a*t.exp(-n+e*t.log(n)-o)}for(;h>=m;m++)i=-m*(m-e),l+=2,c=i*c+l,f=l+i/f,c=1/c,p*=c*f;return 1-p*t.exp(-n+e*t.log(n)-o)},r.factorialln=function(t){return 0>t?NaN:r.gammaln(t+1)},r.factorial=function(t){return 0>t?NaN:r.gammafn(t+1)},r.combination=function(e,n){return e>170||n>170?t.exp(r.combinationln(e,n)):r.factorial(e)/r.factorial(n)/r.factorial(e-n)},r.combinationln=function(t,e){return r.factorialln(t)-r.factorialln(e)-r.factorialln(t-e)},r.permutation=function(t,e){return r.factorial(t)/r.factorial(t-e)},r.betafn=function(e,n){if(e>0&&n>0)return e+n>170?t.exp(r.betaln(e,n)):r.gammafn(e)*r.gammafn(n)/r.gammafn(e+n)},r.betaln=function(t,e){return r.gammaln(t)+r.gammaln(e)-r.gammaln(t+e)},r.betacf=function(r,e,n){var i,o,u,a,s=1e-30,l=1,f=e+n,c=e+1,p=e-1,m=1,h=1-f*r/c;for(t.abs(h)=l&&(i=2*l,o=l*(n-l)*r/((p+i)*(e+i)),h=1+o*h,t.abs(h)=3e-7);l++);return a},r.gammapinv=function(e,n){var i,o,u,a,s,l,f,c=0,p=n-1,m=1e-8,h=r.gammaln(n);if(e>=1)return t.max(100,n+100*t.sqrt(n));if(0>=e)return 0;for(n>1?(l=t.log(p),f=t.exp(p*(l-1)-h),s=.5>e?e:1-e,u=t.sqrt(-2*t.log(s)),i=(2.30753+.27061*u)/(1+u*(.99229+.04481*u))-u,.5>e&&(i=-i),i=t.max(.001,n*t.pow(1-1/(9*n)-i/(3*t.sqrt(n)),3))):(u=1-n*(.253+.12*n),i=u>e?t.pow(e/u,1/n):1-t.log(1-(e-u)/(1-u)));12>c;c++){if(0>=i)return 0;if(o=r.lowRegGamma(n,i)-e,u=n>1?f*t.exp(-(i-p)+p*(t.log(i)-l)):t.exp(-i+p*t.log(i)-h),a=o/u,i-=u=a/(1-.5*t.min(1,a*((n-1)/i-1))),i>0||(i=.5*(i+u)),t.abs(u)r&&(r=-r,s=!0),e=2/(2+r),n=4*e-2;a>0;a--)i=l,l=n*l-f+u[a],f=i;return o=e*t.exp(-r*r+.5*(u[0]+n*l)-f),s?o-1:1-o},r.erfc=function(t){return 1-r.erf(t)},r.erfcinv=function(e){var n,i,o,u,a=0;if(e>=2)return-100;if(0>=e)return 100;for(u=1>e?e:2-e,o=t.sqrt(-2*t.log(u/2)),n=-.70711*((2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o);2>a;a++)i=r.erfc(n)-u,n+=i/(1.1283791670955126*t.exp(-n*n)-n*i);return 1>e?n:-n},r.ibetainv=function(e,n,i){var o,u,a,s,l,f,c,p,m,h,d,v=1e-8,E=n-1,g=i-1,N=0;if(0>=e)return 0;if(e>=1)return 1;for(1>n||1>i?(o=t.log(n/(n+i)),u=t.log(i/(n+i)),s=t.exp(n*o)/n,l=t.exp(i*u)/i,h=s+l,c=s/h>e?t.pow(n*h*e,1/n):1-t.pow(i*h*(1-e),1/i)):(a=.5>e?e:1-e,s=t.sqrt(-2*t.log(a)),c=(2.30753+.27061*s)/(1+s*(.99229+.04481*s))-s,.5>e&&(c=-c),p=(c*c-3)/6,m=2/(1/(2*n-1)+1/(2*i-1)),h=c*t.sqrt(p+m)/m-(1/(2*i-1)-1/(2*n-1))*(p+5/6-2/(3*m)),c=n/(n+i*t.exp(2*h))),d=-r.gammaln(n)-r.gammaln(i)+r.gammaln(n+i);10>N;N++){if(0===c||1===c)return c;if(f=r.ibeta(c,n,i)-e,s=t.exp(E*t.log(c)+g*t.log(1-c)+d),l=f/s,c-=s=l/(1-.5*t.min(1,l*(E/c-g/(1-c)))),c>0||(c=.5*(c+s)),1>c||(c=.5*(c+s+1)),t.abs(s)0)break}return c},r.ibeta=function(e,n,i){var o=0===e||1===e?0:t.exp(r.gammaln(n+i)-r.gammaln(n)-r.gammaln(i)+n*t.log(e)+i*t.log(1-e));return e>=0&&1>=e&&((n+1)/(n+i+2)>e?o*r.betacf(e,n,i)/n:1-o*r.betacf(1-e,i,n)/i)},r.randn=function(e,n){var i,o,u,a,s;if(n||(n=e),e)return r.create(e,n,function(){return r.randn()});do i=t.random(),o=1.7156*(t.random()-.5),u=i-.449871,a=t.abs(o)+.386595,s=u*u+a*(.196*a-.25472*u);while(s>.27597&&(s>.27846||o*o>-4*t.log(i)*i*i));return o/i},r.randg=function(e,n,i){var o,u,a,s,l,f,c=e;if(i||(i=n),e||(e=1),n)return f=r.zeros(n,i),f.alter(function(){return r.randg(e)}),f;1>e&&(e+=1),o=e-1/3,u=1/t.sqrt(9*o);do{do l=r.randn(),s=1+u*l;while(0>=s);s*=s*s,a=t.random()}while(a>1-.331*t.pow(l,4)&&t.log(a)>.5*l*l+o*(1-s+t.log(s)));if(e==c)return o*s;do a=t.random();while(0===a);return t.pow(a,1/c)*o*s},function(t){for(var e=0;t.length>e;e++)(function(t){r.fn[t]=function(){return r(r.map(this,function(e){return r[t](e)}))}})(t[e])}("gammaln gammafn factorial factorialln".split(" ")),function(t){for(var e=0;t.length>e;e++)(function(t){r.fn[t]=function(){return r(r[t].apply(null,arguments))}})(t[e])}("randn".split(" "))}(this.jStat,Math),function(r,t){function e(r){return r/t.abs(r)}!function(t){for(var e=0;t.length>e;e++)(function(t){r[t]=function(r,t,e){return this instanceof arguments.callee?(this._a=r,this._b=t,this._c=e,this):new arguments.callee(r,t,e)},r.fn[t]=function(e,n,i){var o=r[t](e,n,i);return o.data=this,o},r[t].prototype.sample=function(e){var n=this._a,i=this._b,o=this._c;return e?r.alter(e,function(){return r[t].sample(n,i,o)}):r[t].sample(n,i,o)},function(e){for(var n=0;e.length>n;n++)(function(e){r[t].prototype[e]=function(n){var i=this._a,o=this._b,u=this._c;return n||0===n||(n=this.data),"number"!=typeof n?r.fn.map.call(n,function(n){return r[t][e](n,i,o,u)}):r[t][e](n,i,o,u)}})(e[n])}("pdf cdf inv".split(" ")),function(e){for(var n=0;e.length>n;n++)(function(e){r[t].prototype[e]=function(){return r[t][e](this._a,this._b,this._c)}})(e[n])}("mean median mode variance".split(" "))})(t[e])}("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular".split(" ")),r.extend(r.beta,{pdf:function(e,n,i){return e>1||0>e?0:1==n&&1==i?1:512>n&&512>i?t.pow(e,n-1)*t.pow(1-e,i-1)/r.betafn(n,i):t.exp((n-1)*t.log(e)+(i-1)*t.log(1-e)-r.betaln(n,i))},cdf:function(t,e,n){return t>1||0>t?1*(t>1):r.ibeta(t,e,n)},inv:function(t,e,n){return r.ibetainv(t,e,n)},mean:function(r,t){return r/(r+t)},median:function(t,e){return r.ibetainv(.5,t,e)},mode:function(r,t){return(r-1)/(r+t-2)},sample:function(t,e){var n=r.randg(t);return n/(n+r.randg(e))},variance:function(r,e){return r*e/(t.pow(r+e,2)*(r+e+1))}}),r.extend(r.centralF,{pdf:function(e,n,i){var o,u,a;return 0>e?0:n>2?(o=n*e/(i+e*n),u=i/(i+e*n),a=n*u/2,a*r.binomial.pdf((n-2)/2,(n+i-2)/2,o)):0===e&&2>n?1/0:0===e&&2===n?1:t.sqrt(t.pow(n*e,n)*t.pow(i,i)/t.pow(n*e+i,n+i))/(e*r.betafn(n/2,i/2))},cdf:function(t,e,n){return 0>t?0:r.ibeta(e*t/(e*t+n),e/2,n/2)},inv:function(t,e,n){return n/(e*(1/r.ibetainv(t,e/2,n/2)-1))},mean:function(r,t){return t>2?t/(t-2):void 0},mode:function(r,t){return r>2?t*(r-2)/(r*(t+2)):void 0},sample:function(t,e){var n=2*r.randg(t/2),i=2*r.randg(e/2);return n/t/(i/e)},variance:function(r,t){if(t>4)return 2*t*t*(r+t-2)/(r*(t-2)*(t-2)*(t-4))}}),r.extend(r.cauchy,{pdf:function(r,e,n){return 0>n?0:n/(t.pow(r-e,2)+t.pow(n,2))/t.PI},cdf:function(r,e,n){return t.atan((r-e)/n)/t.PI+.5},inv:function(r,e,n){return e+n*t.tan(t.PI*(r-.5))},median:function(r,t){return r},mode:function(r,t){return r},sample:function(e,n){return r.randn()*t.sqrt(1/(2*r.randg(.5)))*n+e}}),r.extend(r.chisquare,{pdf:function(e,n){return 0>e?0:0===e&&2===n?.5:t.exp((n/2-1)*t.log(e)-e/2-n/2*t.log(2)-r.gammaln(n/2))},cdf:function(t,e){return 0>t?0:r.lowRegGamma(e/2,t/2)},inv:function(t,e){return 2*r.gammapinv(t,.5*e)},mean:function(r){return r},median:function(r){return r*t.pow(1-2/(9*r),3)},mode:function(r){return r-2>0?r-2:0},sample:function(t){return 2*r.randg(t/2)},variance:function(r){return 2*r}}),r.extend(r.exponential,{pdf:function(r,e){return 0>r?0:e*t.exp(-e*r)},cdf:function(r,e){return 0>r?0:1-t.exp(-e*r)},inv:function(r,e){return-t.log(1-r)/e},mean:function(r){return 1/r},median:function(r){return 1/r*t.log(2)},mode:function(r){return 0},sample:function(r){return-1/r*t.log(t.random())},variance:function(r){return t.pow(r,-2)}}),r.extend(r.gamma,{pdf:function(e,n,i){return 0>e?0:0===e&&1===n?1/i:t.exp((n-1)*t.log(e)-e/i-r.gammaln(n)-n*t.log(i))},cdf:function(t,e,n){return 0>t?0:r.lowRegGamma(e,t/n); -},inv:function(t,e,n){return r.gammapinv(t,e)*n},mean:function(r,t){return r*t},mode:function(r,t){if(r>1)return(r-1)*t},sample:function(t,e){return r.randg(t)*e},variance:function(r,t){return r*t*t}}),r.extend(r.invgamma,{pdf:function(e,n,i){return e>0?t.exp(-(n+1)*t.log(e)-i/e-r.gammaln(n)+n*t.log(i)):0},cdf:function(t,e,n){return t>0?1-r.lowRegGamma(e,n/t):0},inv:function(t,e,n){return n/r.gammapinv(1-t,e)},mean:function(r,t){return r>1?t/(r-1):void 0},mode:function(r,t){return t/(r+1)},sample:function(t,e){return e/r.randg(t)},variance:function(r,t){if(r>2)return t*t/((r-1)*(r-1)*(r-2))}}),r.extend(r.kumaraswamy,{pdf:function(r,e,n){return 0===r&&1===e?n:1===r&&1===n?e:t.exp(t.log(e)+t.log(n)+(e-1)*t.log(r)+(n-1)*t.log(1-t.pow(r,e)))},cdf:function(r,e,n){return 0>r?0:r>1?1:1-t.pow(1-t.pow(r,e),n)},inv:function(r,e,n){return t.pow(1-t.pow(1-r,1/n),1/e)},mean:function(t,e){return e*r.gammafn(1+1/t)*r.gammafn(e)/r.gammafn(1+1/t+e)},median:function(r,e){return t.pow(1-t.pow(2,-1/e),1/r)},mode:function(r,e){if(r>=1&&e>=1&&1!==r&&1!==e)return t.pow((r-1)/(r*e-1),1/r)},variance:function(r,t){throw Error("variance not yet implemented")}}),r.extend(r.lognormal,{pdf:function(r,e,n){return r>0?t.exp(-t.log(r)-.5*t.log(2*t.PI)-t.log(n)-t.pow(t.log(r)-e,2)/(2*n*n)):0},cdf:function(e,n,i){return 0>e?0:.5+.5*r.erf((t.log(e)-n)/t.sqrt(2*i*i))},inv:function(e,n,i){return t.exp(-1.4142135623730951*i*r.erfcinv(2*e)+n)},mean:function(r,e){return t.exp(r+e*e/2)},median:function(r,e){return t.exp(r)},mode:function(r,e){return t.exp(r-e*e)},sample:function(e,n){return t.exp(r.randn()*n+e)},variance:function(r,e){return(t.exp(e*e)-1)*t.exp(2*r+e*e)}}),r.extend(r.noncentralt,{pdf:function(e,n,i){var o=1e-14;return t.abs(i)e&&(a=!0,i=-i);for(var s=r.normal.cdf(-i,0,1),l=o+1,f=l,c=e*e/(e*e+n),p=0,m=t.exp(-i*i/2),h=t.exp(-i*i/2-.5*t.log(2)-r.gammaln(1.5))*i;u>p||f>o||l>o;)f=l,p>0&&(m*=i*i/(2*p),h*=i*i/(2*(p+.5))),l=m*r.beta.cdf(c,p+.5,n/2)+h*r.beta.cdf(c,p+1,n/2),s+=.5*l,p++;return a?1-s:s}}),r.extend(r.normal,{pdf:function(r,e,n){return t.exp(-.5*t.log(2*t.PI)-t.log(n)-t.pow(r-e,2)/(2*n*n))},cdf:function(e,n,i){return.5*(1+r.erf((e-n)/t.sqrt(2*i*i)))},inv:function(t,e,n){return-1.4142135623730951*n*r.erfcinv(2*t)+e},mean:function(r,t){return r},median:function(r,t){return r},mode:function(r,t){return r},sample:function(t,e){return r.randn()*e+t},variance:function(r,t){return t*t}}),r.extend(r.pareto,{pdf:function(r,e,n){return e>r?0:n*t.pow(e,n)/t.pow(r,n+1)},cdf:function(r,e,n){return e>r?0:1-t.pow(e/r,n)},inv:function(r,e,n){return e/t.pow(1-r,1/n)},mean:function(r,e){if(e>1)return e*t.pow(r,e)/(e-1)},median:function(r,e){return r*(e*t.SQRT2)},mode:function(r,t){return r},variance:function(r,e){if(e>2)return r*r*e/(t.pow(e-1,2)*(e-2))}}),r.extend(r.studentt,{pdf:function(e,n){return n=n>1e100?1e100:n,1/(t.sqrt(n)*r.betafn(.5,n/2))*t.pow(1+e*e/n,-((n+1)/2))},cdf:function(e,n){var i=n/2;return r.ibeta((e+t.sqrt(e*e+n))/(2*t.sqrt(e*e+n)),i,i)},inv:function(e,n){var i=r.ibetainv(2*t.min(e,1-e),.5*n,.5);return i=t.sqrt(n*(1-i)/i),e>.5?i:-i},mean:function(r){return r>1?0:void 0},median:function(r){return 0},mode:function(r){return 0},sample:function(e){return r.randn()*t.sqrt(e/(2*r.randg(e/2)))},variance:function(r){return r>2?r/(r-2):r>1?1/0:void 0}}),r.extend(r.weibull,{pdf:function(r,e,n){return 0>r||0>e||0>n?0:n/e*t.pow(r/e,n-1)*t.exp(-t.pow(r/e,n))},cdf:function(r,e,n){return 0>r?0:1-t.exp(-t.pow(r/e,n))},inv:function(r,e,n){return e*t.pow(-t.log(1-r),1/n)},mean:function(t,e){return t*r.gammafn(1+1/e)},median:function(r,e){return r*t.pow(t.log(2),1/e)},mode:function(r,e){return e>1?r*t.pow((e-1)/e,1/e):0},sample:function(r,e){return r*t.pow(-t.log(t.random()),1/e)},variance:function(e,n){return e*e*r.gammafn(1+2/n)-t.pow(r.weibull.mean(e,n),2)}}),r.extend(r.uniform,{pdf:function(r,t,e){return t>r||r>e?0:1/(e-t)},cdf:function(r,t,e){return t>r?0:e>r?(r-t)/(e-t):1},inv:function(r,t,e){return t+r*(e-t)},mean:function(r,t){return.5*(r+t)},median:function(t,e){return r.mean(t,e)},mode:function(r,t){throw Error("mode is not yet implemented")},sample:function(r,e){return r/2+e/2+(e/2-r/2)*(2*t.random()-1)},variance:function(r,e){return t.pow(e-r,2)/12}}),r.extend(r.binomial,{pdf:function(e,n,i){return 0===i||1===i?n*i===e?1:0:r.combination(n,e)*t.pow(i,e)*t.pow(1-i,n-e)},cdf:function(t,e,n){var i=[],o=0;if(0>t)return 0;if(e>t){for(;t>=o;o++)i[o]=r.binomial.pdf(o,e,n);return r.sum(i)}return 1}}),r.extend(r.negbin,{pdf:function(e,n,i){return e===e>>>0&&(0>e?0:r.combination(e+n-1,n-1)*t.pow(1-i,e)*t.pow(i,n))},cdf:function(t,e,n){var i=0,o=0;if(0>t)return 0;for(;t>=o;o++)i+=r.negbin.pdf(o,e,n);return i}}),r.extend(r.hypgeom,{pdf:function(e,n,i,o){if(e!==e|0)return!1;if(0>e||i-(n-o)>e)return 0;if(e>o||e>i)return 0;if(2*i>n)return 2*o>n?r.hypgeom.pdf(n-i-o+e,n,n-i,n-o):r.hypgeom.pdf(o-e,n,n-i,o);if(2*o>n)return r.hypgeom.pdf(i-e,n,i,n-o);if(o>i)return r.hypgeom.pdf(e,n,o,i);for(var u=1,a=0,s=0;e>s;s++){for(;u>1&&o>a;)u*=1-i/(n-a),a++;u*=(o-s)*(i-s)/((s+1)*(n-i-o+s+1))}for(;o>a;a++)u*=1-i/(n-a);return t.min(1,t.max(0,u))},cdf:function(e,n,i,o){if(0>e||i-(n-o)>e)return 0;if(o>e&&i>e){if(2*i>n)return 2*o>n?r.hypgeom.cdf(n-i-o+e,n,n-i,n-o):1-r.hypgeom.cdf(o-e-1,n,n-i,o);if(2*o>n)return 1-r.hypgeom.cdf(i-e-1,n,i,n-o);if(o>i)return r.hypgeom.cdf(e,n,o,i);for(var u=1,a=1,s=0,l=0;e>l;l++){for(;u>1&&o>s;){var f=1-i/(n-s);a*=f,u*=f,s++}a*=(o-l)*(i-l)/((l+1)*(n-i-o+l+1)),u+=a}for(;o>s;s++)u*=1-i/(n-s);return t.min(1,t.max(0,u))}return 1}}),r.extend(r.poisson,{pdf:function(e,n){return 0>n||e%1!==0||0>e?0:t.pow(n,e)*t.exp(-n)/r.factorial(e)},cdf:function(t,e){var n=[],i=0;if(0>t)return 0;for(;t>=i;i++)n.push(r.poisson.pdf(i,e));return r.sum(n)},mean:function(r){return r},variance:function(r){return r},sample:function(r){var e=1,n=0,i=t.exp(-r);do n++,e*=t.random();while(e>i);return n-1}}),r.extend(r.triangular,{pdf:function(r,t,e,n){return t>=e||t>n||n>e?NaN:t>r||r>e?0:n>r?2*(r-t)/((e-t)*(n-t)):r===n?2/(e-t):2*(e-r)/((e-t)*(e-n))},cdf:function(r,e,n,i){return e>=n||e>i||i>n?NaN:r>e?n>r?r>i?1-t.pow(n-r,2)/((n-e)*(n-i)):t.pow(r-e,2)/((n-e)*(i-e)):1:0},inv:function(r,e,n,i){return e>=n||e>i||i>n?NaN:r>(i-e)/(n-e)?e+(n-e)*(1-t.sqrt((1-r)*(1-(i-e)/(n-e)))):e+(n-e)*t.sqrt(r*((i-e)/(n-e)))},mean:function(r,t,e){return(r+t+e)/3},median:function(r,e,n){return n>(r+e)/2?n>(r+e)/2?r+t.sqrt((e-r)*(n-r))/t.sqrt(2):void 0:e-t.sqrt((e-r)*(e-n))/t.sqrt(2)},mode:function(r,t,e){return e},sample:function(r,e,n){var i=t.random();return(n-r)/(e-r)>i?r+t.sqrt(i*(e-r)*(n-r)):e-t.sqrt((1-i)*(e-r)*(e-n))},variance:function(r,t,e){return(r*r+t*t+e*e-r*t-r*e-t*e)/18}}),r.extend(r.laplace,{pdf:function(r,e,n){return n>0?t.exp(-t.abs(r-e)/n)/(2*n):0},cdf:function(r,e,n){return n>0?e>r?.5*t.exp((r-e)/n):1-.5*t.exp(-(r-e)/n):0},mean:function(r,t){return r},median:function(r,t){return r},mode:function(r,t){return r},variance:function(r,t){return 2*t*t},sample:function(r,n){var i=t.random()-.5;return r-n*e(i)*t.log(1-2*t.abs(i))}})}(this.jStat,Math),function(r,t){function e(t){return o(t)||t instanceof r}var n=Array.prototype.push,o=r.utils.isArray;r.extend({add:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.map(t,function(r,t,e){return r+n[t][e]})):r.map(t,function(r){return r+n})},subtract:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.map(t,function(r,t,e){return r-n[t][e]||0})):r.map(t,function(r){return r-n})},divide:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.multiply(t,r.inv(n))):r.map(t,function(r){return r/n})},multiply:function(t,n){var i,o,u,a,s,l,f,c;if(void 0===t.length&&void 0===n.length)return t*n;if(s=t.length,l=t[0].length,f=r.zeros(s,u=e(n)?n[0].length:l),c=0,e(n)){for(;u>c;c++)for(i=0;s>i;i++){for(a=0,o=0;l>o;o++)a+=t[i][o]*n[o][c];f[i][c]=a}return 1===s&&1===c?f[0][0]:f}return r.map(t,function(r){return r*n})},outer:function(t,e){return r.multiply(t.map(function(r){return[r]}),[e])},dot:function(t,n){e(t[0])||(t=[t]),e(n[0])||(n=[n]);for(var i,o,u=1===t[0].length&&1!==t.length?r.transpose(t):t,a=1===n[0].length&&1!==n.length?r.transpose(n):n,s=[],l=0,f=u.length,c=u[0].length;f>l;l++){for(s[l]=[],i=0,o=0;c>o;o++)i+=u[l][o]*a[l][o];s[l]=i}return 1===s.length?s[0]:s},pow:function(e,n){return r.map(e,function(r){return t.pow(r,n)})},exp:function(e){return r.map(e,function(r){return t.exp(r)})},log:function(e){return r.map(e,function(r){return t.log(r)})},abs:function(e){return r.map(e,function(r){return t.abs(r)})},norm:function(r,n){var i=0,o=0;for(isNaN(n)&&(n=2),e(r[0])&&(r=r[0]);r.length>o;o++)i+=t.pow(t.abs(r[o]),n);return t.pow(i,1/n)},angle:function(e,n){return t.acos(r.dot(e,n)/(r.norm(e)*r.norm(n)))},aug:function(r,t){for(var e=[],i=0;r.length>i;i++)e.push(r[i].slice());for(var i=0;e.length>i;i++)n.apply(e[i],t[i]);return e},inv:function(t){for(var e,n=t.length,i=t[0].length,o=r.identity(n,i),u=r.gauss_jordan(t,o),a=[],s=0;n>s;s++)for(a[s]=[],e=i;u[0].length>e;e++)a[s][e-i]=u[s][e];return a},det:function(r){var t,e=r.length,n=2*e,i=Array(n),o=e-1,u=n-1,a=o-e+1,s=u,l=0,f=0;if(2===e)return r[0][0]*r[1][1]-r[0][1]*r[1][0];for(;n>l;l++)i[l]=1;for(var l=0;e>l;l++){for(t=0;e>t;t++)i[0>a?a+e:a]*=r[l][t],i[e>s?s+e:s]*=r[l][t],a++,s--;a=--o-e+1,s=--u}for(var l=0;e>l;l++)f+=i[l];for(;n>l;l++)f-=i[l];return f},gauss_elimination:function(e,n){var i,o,u,a,s=0,l=0,f=e.length,c=e[0].length,p=1,m=0,h=[];e=r.aug(e,n),i=e[0].length;for(var s=0;f>s;s++){for(o=e[s][s],l=s,a=s+1;c>a;a++)oa;a++)u=e[s][a],e[s][a]=e[l][a],e[l][a]=u;for(l=s+1;f>l;l++)for(p=e[l][s]/e[s][s],a=s;i>a;a++)e[l][a]=e[l][a]-p*e[s][a]}for(var s=f-1;s>=0;s--){for(m=0,l=s+1;f-1>=l;l++)m+=h[l]*e[s][l];h[s]=(e[s][i-1]-m)/e[s][s]}return h},gauss_jordan:function(e,n){for(var i=r.aug(e,n),o=i.length,u=i[0].length,a=0;o>a;a++){for(var s=a,l=a+1;o>l;l++)t.abs(i[l][a])>t.abs(i[s][a])&&(s=l);var f=i[a];i[a]=i[s],i[s]=f;for(var l=a+1;o>l;l++){c=i[l][a]/i[a][a];for(var p=a;u>p;p++)i[l][p]-=i[a][p]*c}}for(var a=o-1;a>=0;a--){c=i[a][a];for(var l=0;a>l;l++)for(var p=u-1;p>a-1;p--)i[l][p]-=i[a][p]*i[l][a]/c;i[a][a]/=c;for(var p=o;u>p;p++)i[a][p]/=c}return i},triaUpSolve:function(t,e){var n,i=t[0].length,o=r.zeros(1,i)[0],u=!1;return void 0!=e[0].length&&(e=e.map(function(r){return r[0]}),u=!0),r.arange(i-1,-1,-1).forEach(function(u){n=r.arange(u+1,i).map(function(r){return o[r]*t[u][r]}),o[u]=(e[u]-r.sum(n))/t[u][u]}),u?o.map(function(r){return[r]}):o},triaLowSolve:function(t,e){var n,i=t[0].length,o=r.zeros(1,i)[0],u=!1;return void 0!=e[0].length&&(e=e.map(function(r){return r[0]}),u=!0),r.arange(i).forEach(function(i){n=r.arange(i).map(function(r){return t[i][r]*o[r]}),o[i]=(e[i]-r.sum(n))/t[i][i]}),u?o.map(function(r){return[r]}):o},lu:function(t){var e,n=t.length,o=r.identity(n),u=r.zeros(t.length,t[0].length);return r.arange(n).forEach(function(r){u[0][r]=t[0][r]}),r.arange(1,n).forEach(function(a){r.arange(a).forEach(function(n){e=r.arange(n).map(function(r){return o[a][r]*u[r][n]}),o[a][n]=(t[a][n]-r.sum(e))/u[n][n]}),r.arange(a,n).forEach(function(n){e=r.arange(a).map(function(r){return o[a][r]*u[r][n]}),u[a][n]=t[i][n]-r.sum(e)})}),[o,u]},cholesky:function(e){var n,i=e.length,o=r.zeros(e.length,e[0].length);return r.arange(i).forEach(function(u){n=r.arange(u).map(function(r){return t.pow(o[u][r],2)}),o[u][u]=t.sqrt(e[u][u]-r.sum(n)),r.arange(u+1,i).forEach(function(t){n=r.arange(u).map(function(r){return o[u][r]*o[t][r]}),o[t][u]=(e[u][t]-r.sum(n))/o[u][u]})}),o},gauss_jacobi:function(e,n,i,o){for(var u,a,s,l,f=0,c=0,p=e.length,m=[],h=[],d=[];p>f;f++)for(m[f]=[],h[f]=[],d[f]=[],c=0;p>c;c++)f>c?(m[f][c]=e[f][c],h[f][c]=d[f][c]=0):c>f?(h[f][c]=e[f][c],m[f][c]=d[f][c]=0):(d[f][c]=e[f][c],m[f][c]=h[f][c]=0);for(s=r.multiply(r.multiply(r.inv(d),r.add(m,h)),-1),a=r.multiply(r.inv(d),n),u=i,l=r.add(r.multiply(s,i),a),f=2;t.abs(r.norm(r.subtract(l,u)))>o;)u=l,l=r.add(r.multiply(s,u),a),f++;return l},gauss_seidel:function(e,n,i,o){for(var u,a,s,l,f,c=0,p=e.length,m=[],h=[],d=[];p>c;c++)for(m[c]=[],h[c]=[],d[c]=[],u=0;p>u;u++)c>u?(m[c][u]=e[c][u],h[c][u]=d[c][u]=0):u>c?(h[c][u]=e[c][u],m[c][u]=d[c][u]=0):(d[c][u]=e[c][u],m[c][u]=h[c][u]=0);for(l=r.multiply(r.multiply(r.inv(r.add(d,m)),h),-1),s=r.multiply(r.inv(r.add(d,m)),n),a=i,f=r.add(r.multiply(l,i),s),c=2;t.abs(r.norm(r.subtract(f,a)))>o;)a=f,f=r.add(r.multiply(l,a),s),c+=1;return f},SOR:function(e,n,i,o,u){for(var a,s,l,f,c,p=0,m=e.length,h=[],d=[],v=[];m>p;p++)for(h[p]=[],d[p]=[],v[p]=[],a=0;m>a;a++)p>a?(h[p][a]=e[p][a],d[p][a]=v[p][a]=0):a>p?(d[p][a]=e[p][a],h[p][a]=v[p][a]=0):(v[p][a]=e[p][a],h[p][a]=d[p][a]=0);for(f=r.multiply(r.inv(r.add(v,r.multiply(h,u))),r.subtract(r.multiply(v,1-u),r.multiply(d,u))),l=r.multiply(r.multiply(r.inv(r.add(v,r.multiply(h,u))),n),u),s=i,c=r.add(r.multiply(f,i),l),p=2;t.abs(r.norm(r.subtract(c,s)))>o;)s=c,c=r.add(r.multiply(f,s),l),p++;return c},householder:function(e){for(var n,i,o,u,a,s=e.length,l=e[0].length,f=0,c=[],p=[];s-1>f;f++){for(n=0,u=f+1;l>u;u++)n+=e[u][f]*e[u][f];for(a=e[f+1][f]>0?-1:1,n=a*t.sqrt(n),i=t.sqrt((n*n-e[f+1][f]*n)/2),c=r.zeros(s,1),c[f+1][0]=(e[f+1][f]-n)/(2*i),o=f+2;s>o;o++)c[o][0]=e[o][f]/(2*i);p=r.subtract(r.identity(s,l),r.multiply(r.multiply(c,r.transpose(c)),2)),e=r.multiply(p,r.multiply(e,p))}return e},QR:function(){function t(t){var e=t.length,n=r.norm(t,2),i=r.zeros(1,e)[0];i[0]=1;var o=r.add(r.multiply(r.multiply(i,n),-1),t),u=r.norm(o,2),a=r.divide(o,u),s=r.subtract(r.identity(e),r.multiply(r.outer(a,a),2));return s}function e(e){var n=e[0].length,i=[];r.arange(n).forEach(function(n){var o=r.slice(e,{row:{start:n},col:n}),u=t(o),a=r.identity(e.length);a=r.sliceAssign(a,{row:{start:n},col:{start:n}},u),e=r.multiply(a,e),i.push(a)});var o=i.reduce(function(t,e){return r.multiply(t,e)}),u=e;return[o,u]}return e}(),lstsq:function(t,e){function n(t){t=r.copy(t);var e=t.length,n=r.identity(e);return r.arange(e-1,-1,-1).forEach(function(e){r.sliceAssign(n,{row:e},r.divide(r.slice(n,{row:e}),t[e][e])),r.sliceAssign(t,{row:e},r.divide(r.slice(t,{row:e}),t[e][e])),r.arange(e).forEach(function(i){var o=r.multiply(t[i][e],-1),u=r.slice(t,{row:i}),a=r.multiply(r.slice(t,{row:e}),o);r.sliceAssign(t,{row:i},r.add(u,a));var s=r.slice(n,{row:i}),l=r.multiply(r.slice(n,{row:e}),o);r.sliceAssign(n,{row:i},r.add(s,l))})}),n}function i(t,e){var i=!1;void 0===e[0].length&&(e=e.map(function(r){return[r]}),i=!0);var o=r.QR(t),u=o[0],a=o[1],s=t[0].length,l=r.slice(u,{col:{end:s}}),f=r.slice(a,{row:{end:s}}),c=n(f),p=r.multiply(r.multiply(c,r.transpose(l)),e);return i?p.map(function(r){return r[0]}):p}return i}(),jacobi:function(e){for(var n,i,o,u,a,s,l,f,c=1,p=0,m=e.length,h=r.identity(m,m),d=[];1===c;){p++,s=e[0][1],u=0,a=1;for(var i=0;m>i;i++)for(o=0;m>o;o++)i!=o&&s0?t.PI/4:-t.PI/4:t.atan(2*e[u][a]/(e[u][u]-e[a][a]))/2,f=r.identity(m,m),f[u][u]=t.cos(l),f[u][a]=-t.sin(l),f[a][u]=t.sin(l),f[a][a]=t.cos(l),h=r.multiply(h,f),n=r.multiply(r.multiply(r.inv(f),e),f),e=n,c=0;for(var i=1;m>i;i++)for(o=1;m>o;o++)i!=o&&t.abs(e[i][o])>.001&&(c=1)}for(var i=0;m>i;i++)d.push(e[i][i]);return[h,d]},rungekutta:function(r,t,e,n,i,o){var u,a,s,l,f;if(2===o)for(;e>=n;)u=t*r(n,i),a=t*r(n+t,i+u),s=i+(u+a)/2,i=s,n+=t;if(4===o)for(;e>=n;)u=t*r(n,i),a=t*r(n+t/2,i+u/2),l=t*r(n+t/2,i+a/2),f=t*r(n+t,i+l),s=i+(u+2*a+2*l+f)/6,i=s,n+=t;return i},romberg:function(r,e,n,i){for(var o,u,a,s,l,f=0,c=(n-e)/2,p=[],m=[],h=[];i/2>f;){for(l=r(e),a=e,s=0;n>=a;a+=c,s++)p[s]=a;for(o=p.length,a=1;o-1>a;a++)l+=(a%2!==0?4:2)*r(p[a]);l=c/3*(l+r(n)),h[f]=l,c/=2,f++}for(u=h.length,o=1;1!==u;){for(a=0;u-1>a;a++)m[a]=(t.pow(4,o)*h[a+1]-h[a])/(t.pow(4,o)-1);u=m.length,h=m,m=[],o++}return h},richardson:function(r,e,n,i){function o(r,t){for(var e,n=0,i=r.length;i>n;n++)r[n]===t&&(e=n);return e}for(var u,a,s,l,f,c=t.abs(n-r[o(r,n)+1]),p=0,m=[],h=[];i>=c;)u=o(r,n+i),a=o(r,n),m[p]=(e[u]-2*e[a]+e[2*a-u])/(i*i),i/=2,p++;for(l=m.length,s=1;1!=l;){for(f=0;l-1>f;f++)h[f]=(t.pow(4,s)*m[f+1]-m[f])/(t.pow(4,s)-1);l=h.length,m=h,h=[],s++}return m},simpson:function(r,t,e,n){for(var i,o=(e-t)/n,u=r(t),a=[],s=t,l=0,f=1;e>=s;s+=o,l++)a[l]=s;for(i=a.length;i-1>f;f++)u+=(f%2!==0?4:2)*r(a[f]);return o/3*(u+r(e))},hermite:function(r,t,e,n){for(var i,o=r.length,u=0,a=0,s=[],l=[],f=[],c=[];o>a;a++){for(s[a]=1,i=0;o>i;i++)a!=i&&(s[a]*=(n-r[i])/(r[a]-r[i]));for(l[a]=0,i=0;o>i;i++)a!=i&&(l[a]+=1/(r[a]-r[i]));f[a]=(1-2*(n-r[a])*l[a])*(s[a]*s[a]),c[a]=(n-r[a])*(s[a]*s[a]),u+=f[a]*t[a]+c[a]*e[a]}return u},lagrange:function(r,t,e){for(var n,i,o=0,u=0,a=r.length;a>u;u++){for(i=t[u],n=0;a>n;n++)u!=n&&(i*=(e-r[n])/(r[u]-r[n]));o+=i}return o},cubic_spline:function(t,e,n){for(var i,o=t.length,u=0,a=[],s=[],l=[],f=[],c=[],p=[],m=[];o-1>u;u++)c[u]=t[u+1]-t[u];l[0]=0;for(var u=1;o-1>u;u++)l[u]=3/c[u]*(e[u+1]-e[u])-3/c[u-1]*(e[u]-e[u-1]);for(var u=1;o-1>u;u++)a[u]=[],s[u]=[],a[u][u-1]=c[u-1],a[u][u]=2*(c[u-1]+c[u]),a[u][u+1]=c[u],s[u][0]=l[u];for(f=r.multiply(r.inv(a),s),i=0;o-1>i;i++)p[i]=(e[i+1]-e[i])/c[i]-c[i]*(f[i+1][0]+2*f[i][0])/3,m[i]=(f[i+1][0]-f[i][0])/(3*c[i]);for(i=0;o>i&&t[i]<=n;i++);return i-=1,e[i]+(n-t[i])*p[i]+r.sq(n-t[i])*f[i]+(n-t[i])*r.sq(n-t[i])*m[i]},gauss_quadrature:function(){throw Error("gauss_quadrature not yet implemented")},PCA:function(t){for(var e,n,i=t.length,o=t[0].length,u=0,a=[],s=[],l=[],f=[],c=[],p=[],m=[],h=[],d=[],v=[],u=0;i>u;u++)a[u]=r.sum(t[u])/o;for(var u=0;o>u;u++)for(m[u]=[],e=0;i>e;e++)m[u][e]=t[e][u]-a[e];m=r.transpose(m);for(var u=0;i>u;u++)for(h[u]=[],e=0;i>e;e++)h[u][e]=r.dot([m[u]],[m[e]])/(o-1);l=r.jacobi(h),d=l[0],s=l[1],v=r.transpose(d);for(var u=0;s.length>u;u++)for(e=u;s.length>e;e++)s[e]>s[u]&&(n=s[u],s[u]=s[e],s[e]=n,f=v[u],v[u]=v[e],v[e]=f);p=r.transpose(m);for(var u=0;i>u;u++)for(c[u]=[],e=0;p.length>e;e++)c[u][e]=r.dot([v[u]],[p[e]]);return[t,s,v,c]}}),function(t){for(var e=0;t.length>e;e++)(function(t){r.fn[t]=function(e,n){var i=this;return n?(setTimeout(function(){n.call(i,r.fn[t].call(i,e))},15),this):"number"==typeof r[t](this,e)?r[t](this,e):r(r[t](this,e))}})(t[e])}("add divide multiply subtract dot pow exp log abs norm angle".split(" "))}(this.jStat,Math),function(r,t){function e(r,e,n,i){if(r>1||n>1||0>=r||0>=n)throw Error("Proportions should be greater than 0 and less than 1");var o=(r*e+n*i)/(e+i),u=t.sqrt(o*(1-o)*(1/e+1/i));return(r-n)/u}var n=[].slice,i=r.utils.isNumber,o=r.utils.isArray;r.extend({zscore:function(){var t=n.call(arguments);return i(t[1])?(t[0]-t[1])/t[2]:(t[0]-r.mean(t[1]))/r.stdev(t[1],t[2])},ztest:function(){var e,i=n.call(arguments);return o(i[1])?(e=r.zscore(i[0],i[1],i[3]),1===i[2]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1)):i.length>2?(e=r.zscore(i[0],i[1],i[2]),1===i[3]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1)):(e=i[0],1===i[1]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1))}}),r.extend(r.fn,{zscore:function(r,t){return(r-this.mean())/this.stdev(t)},ztest:function(e,n,i){var o=t.abs(this.zscore(e,i));return 1===n?r.normal.cdf(-o,0,1):2*r.normal.cdf(-o,0,1)}}),r.extend({tscore:function(){var e=n.call(arguments);return 4===e.length?(e[0]-e[1])/(e[2]/t.sqrt(e[3])):(e[0]-r.mean(e[1]))/(r.stdev(e[1],!0)/t.sqrt(e[1].length))},ttest:function(){var e,o=n.call(arguments);return 5===o.length?(e=t.abs(r.tscore(o[0],o[1],o[2],o[3])),1===o[4]?r.studentt.cdf(-e,o[3]-1):2*r.studentt.cdf(-e,o[3]-1)):i(o[1])?(e=t.abs(o[0]),1==o[2]?r.studentt.cdf(-e,o[1]-1):2*r.studentt.cdf(-e,o[1]-1)):(e=t.abs(r.tscore(o[0],o[1])),1==o[2]?r.studentt.cdf(-e,o[1].length-1):2*r.studentt.cdf(-e,o[1].length-1))}}),r.extend(r.fn,{tscore:function(r){return(r-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(e,n){return 1===n?1-r.studentt.cdf(t.abs(this.tscore(e)),this.cols()-1):2*r.studentt.cdf(-t.abs(this.tscore(e)),this.cols()-1)}}),r.extend({anovafscore:function(){var e,i,o,u,a,s,l,f,c=n.call(arguments);if(1===c.length){a=Array(c[0].length);for(var l=0;c[0].length>l;l++)a[l]=c[0][l];c=a}if(2===c.length)return r.variance(c[0])/r.variance(c[1]);i=[];for(var l=0;c.length>l;l++)i=i.concat(c[l]);o=r.mean(i),e=0;for(var l=0;c.length>l;l++)e+=c[l].length*t.pow(r.mean(c[l])-o,2);e/=c.length-1,s=0;for(var l=0;c.length>l;l++)for(u=r.mean(c[l]),f=0;c[l].length>f;f++)s+=t.pow(c[l][f]-u,2);return s/=i.length-c.length,e/s},anovaftest:function(){var t,e,o,u,a=n.call(arguments);if(i(a[0]))return 1-r.centralF.cdf(a[0],a[1],a[2]);anovafscore=r.anovafscore(a),t=a.length-1,o=0;for(var u=0;a.length>u;u++)o+=a[u].length;return e=o-t-1,1-r.centralF.cdf(anovafscore,t,e)},ftest:function(t,e,n){return 1-r.centralF.cdf(t,e,n)}}),r.extend(r.fn,{anovafscore:function(){return r.anovafscore(this.toArray())},anovaftes:function(){for(var t,e=0,t=0;this.length>t;t++)e+=this[t].length;return r.ftest(this.anovafscore(),this.length-1,e-this.length)}}),r.extend({normalci:function(){var e,i=n.call(arguments),o=Array(2);return e=t.abs(4===i.length?r.normal.inv(i[1]/2,0,1)*i[2]/t.sqrt(i[3]):r.normal.inv(i[1]/2,0,1)*r.stdev(i[2])/t.sqrt(i[2].length)),o[0]=i[0]-e,o[1]=i[0]+e,o},tci:function(){var e,i=n.call(arguments),o=Array(2);return e=t.abs(4===i.length?r.studentt.inv(i[1]/2,i[3]-1)*i[2]/t.sqrt(i[3]):r.studentt.inv(i[1]/2,i[2].length-1)*r.stdev(i[2],!0)/t.sqrt(i[2].length)),o[0]=i[0]-e,o[1]=i[0]+e,o},significant:function(r,t){return t>r}}),r.extend(r.fn,{normalci:function(t,e){return r.normalci(t,e,this.toArray())},tci:function(t,e){return r.tci(t,e,this.toArray())}}),r.extend(r.fn,{oneSidedDifferenceOfProportions:function(t,n,i,o){var u=e(t,n,i,o);return r.ztest(u,1)},twoSidedDifferenceOfProportions:function(t,n,i,o){var u=e(t,n,i,o);return r.ztest(u,2)}})}(this.jStat,Math),this.jStat.models=function(){function r(r,e){return t(r,e)}function r(r){var e=r[0].length,n=jStat.arange(e).map(function(n){var i=jStat.arange(e).filter(function(r){return r!==n});return t(jStat.col(r,n).map(function(r){return r[0]}),jStat.col(r,i))});return n}function t(r,t){var e=r.length,n=t[0].length-1,i=e-n-1,o=jStat.lstsq(t,r),u=jStat.multiply(t,o.map(function(r){return[r]})).map(function(r){return r[0]}),a=jStat.subtract(r,u),s=jStat.mean(r),l=jStat.sum(u.map(function(r){return Math.pow(r-s,2)})),f=jStat.sum(r.map(function(r,t){return Math.pow(r-u[t],2)})),c=l+f,p=l/c;return{exog:t,endog:r,nobs:e,df_model:n,df_resid:i,coef:o,predict:u,resid:a,ybar:s,SST:c,SSE:l,SSR:f,R2:p}}function e(t){var e=r(t.exog),n=Math.sqrt(t.SSR/t.df_resid),i=e.map(function(r){var t=r.SST,e=r.R2;return n/Math.sqrt(t*(1-e))}),o=t.coef.map(function(r,t){return(r-0)/i[t]}),u=o.map(function(r){var e=jStat.studentt.cdf(r,t.df_resid);return 2*(e>.5?1-e:e)}),a=jStat.studentt.inv(.975,t.df_resid),s=t.coef.map(function(r,t){var e=a*i[t];return[r-e,r+e]});return{se:i,t:o,p:u,sigmaHat:n,interval95:s}}function n(r){var t=r.R2/r.df_model/((1-r.R2)/r.df_resid),e=function(r,t,e){return jStat.beta.cdf(r/(e/t+r),t/2,e/2)},n=1-e(t,r.df_model,r.df_resid);return{F_statistic:t,pvalue:n}}function i(r,i){var o=t(r,i),u=e(o),a=n(o),s=1-(1-o.rsquared)*((o.nobs-1)/o.df_resid);return o.t=u,o.f=a,o.adjust_R2=s,o}return{ols:i}}()},function(r,t,e){(function(n){var i,o;/*! +!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.formulaParser=t():r.formulaParser=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var u=e[n]={i:n,l:!1,exports:{}};return r[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var e={};return t.m=r,t.c=e,t.i=function(r){return r},t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(r){var e=r&&r.__esModule?function(){return r["default"]}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},t.p="",t(t.s=81)}([function(r,t){t.nil=Error("#NULL!"),t.div0=Error("#DIV/0!"),t.value=Error("#VALUE!"),t.ref=Error("#REF!"),t.name=Error("#NAME?"),t.num=Error("#NUM!"),t.na=Error("#N/A"),t.error=Error("#ERROR!"),t.data=Error("#GETTING_DATA")},function(r,t,e){"use strict";function n(r){var t=void 0;return r=(r+"").replace(/#|!|\?/g,""),d[r]&&(t=d[r]),t?t:null}function u(r){var t=!1;for(var e in d)if(Object.prototype.hasOwnProperty.call(d,e)&&d[e]===r){t=!0;break}return t}t.__esModule=!0;var i;t["default"]=n,t.isValidStrict=u;var o=t.ERROR="ERROR",a=t.ERROR_DIV_ZERO="DIV/0",s=t.ERROR_NAME="NAME",l=t.ERROR_NOT_AVAILABLE="N/A",f=t.ERROR_NULL="NULL",c=t.ERROR_NUM="NUM",p=t.ERROR_REF="REF",m=t.ERROR_VALUE="VALUE",d=(i={},i[o]="#ERROR!",i[a]="#DIV/0!",i[s]="#NAME?",i[l]="#N/A",i[f]="#NULL!",i[c]="#NUM!",i[p]="#REF!",i[m]="#VALUE!",i)},function(r,t,e){var n=e(0);t.flattenShallow=function(r){return r&&r.reduce?r.reduce(function(r,t){var e=Array.isArray(r),n=Array.isArray(t);return e&&n?r.concat(t):e?(r.push(t),r):n?[r].concat(t):[r,t]}):r},t.isFlat=function(r){if(!r)return!1;for(var t=0;r.length>t;++t)if(Array.isArray(r[t]))return!1;return!0},t.flatten=function(){for(var r=t.argsToArray.apply(null,arguments);!t.isFlat(r);)r=t.flattenShallow(r);return r},t.argsToArray=function(r){var e=[];return t.arrayEach(r,function(r){e.push(r)}),e},t.numbers=function(){return this.flatten.apply(null,arguments).filter(function(r){return"number"==typeof r})},t.cleanFloat=function(r){var t=1e14;return Math.round(r*t)/t},t.parseBool=function(r){if("boolean"==typeof r)return r;if(r instanceof Error)return r;if("number"==typeof r)return 0!==r;if("string"==typeof r){var t=r.toUpperCase();if("TRUE"===t)return!0;if("FALSE"===t)return!1}return r instanceof Date&&!isNaN(r)||n.value},t.parseNumber=function(r){return r===undefined||""===r?n.value:isNaN(r)?n.value:parseFloat(r)},t.parseNumberArray=function(r){var e;if(!r||0===(e=r.length))return n.value;for(var u;e--;){if((u=t.parseNumber(r[e]))===n.value)return u;r[e]=u}return r},t.parseMatrix=function(r){if(!r||0===r.length)return n.value;for(var e,u=0;r.length>u;u++)if(e=t.parseNumberArray(r[u]),r[u]=e,e instanceof Error)return e;return r};var u=new Date(1900,0,1);t.parseDate=function(r){if(!isNaN(r)){if(r instanceof Date)return new Date(r);var t=parseInt(r,10);return 0>t?n.num:t>60?new Date(u.getTime()+864e5*(t-2)):new Date(u.getTime()+864e5*(t-1))}return"string"!=typeof r||(r=new Date(r),isNaN(r))?n.value:r},t.parseDateArray=function(r){for(var t,e=r.length;e--;){if((t=this.parseDate(r[e]))===n.value)return t;r[e]=t}return r},t.anyIsError=function(){for(var r=arguments.length;r--;)if(arguments[r]instanceof Error)return!0;return!1},t.arrayValuesToNumbers=function(r){for(var t,e=r.length;e--;)if("number"!=typeof(t=r[e]))if(t!==!0)if(t!==!1){if("string"==typeof t){var n=this.parseNumber(t);r[e]=n instanceof Error?0:n}}else r[e]=0;else r[e]=1;return r},t.rest=function(r,t){return t=t||1,r&&"function"==typeof r.slice?r.slice(t):r},t.initial=function(r,t){return t=t||1,r&&"function"==typeof r.slice?r.slice(0,r.length-t):r},t.arrayEach=function(r,t){for(var e=-1,n=r.length;++e-1?parseFloat(r):parseInt(r,10)),t}function u(r){return-1*n(r)}t.__esModule=!0,t.toNumber=n,t.invertNumber=u},function(module,exports,__webpack_require__){var utils=__webpack_require__(2),error=__webpack_require__(0),statistical=__webpack_require__(5),information=__webpack_require__(7);exports.ABS=function(r){return(r=utils.parseNumber(r))instanceof Error?r:Math.abs(r)},exports.ACOS=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.acos(r);return isNaN(t)&&(t=error.num),t},exports.ACOSH=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.log(r+Math.sqrt(r*r-1));return isNaN(t)&&(t=error.num),t},exports.ACOT=function(r){return(r=utils.parseNumber(r))instanceof Error?r:Math.atan(1/r)},exports.ACOTH=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=.5*Math.log((r+1)/(r-1));return isNaN(t)&&(t=error.num),t},exports.AGGREGATE=function(r,t,e,n){if(r=utils.parseNumber(r),t=utils.parseNumber(r),utils.anyIsError(r,t))return error.value;switch(r){case 1:return statistical.AVERAGE(e);case 2:return statistical.COUNT(e);case 3:return statistical.COUNTA(e);case 4:return statistical.MAX(e);case 5:return statistical.MIN(e);case 6:return exports.PRODUCT(e);case 7:return statistical.STDEV.S(e);case 8:return statistical.STDEV.P(e);case 9:return exports.SUM(e);case 10:return statistical.VAR.S(e);case 11:return statistical.VAR.P(e);case 12:return statistical.MEDIAN(e);case 13:return statistical.MODE.SNGL(e);case 14:return statistical.LARGE(e,n);case 15:return statistical.SMALL(e,n);case 16:return statistical.PERCENTILE.INC(e,n);case 17:return statistical.QUARTILE.INC(e,n);case 18:return statistical.PERCENTILE.EXC(e,n);case 19:return statistical.QUARTILE.EXC(e,n)}},exports.ARABIC=function(r){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(r))return error.value;var t=0;return r.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(r){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[r]}),t},exports.ASIN=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.asin(r);return isNaN(t)&&(t=error.num),t},exports.ASINH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r+Math.sqrt(r*r+1))},exports.ATAN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.atan(r)},exports.ATAN2=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.atan2(r,t)},exports.ATANH=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.log((1+r)/(1-r))/2;return isNaN(t)&&(t=error.num),t},exports.BASE=function(r,t,e){if(e=e||0,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;e=e===undefined?0:e;var n=r.toString(t);return Array(Math.max(e+1-n.length,0)).join("0")+n},exports.CEILING=function(r,t,e){if(t=t===undefined?1:Math.abs(t),e=e||0,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;if(0===t)return 0;var n=-Math.floor(Math.log(t)/Math.log(10));return 0>r?0===e?-exports.ROUND(Math.floor(Math.abs(r)/t)*t,n):-exports.ROUND(Math.ceil(Math.abs(r)/t)*t,n):exports.ROUND(Math.ceil(r/t)*t,n)},exports.CEILING.MATH=exports.CEILING,exports.CEILING.PRECISE=exports.CEILING,exports.COMBIN=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:exports.FACT(r)/(exports.FACT(t)*exports.FACT(r-t))},exports.COMBINA=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0===r&&0===t?1:exports.COMBIN(r+t-1,r-1)},exports.COS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.cos(r)},exports.COSH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:(Math.exp(r)+Math.exp(-r))/2},exports.COT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.tan(r)},exports.COTH=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.exp(2*r);return(t+1)/(t-1)},exports.CSC=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.sin(r)},exports.CSCH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:2/(Math.exp(r)-Math.exp(-r))},exports.DECIMAL=function(r,t){return 1>arguments.length?error.value:parseInt(r,t)},exports.DEGREES=function(r){return r=utils.parseNumber(r),r instanceof Error?r:180*r/Math.PI},exports.EVEN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:exports.CEILING(r,-2,-1)},exports.EXP=Math.exp;var MEMOIZED_FACT=[];exports.FACT=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.floor(r);return 0===t||1===t?1:MEMOIZED_FACT[t]>0?MEMOIZED_FACT[t]:MEMOIZED_FACT[t]=exports.FACT(t-1)*t},exports.FACTDOUBLE=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.floor(r);return t>0?t*exports.FACTDOUBLE(t-2):1},exports.FLOOR=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;if(0===t)return 0;if(!(r>0&&t>0||0>r&&0>t))return error.num;t=Math.abs(t);var e=-Math.floor(Math.log(t)/Math.log(10));return 0>r?-exports.ROUND(Math.ceil(Math.abs(r)/t),e):exports.ROUND(Math.floor(r/t)*t,e)},exports.FLOOR.MATH=function(r,t,e){if(t=t===undefined?1:t,e=e===undefined?0:e,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;if(0===t)return 0;t=t?Math.abs(t):1;var n=-Math.floor(Math.log(t)/Math.log(10));return 0>r?0===e||e===undefined?-exports.ROUND(Math.ceil(Math.abs(r)/t)*t,n):-exports.ROUND(Math.floor(Math.abs(r)/t)*t,n):exports.ROUND(Math.floor(r/t)*t,n)},exports.FLOOR.PRECISE=exports.FLOOR.MATH,exports.GCD=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=r.length,e=r[0],n=0>e?-e:e,u=1;t>u;u++){for(var i=r[u],o=0>i?-i:i;n&&o;)n>o?n%=o:o%=n;n+=o}return n},exports.INT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.floor(r)},exports.ISO={CEILING:exports.CEILING},exports.LCM=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t,e,n,u,i=1;(n=r.pop())!==undefined;)for(;n>1;){if(n%2){for(t=3,e=Math.floor(Math.sqrt(n));e>=t&&n%t;t+=2);u=t>e?n:t}else u=2;for(n/=u,i*=u,t=r.length;t;r[--t]%u==0&&1==(r[t]/=u)&&r.splice(t,1));}return i},exports.LN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r)},exports.LN10=function(){return Math.log(10)},exports.LN2=function(){return Math.log(2)},exports.LOG10E=function(){return Math.LOG10E},exports.LOG2E=function(){return Math.LOG2E},exports.LOG=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:(t=t===undefined?10:t,Math.log(r)/Math.log(t))},exports.LOG10=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log(r)/Math.log(10)},exports.MOD=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;if(0===t)return error.div0;var e=Math.abs(r%t);return t>0?e:-e},exports.MROUND=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0>r*t?error.num:Math.round(r/t)*t},exports.MULTINOMIAL=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=0,e=1,n=0;r.length>n;n++)t+=r[n],e*=exports.FACT(r[n]);return exports.FACT(t)/e},exports.ODD=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.ceil(Math.abs(r));return t=1&t?t:t+1,r>0?t:-t},exports.PI=function(){return Math.PI},exports.E=function(){return Math.E},exports.POWER=function(r,t){if(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=Math.pow(r,t);return isNaN(e)?error.num:e},exports.PRODUCT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=1,e=0;r.length>e;e++)t*=r[e];return t},exports.QUOTIENT=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:parseInt(r/t,10)},exports.RADIANS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:r*Math.PI/180},exports.RAND=function(){return Math.random()},exports.RANDBETWEEN=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r+Math.ceil((t-r+1)*Math.random())-1},exports.ROMAN=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;for(var t=(r+"").split(""),e=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],n="",u=3;u--;)n=(e[+t.pop()+10*u]||"")+n;return Array(+t.join("")+1).join("M")+n},exports.ROUND=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.round(r*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDDOWN=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:(r>0?1:-1)*Math.floor(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDUP=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:(r>0?1:-1)*Math.ceil(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)},exports.SEC=function(r){return r=utils.parseNumber(r),r instanceof Error?r:1/Math.cos(r)},exports.SECH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:2/(Math.exp(r)+Math.exp(-r))},exports.SERIESSUM=function(r,t,e,n){if(r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumberArray(n),utils.anyIsError(r,t,e,n))return error.value;for(var u=n[0]*Math.pow(r,t),i=1;n.length>i;i++)u+=n[i]*Math.pow(r,t+i*e);return u},exports.SIGN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0>r?-1:0===r?0:1},exports.SIN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.sin(r)},exports.SINH=function(r){return r=utils.parseNumber(r),r instanceof Error?r:(Math.exp(r)-Math.exp(-r))/2},exports.SQRT=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0>r?error.num:Math.sqrt(r)},exports.SQRTPI=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.sqrt(r*Math.PI)},exports.SQRT1_2=function(){return 1/Math.sqrt(2)},exports.SQRT2=function(){return Math.sqrt(2)},exports.SUBTOTAL=function(r,t){if((r=utils.parseNumber(r))instanceof Error)return r;switch(r){case 1:return statistical.AVERAGE(t);case 2:return statistical.COUNT(t);case 3:return statistical.COUNTA(t);case 4:return statistical.MAX(t);case 5:return statistical.MIN(t);case 6:return exports.PRODUCT(t);case 7:return statistical.STDEV.S(t);case 8:return statistical.STDEV.P(t);case 9:return exports.SUM(t);case 10:return statistical.VAR.S(t);case 11:return statistical.VAR.P(t);case 101:return statistical.AVERAGE(t);case 102:return statistical.COUNT(t);case 103:return statistical.COUNTA(t);case 104:return statistical.MAX(t);case 105:return statistical.MIN(t);case 106:return exports.PRODUCT(t);case 107:return statistical.STDEV.S(t);case 108:return statistical.STDEV.P(t);case 109:return exports.SUM(t);case 110:return statistical.VAR.S(t);case 111:return statistical.VAR.P(t)}},exports.ADD=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r+t)},exports.MINUS=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r-t)},exports.DIVIDE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:0===t?error.div0:r/t)},exports.MULTIPLY=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:r*t)},exports.GTE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:r>=t)},exports.LT=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:t>r)},exports.LTE=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:t>=r)},exports.EQ=function(r,t){return 2!==arguments.length?error.na:r===t},exports.NE=function(r,t){return 2!==arguments.length?error.na:r!==t},exports.POW=function(r,t){return 2!==arguments.length?error.na:(r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.error:exports.POWER(r,t))},exports.SUM=function(){var r=0;return utils.arrayEach(utils.argsToArray(arguments),function(t){if("number"==typeof t)r+=t;else if("string"==typeof t){var e=parseFloat(t);!isNaN(e)&&(r+=e)}else Array.isArray(t)&&(r+=exports.SUM.apply(null,t))}),r},exports.SUMIF=function(range,criteria){if((range=utils.parseNumberArray(utils.flatten(range)))instanceof Error)return range;for(var result=0,i=0;range.length>i;i++)result+=eval(range[i]+criteria)?range[i]:0;return result},exports.SUMIFS=function(){var args=utils.argsToArray(arguments),range=utils.parseNumberArray(utils.flatten(args.shift()));if(range instanceof Error)return range;for(var criteria=args,n_range_elements=range.length,n_criterias=criteria.length,result=0,i=0;n_range_elements>i;i++){for(var el=range[i],condition="",c=0;n_criterias>c;c++)condition+=el+criteria[c],c!==n_criterias-1&&(condition+="&&");eval(condition)&&(result+=el)}return result},exports.SUMPRODUCT=function(){if(!arguments||0===arguments.length)return error.value;for(var r,t,e,n,u=arguments.length+1,i=0,o=0;arguments[0].length>o;o++)if(arguments[0][o]instanceof Array)for(var a=0;arguments[0][o].length>a;a++){for(r=1,t=1;u>t;t++){if((n=utils.parseNumber(arguments[t-1][o][a]))instanceof Error)return n;r*=n}i+=r}else{for(r=1,t=1;u>t;t++){if((e=utils.parseNumber(arguments[t-1][o]))instanceof Error)return e;r*=e}i+=r}return i},exports.SUMSQ=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=0,e=r.length,n=0;e>n;n++)t+=information.ISNUMBER(r[n])?r[n]*r[n]:0;return t},exports.SUMX2MY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=0,n=0;r.length>n;n++)e+=r[n]*r[n]-t[n]*t[n];return e},exports.SUMX2PY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e=0;r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t));for(var n=0;r.length>n;n++)e+=r[n]*r[n]+t[n]*t[n];return e},exports.SUMXMY2=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e=0;r=utils.flatten(r),t=utils.flatten(t);for(var n=0;r.length>n;n++)e+=Math.pow(r[n]-t[n],2);return e},exports.TAN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.tan(r)},exports.TANH=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.exp(2*r);return(t-1)/(t+1)},exports.TRUNC=function(r,t){return t=t===undefined?0:t,r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:(r>0?1:-1)*Math.floor(Math.abs(r)*Math.pow(10,t))/Math.pow(10,t)}},function(module,exports,__webpack_require__){var mathTrig=__webpack_require__(4),text=__webpack_require__(8),jStat=__webpack_require__(13).jStat,utils=__webpack_require__(2),error=__webpack_require__(0),misc=__webpack_require__(12);exports.AVEDEV=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:jStat.sum(jStat(r).subtract(jStat.mean(r)).abs()[0])/r.length},exports.AVERAGE=function(){for(var r,t=utils.numbers(utils.flatten(arguments)),e=t.length,n=0,u=0,i=0;e>i;i++)n+=t[i],u+=1;return r=n/u,isNaN(r)&&(r=error.num),r},exports.AVERAGEA=function(){for(var r,t=utils.flatten(arguments),e=t.length,n=0,u=0,i=0;e>i;i++){var o=t[i];"number"==typeof o&&(n+=o),o===!0&&n++,null!==o&&u++}return r=n/u,isNaN(r)&&(r=error.num),r},exports.AVERAGEIF=function(range,criteria,average_range){if(1>=arguments.length)return error.na;if(average_range=average_range||range,range=utils.flatten(range),(average_range=utils.parseNumberArray(utils.flatten(average_range)))instanceof Error)return average_range;for(var average_count=0,result=0,i=0;range.length>i;i++)eval(range[i]+criteria)&&(result+=average_range[i],average_count++);return result/average_count},exports.AVERAGEIFS=function(){for(var args=utils.argsToArray(arguments),criteria=(args.length-1)/2,range=utils.flatten(args[0]),count=0,result=0,i=0;range.length>i;i++){for(var condition="",j=0;criteria>j;j++)condition+=args[2*j+1][i]+args[2*j+2],j!==criteria-1&&(condition+="&&");eval(condition)&&(result+=range[i],count++)}var average=result/count;return isNaN(average)?0:average},exports.BETA={},exports.BETA.DIST=function(r,t,e,n,u,i){return 4>arguments.length?error.value:(u=u===undefined?0:u,i=i===undefined?1:i,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),u=utils.parseNumber(u),i=utils.parseNumber(i),utils.anyIsError(r,t,e,u,i)?error.value:(r=(r-u)/(i-u),n?jStat.beta.cdf(r,t,e):jStat.beta.pdf(r,t,e)))},exports.BETA.INV=function(r,t,e,n,u){return n=n===undefined?0:n,u=u===undefined?1:u,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),u=utils.parseNumber(u),utils.anyIsError(r,t,e,n,u)?error.value:jStat.beta.inv(r,t,e)*(u-n)+n},exports.BINOM={},exports.BINOM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n)?error.value:n?jStat.binomial.cdf(r,t,e):jStat.binomial.pdf(r,t,e)},exports.BINOM.DIST.RANGE=function(r,t,e,n){if(n=n===undefined?e:n,r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n))return error.value;for(var u=0,i=e;n>=i;i++)u+=mathTrig.COMBIN(r,i)*Math.pow(t,i)*Math.pow(1-t,r-i);return u},exports.BINOM.INV=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;for(var n=0;r>=n;){if(jStat.binomial.cdf(n,r,t)>=e)return n;n++}},exports.CHISQ={},exports.CHISQ.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.chisquare.cdf(r,t):jStat.chisquare.pdf(r,t)},exports.CHISQ.DIST.RT=function(r,t){return!r|!t?error.na:1>r||t>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t?error.value:1-jStat.chisquare.cdf(r,t)},exports.CHISQ.INV=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:jStat.chisquare.inv(r,t)},exports.CHISQ.INV.RT=function(r,t){return!r|!t?error.na:0>r||r>1||1>t||t>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t?error.value:jStat.chisquare.inv(1-r,t)},exports.CHISQ.TEST=function(r,t){function e(r,t){var e=Math.exp(-.5*r);t%2==1&&(e*=Math.sqrt(2*r/f));for(var n=t;n>=2;)e=e*r/n,n-=2;for(var u=e,i=t;u>1e-10*e;)i+=2,u=u*r/i,e+=u;return 1-e}if(2!==arguments.length)return error.na;if(!(r instanceof Array&&t instanceof Array))return error.value;if(r.length!==t.length)return error.value;if(r[0]&&t[0]&&r[0].length!==t[0].length)return error.value;var n,u,i,o=r.length;for(u=0;o>u;u++)r[u]instanceof Array||(n=r[u],r[u]=[],r[u].push(n)),t[u]instanceof Array||(n=t[u],t[u]=[],t[u].push(n));var a=r[0].length,s=1===a?o-1:(o-1)*(a-1),l=0,f=Math.PI;for(u=0;o>u;u++)for(i=0;a>i;i++)l+=Math.pow(r[u][i]-t[u][i],2)/t[u][i];return Math.round(1e6*e(l,s))/1e6},exports.COLUMN=function(r,t){return 2!==arguments.length?error.na:0>t?error.num:r instanceof Array&&"number"==typeof t?0===r.length?undefined:jStat.col(r,t):error.value},exports.COLUMNS=function(r){return 1!==arguments.length?error.na:r instanceof Array?0===r.length?0:jStat.cols(r):error.value},exports.CONFIDENCE={},exports.CONFIDENCE.NORM=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.normalci(1,r,t,e)[1]-1},exports.CONFIDENCE.T=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.tci(1,r,t,e)[1]-1},exports.CORREL=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:jStat.corrcoeff(r,t)},exports.COUNT=function(){return utils.numbers(utils.flatten(arguments)).length},exports.COUNTA=function(){var r=utils.flatten(arguments);return r.length-exports.COUNTBLANK(r)},exports.COUNTIN=function(r,t){var e=0;r=utils.flatten(r);for(var n=0;r.length>n;n++)r[n]===t&&e++;return e},exports.COUNTBLANK=function(){for(var r,t=utils.flatten(arguments),e=0,n=0;t.length>n;n++)null!==(r=t[n])&&""!==r||e++;return e},exports.COUNTIF=function(range,criteria){range=utils.flatten(range),/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var matches=0,i=0;range.length>i;i++)"string"!=typeof range[i]?eval(range[i]+criteria)&&matches++:eval('"'+range[i]+'"'+criteria)&&matches++;return matches},exports.COUNTIFS=function(){for(var args=utils.argsToArray(arguments),results=Array(utils.flatten(args[0]).length),i=0;results.length>i;i++)results[i]=!0;for(i=0;args.length>i;i+=2){var range=utils.flatten(args[i]),criteria=args[i+1];/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var j=0;range.length>j;j++)results[j]="string"!=typeof range[j]?results[j]&&eval(range[j]+criteria):results[j]&&eval('"'+range[j]+'"'+criteria)}var result=0;for(i=0;results.length>i;i++)results[i]&&result++;return result},exports.COUNTUNIQUE=function(){return misc.UNIQUE.apply(null,utils.flatten(arguments)).length},exports.COVARIANCE={},exports.COVARIANCE.P=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),u=0,i=r.length,o=0;i>o;o++)u+=(r[o]-e)*(t[o]-n);return u/i},exports.COVARIANCE.S=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:jStat.covariance(r,t)},exports.DEVSQ=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=0,n=0;r.length>n;n++)e+=Math.pow(r[n]-t,2);return e},exports.EXPON={},exports.EXPON.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.exponential.cdf(r,t):jStat.exponential.pdf(r,t)},exports.F={},exports.F.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.centralF.cdf(r,t,e):jStat.centralF.pdf(r,t,e)},exports.F.DIST.RT=function(r,t,e){return 3!==arguments.length?error.na:0>r||1>t||1>e?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:1-jStat.centralF.cdf(r,t,e)},exports.F.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:0>=r||r>1?error.num:jStat.centralF.inv(r,t,e)},exports.F.INV.RT=function(r,t,e){return 3!==arguments.length?error.na:0>r||r>1||1>t||t>Math.pow(10,10)||1>e||e>Math.pow(10,10)?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:jStat.centralF.inv(1-r,t,e)},exports.F.TEST=function(r,t){if(!r||!t)return error.na;if(!(r instanceof Array&&t instanceof Array))return error.na;if(2>r.length||2>t.length)return error.div0;var e=function(r,t){for(var e=0,n=0;r.length>n;n++)e+=Math.pow(r[n]-t,2);return e},n=mathTrig.SUM(r)/r.length,u=mathTrig.SUM(t)/t.length;return e(r,n)/(r.length-1)/(e(t,u)/(t.length-1))},exports.FISHER=function(r){return r=utils.parseNumber(r),r instanceof Error?r:Math.log((1+r)/(1-r))/2},exports.FISHERINV=function(r){if((r=utils.parseNumber(r))instanceof Error)return r;var t=Math.exp(2*r);return(t-1)/(t+1)},exports.FORECAST=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(r,t,e))return error.value;for(var n=jStat.mean(e),u=jStat.mean(t),i=e.length,o=0,a=0,s=0;i>s;s++)o+=(e[s]-n)*(t[s]-u),a+=Math.pow(e[s]-n,2);var l=o/a;return u-l*n+l*r},exports.FREQUENCY=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=r.length,n=t.length,u=[],i=0;n>=i;i++){u[i]=0;for(var o=0;e>o;o++)0===i?r[o]>t[0]||(u[0]+=1):n>i?r[o]>t[i-1]&&t[i]>=r[o]&&(u[i]+=1):i===n&&r[o]>t[n-1]&&(u[n]+=1)}return u},exports.GAMMA=function(r){return r=utils.parseNumber(r),r instanceof Error?r:0===r?error.num:parseInt(r,10)===r&&0>r?error.num:jStat.gammafn(r)},exports.GAMMA.DIST=function(r,t,e,n){return 4!==arguments.length?error.na:r>=0&&t>0&&e>0?"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:n?jStat.gamma.cdf(r,t,e,!0):jStat.gamma.pdf(r,t,e,!1):error.value},exports.GAMMA.INV=function(r,t,e){return 3!==arguments.length?error.na:0>r||r>1||0>=t||0>=e?error.num:"number"!=typeof r||"number"!=typeof t||"number"!=typeof e?error.value:jStat.gamma.inv(r,t,e)},exports.GAMMALN=function(r){return r=utils.parseNumber(r),r instanceof Error?r:jStat.gammaln(r)},exports.GAMMALN.PRECISE=function(r){return 1!==arguments.length?error.na:r>0?"number"!=typeof r?error.value:jStat.gammaln(r):error.num},exports.GAUSS=function(r){return r=utils.parseNumber(r),r instanceof Error?r:jStat.normal.cdf(r,0,1)-.5},exports.GEOMEAN=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:jStat.geomean(r)},exports.GROWTH=function(r,t,e,n){if((r=utils.parseNumberArray(r))instanceof Error)return r;var u;if(t===undefined)for(t=[],u=1;r.length>=u;u++)t.push(u);if(e===undefined)for(e=[],u=1;r.length>=u;u++)e.push(u);if(t=utils.parseNumberArray(t),e=utils.parseNumberArray(e),utils.anyIsError(t,e))return error.value;n===undefined&&(n=!0);var i=r.length,o=0,a=0,s=0,l=0;for(u=0;i>u;u++){var f=t[u],c=Math.log(r[u]);o+=f,a+=c,s+=f*c,l+=f*f}o/=i,a/=i,s/=i,l/=i;var p,m;n?(p=(s-o*a)/(l-o*o),m=a-p*o):(p=s/l,m=0);var d=[];for(u=0;e.length>u;u++)d.push(Math.exp(m+p*e[u]));return d},exports.HARMEAN=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=r.length,e=0,n=0;t>n;n++)e+=1/r[n];return t/e},exports.HYPGEOM={},exports.HYPGEOM.DIST=function(r,t,e,n,u){function i(r,t,e,n){return mathTrig.COMBIN(e,r)*mathTrig.COMBIN(n-e,t-r)/mathTrig.COMBIN(n,t)}function o(r,t,e,n){for(var u=0,o=0;r>=o;o++)u+=i(o,t,e,n);return u}return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n)?error.value:u?o(r,t,e,n):i(r,t,e,n)},exports.INTERCEPT=function(r,t){return r=utils.parseNumberArray(r),t=utils.parseNumberArray(t),utils.anyIsError(r,t)?error.value:r.length!==t.length?error.na:exports.FORECAST(0,r,t)},exports.KURT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,u=0;e>u;u++)n+=Math.pow(r[u]-t,4);return n/=Math.pow(jStat.stdev(r,!0),4),e*(e+1)/((e-1)*(e-2)*(e-3))*n-3*(e-1)*(e-1)/((e-2)*(e-3))},exports.LARGE=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t)?r:r.sort(function(r,t){return t-r})[t-1]},exports.LINEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),u=t.length,i=0,o=0,a=0;u>a;a++)i+=(t[a]-n)*(r[a]-e),o+=Math.pow(t[a]-n,2);var s=i/o;return[s,e-s*n]},exports.LOGEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=0;r.length>e;e++)r[e]=Math.log(r[e]);var n=exports.LINEST(r,t);return n[0]=Math.round(1e6*Math.exp(n[0]))/1e6,n[1]=Math.round(1e6*Math.exp(n[1]))/1e6,n},exports.LOGNORM={},exports.LOGNORM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.lognormal.cdf(r,t,e):jStat.lognormal.pdf(r,t,e)},exports.LOGNORM.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.lognormal.inv(r,t,e)},exports.MAX=function(){var r=utils.numbers(utils.flatten(arguments));return 0===r.length?0:Math.max.apply(Math,r)},exports.MAXA=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===r.length?0:Math.max.apply(Math,r)},exports.MEDIAN=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments)),t=jStat.median(r);return isNaN(t)&&(t=error.num),t},exports.MIN=function(){var r=utils.numbers(utils.flatten(arguments));return 0===r.length?0:Math.min.apply(Math,r)},exports.MINA=function(){var r=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===r.length?0:Math.min.apply(Math,r)},exports.MODE={},exports.MODE.MULT=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t,e=r.length,n={},u=[],i=0,o=0;e>o;o++)t=r[o],n[t]=n[t]?n[t]+1:1,n[t]>i&&(i=n[t],u=[]),n[t]===i&&(u[u.length]=t);return u},exports.MODE.SNGL=function(){var r=utils.parseNumberArray(utils.flatten(arguments));return r instanceof Error?r:exports.MODE.MULT(r).sort(function(r,t){return r-t})[0]},exports.NEGBINOM={},exports.NEGBINOM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?jStat.negbin.cdf(r,t,e):jStat.negbin.pdf(r,t,e)},exports.NORM={},exports.NORM.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:e>0?n?jStat.normal.cdf(r,t,e):jStat.normal.pdf(r,t,e):error.num},exports.NORM.INV=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:jStat.normal.inv(r,t,e)},exports.NORM.S={},exports.NORM.S.DIST=function(r,t){return r=utils.parseNumber(r),r instanceof Error?error.value:t?jStat.normal.cdf(r,0,1):jStat.normal.pdf(r,0,1)},exports.NORM.S.INV=function(r){return r=utils.parseNumber(r),r instanceof Error?error.value:jStat.normal.inv(r,0,1)},exports.PEARSON=function(r,t){if(t=utils.parseNumberArray(utils.flatten(t)),r=utils.parseNumberArray(utils.flatten(r)),utils.anyIsError(t,r))return error.value;for(var e=jStat.mean(r),n=jStat.mean(t),u=r.length,i=0,o=0,a=0,s=0;u>s;s++)i+=(r[s]-e)*(t[s]-n),o+=Math.pow(r[s]-e,2),a+=Math.pow(t[s]-n,2);return i/Math.sqrt(o*a)},exports.PERCENTILE={},exports.PERCENTILE.EXC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;r=r.sort(function(r,t){return r-t});var e=r.length;if(1/(e+1)>t||t>1-1/(e+1))return error.num;var n=t*(e+1)-1,u=Math.floor(n);return utils.cleanFloat(n===u?r[n]:r[u]+(n-u)*(r[u+1]-r[u]))},exports.PERCENTILE.INC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;r=r.sort(function(r,t){return r-t});var e=r.length,n=t*(e-1),u=Math.floor(n);return utils.cleanFloat(n===u?r[n]:r[u]+(n-u)*(r[u+1]-r[u]))},exports.PERCENTRANK={},exports.PERCENTRANK.EXC=function(r,t,e){if(e=e===undefined?3:e,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;r=r.sort(function(r,t){return r-t});for(var n=misc.UNIQUE.apply(null,r),u=r.length,i=n.length,o=Math.pow(10,e),a=0,s=!1,l=0;!s&&i>l;)t===n[l]?(a=(r.indexOf(n[l])+1)/(u+1),s=!0):n[l]>t||t>=n[l+1]&&l!==i-1||(a=(r.indexOf(n[l])+1+(t-n[l])/(n[l+1]-n[l]))/(u+1),s=!0),l++;return Math.floor(a*o)/o},exports.PERCENTRANK.INC=function(r,t,e){if(e=e===undefined?3:e,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e))return error.value;r=r.sort(function(r,t){return r-t});for(var n=misc.UNIQUE.apply(null,r),u=r.length,i=n.length,o=Math.pow(10,e),a=0,s=!1,l=0;!s&&i>l;)t===n[l]?(a=r.indexOf(n[l])/(u-1),s=!0):n[l]>t||t>=n[l+1]&&l!==i-1||(a=(r.indexOf(n[l])+(t-n[l])/(n[l+1]-n[l]))/(u-1),s=!0),l++;return Math.floor(a*o)/o},exports.PERMUT=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:mathTrig.FACT(r)/mathTrig.FACT(r-t)},exports.PERMUTATIONA=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:Math.pow(r,t)},exports.PHI=function(r){return r=utils.parseNumber(r),r instanceof Error?error.value:Math.exp(-.5*r*r)/2.5066282746310002},exports.POISSON={},exports.POISSON.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.poisson.cdf(r,t):jStat.poisson.pdf(r,t)},exports.PROB=function(r,t,e,n){if(e===undefined)return 0;if(n=n===undefined?e:n,r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumber(e),n=utils.parseNumber(n),utils.anyIsError(r,t,e,n))return error.value;if(e===n)return 0>r.indexOf(e)?0:t[r.indexOf(e)];for(var u=r.sort(function(r,t){return r-t}),i=u.length,o=0,a=0;i>a;a++)e>u[a]||u[a]>n||(o+=t[r.indexOf(u[a])]);return o},exports.QUARTILE={},exports.QUARTILE.EXC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;switch(t){case 1:return exports.PERCENTILE.EXC(r,.25);case 2:return exports.PERCENTILE.EXC(r,.5);case 3:return exports.PERCENTILE.EXC(r,.75);default:return error.num}},exports.QUARTILE.INC=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;switch(t){case 1:return exports.PERCENTILE.INC(r,.25);case 2:return exports.PERCENTILE.INC(r,.5);case 3:return exports.PERCENTILE.INC(r,.75);default:return error.num}},exports.RANK={},exports.RANK.AVG=function(r,t,e){if(r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;t=utils.flatten(t),e=e||!1,t=t.sort(e?function(r,t){return r-t}:function(r,t){return t-r});for(var n=t.length,u=0,i=0;n>i;i++)t[i]===r&&u++;return u>1?(2*t.indexOf(r)+u+1)/2:t.indexOf(r)+1},exports.RANK.EQ=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:(e=e||!1,t=t.sort(e?function(r,t){return r-t}:function(r,t){return t-r}),t.indexOf(r)+1)},exports.ROW=function(r,t){return 2!==arguments.length?error.na:0>t?error.num:r instanceof Array&&"number"==typeof t?0===r.length?undefined:jStat.row(r,t):error.value},exports.ROWS=function(r){return 1!==arguments.length?error.na:r instanceof Array?0===r.length?0:jStat.rows(r):error.value},exports.RSQ=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t)?error.value:Math.pow(exports.PEARSON(r,t),2)},exports.SKEW=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,u=0;e>u;u++)n+=Math.pow(r[u]-t,3);return e*n/((e-1)*(e-2)*Math.pow(jStat.stdev(r,!0),3))},exports.SKEW.P=function(){var r=utils.parseNumberArray(utils.flatten(arguments));if(r instanceof Error)return r;for(var t=jStat.mean(r),e=r.length,n=0,u=0,i=0;e>i;i++)u+=Math.pow(r[i]-t,3),n+=Math.pow(r[i]-t,2);return u/=e,n/=e,u/Math.pow(n,1.5)},exports.SLOPE=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(t),n=jStat.mean(r),u=t.length,i=0,o=0,a=0;u>a;a++)i+=(t[a]-e)*(r[a]-n),o+=Math.pow(t[a]-e,2);return i/o},exports.SMALL=function(r,t){return r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t)?r:r.sort(function(r,t){return r-t})[t-1]},exports.STANDARDIZE=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:(r-t)/e},exports.STDEV={},exports.STDEV.P=function(){var r=exports.VAR.P.apply(this,arguments),t=Math.sqrt(r);return isNaN(t)&&(t=error.num),t},exports.STDEV.S=function(){var r=exports.VAR.S.apply(this,arguments);return Math.sqrt(r)},exports.STDEVA=function(){var r=exports.VARA.apply(this,arguments);return Math.sqrt(r)},exports.STDEVPA=function(){var r=exports.VARPA.apply(this,arguments),t=Math.sqrt(r);return isNaN(t)&&(t=error.num),t},exports.STEYX=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;for(var e=jStat.mean(t),n=jStat.mean(r),u=t.length,i=0,o=0,a=0,s=0;u>s;s++)i+=Math.pow(r[s]-n,2),o+=(t[s]-e)*(r[s]-n),a+=Math.pow(t[s]-e,2);return Math.sqrt((i-o*o/a)/(u-2))},exports.TRANSPOSE=function(r){return r?jStat.transpose(r):error.na},exports.T=text.T,exports.T.DIST=function(r,t,e){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:e?jStat.studentt.cdf(r,t):jStat.studentt.pdf(r,t)},exports.T.DIST["2T"]=function(r,t){return 2!==arguments.length?error.na:0>r||1>t?error.num:"number"!=typeof r||"number"!=typeof t?error.value:2*(1-jStat.studentt.cdf(r,t))},exports.T.DIST.RT=function(r,t){return 2!==arguments.length?error.na:0>r||1>t?error.num:"number"!=typeof r||"number"!=typeof t?error.value:1-jStat.studentt.cdf(r,t)},exports.T.INV=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),utils.anyIsError(r,t)?error.value:jStat.studentt.inv(r,t)},exports.T.INV["2T"]=function(r,t){return r=utils.parseNumber(r),t=utils.parseNumber(t),0>=r||r>1||1>t?error.num:utils.anyIsError(r,t)?error.value:Math.abs(jStat.studentt.inv(r/2,t))},exports.T.TEST=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(r,t))return error.value;var e,n=jStat.mean(r),u=jStat.mean(t),i=0,o=0;for(e=0;r.length>e;e++)i+=Math.pow(r[e]-n,2);for(e=0;t.length>e;e++)o+=Math.pow(t[e]-u,2);return i/=r.length-1,o/=t.length-1,exports.T.DIST["2T"](Math.abs(n-u)/Math.sqrt(i/r.length+o/t.length),r.length+t.length-2)},exports.TREND=function(r,t,e){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(r,t,e))return error.value;var n=exports.LINEST(r,t),u=n[0],i=n[1],o=[];return e.forEach(function(r){o.push(u*r+i)}),o},exports.TRIMMEAN=function(r,t){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;var e=mathTrig.FLOOR(r.length*t,2)/2;return jStat.mean(utils.initial(utils.rest(r.sort(function(r,t){return r-t}),e),e))},exports.VAR={},exports.VAR.P=function(){for(var r,t=utils.numbers(utils.flatten(arguments)),e=t.length,n=0,u=exports.AVERAGE(t),i=0;e>i;i++)n+=Math.pow(t[i]-u,2);return r=n/e,isNaN(r)&&(r=error.num),r},exports.VAR.S=function(){for(var r=utils.numbers(utils.flatten(arguments)),t=r.length,e=0,n=exports.AVERAGE(r),u=0;t>u;u++)e+=Math.pow(r[u]-n,2);return e/(t-1)},exports.VARA=function(){for(var r=utils.flatten(arguments),t=r.length,e=0,n=0,u=exports.AVERAGEA(r),i=0;t>i;i++){var o=r[i];e+="number"==typeof o?Math.pow(o-u,2):o===!0?Math.pow(1-u,2):Math.pow(0-u,2),null!==o&&n++}return e/(n-1)},exports.VARPA=function(){for(var r,t=utils.flatten(arguments),e=t.length,n=0,u=0,i=exports.AVERAGEA(t),o=0;e>o;o++){var a=t[o];n+="number"==typeof a?Math.pow(a-i,2):a===!0?Math.pow(1-i,2):Math.pow(0-i,2),null!==a&&u++}return r=n/u,isNaN(r)&&(r=error.num),r},exports.WEIBULL={},exports.WEIBULL.DIST=function(r,t,e,n){return r=utils.parseNumber(r),t=utils.parseNumber(t),e=utils.parseNumber(e),utils.anyIsError(r,t,e)?error.value:n?1-Math.exp(-Math.pow(r/e,t)):Math.pow(r,t-1)*Math.exp(-Math.pow(r/e,t))*t/Math.pow(e,t)},exports.Z={},exports.Z.TEST=function(r,t,e){if(r=utils.parseNumberArray(utils.flatten(r)),t=utils.parseNumber(t),utils.anyIsError(r,t))return error.value;e=e||exports.STDEV.S(r);var n=r.length;return 1-exports.NORM.S.DIST((exports.AVERAGE(r)-t)/(e/Math.sqrt(n)),!0)}},function(r,t,e){function n(r){return 1===new Date(r,1,29).getMonth()}function u(r,t){return Math.ceil((t-r)/1e3/60/60/24)}function i(r){return(r-s)/864e5+(r>-22038912e5?2:1)}var o=e(0),a=e(2),s=new Date(1900,0,1),l=[undefined,0,1,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,1,2,3,4,5,6,0],f=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],c=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],undefined,undefined,undefined,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];t.DATE=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:0>r||0>t||0>e?o.num:new Date(r,t-1,e)},t.DATEVALUE=function(r){if("string"!=typeof r)return o.value;var t=Date.parse(r);return isNaN(t)?o.value:t>-22038912e5?(t-s)/864e5+2:(t-s)/864e5+1},t.DAY=function(r){var t=a.parseDate(r);return t instanceof Error?t:t.getDate()},t.DAYS=function(r,t){return r=a.parseDate(r),t=a.parseDate(t),r instanceof Error?r:t instanceof Error?t:i(r)-i(t)},t.DAYS360=function(r,t,e){if(e=a.parseBool(e),r=a.parseDate(r),t=a.parseDate(t),r instanceof Error)return r;if(t instanceof Error)return t;if(e instanceof Error)return e;var n,u,i=r.getMonth(),o=t.getMonth();if(e)n=31===r.getDate()?30:r.getDate(),u=31===t.getDate()?30:t.getDate();else{var s=new Date(r.getFullYear(),i+1,0).getDate(),l=new Date(t.getFullYear(),o+1,0).getDate();n=r.getDate()===s?30:r.getDate(),t.getDate()===l?30>n?(o++,u=1):u=30:u=t.getDate()}return 360*(t.getFullYear()-r.getFullYear())+30*(o-i)+(u-n)},t.EDATE=function(r,t){return(r=a.parseDate(r))instanceof Error?r:isNaN(t)?o.value:(t=parseInt(t,10),r.setMonth(r.getMonth()+t),i(r))},t.EOMONTH=function(r,t){return(r=a.parseDate(r))instanceof Error?r:isNaN(t)?o.value:(t=parseInt(t,10),i(new Date(r.getFullYear(),r.getMonth()+t+1,0)))},t.HOUR=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getHours()},t.INTERVAL=function(r){if("number"!=typeof r&&"string"!=typeof r)return o.value;r=parseInt(r,10);var t=Math.floor(r/94608e4);r%=94608e4;var e=Math.floor(r/2592e3);r%=2592e3;var n=Math.floor(r/86400);r%=86400;var u=Math.floor(r/3600);r%=3600;var i=Math.floor(r/60);r%=60;var a=r;return t=t>0?t+"Y":"",e=e>0?e+"M":"",n=n>0?n+"D":"",u=u>0?u+"H":"",i=i>0?i+"M":"",a=a>0?a+"S":"","P"+t+e+n+"T"+u+i+a},t.ISOWEEKNUM=function(r){if((r=a.parseDate(r))instanceof Error)return r;r.setHours(0,0,0),r.setDate(r.getDate()+4-(r.getDay()||7));var t=new Date(r.getFullYear(),0,1);return Math.ceil(((r-t)/864e5+1)/7)},t.MINUTE=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getMinutes()},t.MONTH=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getMonth()+1},t.NETWORKDAYS=function(r,t,e){return this.NETWORKDAYS.INTL(r,t,1,e)},t.NETWORKDAYS.INTL=function(r,t,e,n){if((r=a.parseDate(r))instanceof Error)return r;if((t=a.parseDate(t))instanceof Error)return t;if(!((e=e===undefined?c[1]:c[e])instanceof Array))return o.value;n===undefined?n=[]:n instanceof Array||(n=[n]);for(var u=0;n.length>u;u++){var i=a.parseDate(n[u]);if(i instanceof Error)return i;n[u]=i}var s=(t-r)/864e5+1,l=s,f=r;for(u=0;s>u;u++){var p=(new Date).getTimezoneOffset()>0?f.getUTCDay():f.getDay(),m=!1;p!==e[0]&&p!==e[1]||(m=!0);for(var d=0;n.length>d;d++){var h=n[d];if(h.getDate()===f.getDate()&&h.getMonth()===f.getMonth()&&h.getFullYear()===f.getFullYear()){m=!0;break}}m&&l--,f.setDate(f.getDate()+1)}return l},t.NOW=function(){return new Date},t.SECOND=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getSeconds()},t.TIME=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:0>r||0>t||0>e?o.num:(3600*r+60*t+e)/86400},t.TIMEVALUE=function(r){return r=a.parseDate(r),r instanceof Error?r:(3600*r.getHours()+60*r.getMinutes()+r.getSeconds())/86400},t.TODAY=function(){return new Date},t.WEEKDAY=function(r,t){return(r=a.parseDate(r))instanceof Error?r:(t===undefined&&(t=1),f[t][r.getDay()])},t.WEEKNUM=function(r,t){if((r=a.parseDate(r))instanceof Error)return r;if(t===undefined&&(t=1),21===t)return this.ISOWEEKNUM(r);var e=l[t],n=new Date(r.getFullYear(),0,1),u=n.getDay()t)return o.num;if(!((e=e===undefined?c[1]:c[e])instanceof Array))return o.value;n===undefined?n=[]:n instanceof Array||(n=[n]);for(var u=0;n.length>u;u++){var i=a.parseDate(n[u]);if(i instanceof Error)return i;n[u]=i}for(var s=0;t>s;){r.setDate(r.getDate()+1);var l=r.getDay();if(l!==e[0]&&l!==e[1]){for(var f=0;n.length>f;f++){var p=n[f];if(p.getDate()===r.getDate()&&p.getMonth()===r.getMonth()&&p.getFullYear()===r.getFullYear()){s--;break}}s++}}return r},t.YEAR=function(r){return r=a.parseDate(r),r instanceof Error?r:r.getFullYear()},t.YEARFRAC=function(r,t,e){if((r=a.parseDate(r))instanceof Error)return r;if((t=a.parseDate(t))instanceof Error)return t;e=e||0;var i=r.getDate(),o=r.getMonth()+1,s=r.getFullYear(),l=t.getDate(),f=t.getMonth()+1,c=t.getFullYear();switch(e){case 0:return 31===i&&31===l?(i=30,l=30):31===i?i=30:30===i&&31===l&&(l=30),(l+30*f+360*c-(i+30*o+360*s))/360;case 1:var p=function(r,t){var e=r.getFullYear(),u=new Date(e,2,1);if(n(e)&&u>r&&t>=u)return!0;var i=t.getFullYear(),o=new Date(i,2,1);return n(i)&&t>=o&&o>r},m=365;if(s===c||s+1===c&&(o>f||o===f&&i>=l))return(s===c&&n(s)||p(r,t)||1===f&&29===l)&&(m=366),u(r,t)/m;var d=c-s+1,h=(new Date(c+1,0,1)-new Date(s,0,1))/1e3/60/60/24,E=h/d;return u(r,t)/E;case 2:return u(r,t)/360;case 3:return u(r,t)/365;case 4:return(l+30*f+360*c-(i+30*o+360*s))/360}}},function(r,t,e){var n=e(0);t.CELL=function(){throw Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(r){switch(r){case n.nil:return 1;case n.div0:return 2;case n.value:return 3;case n.ref:return 4;case n.name:return 5;case n.num:return 6;case n.na:return 7;case n.data:return 8}return n.na},t.INFO=function(){throw Error("INFO is not implemented")},t.ISBLANK=function(r){return null===r},t.ISBINARY=function(r){return/^[01]{1,10}$/.test(r)},t.ISERR=function(r){return[n.value,n.ref,n.div0,n.num,n.name,n.nil].indexOf(r)>=0||"number"==typeof r&&(isNaN(r)||!isFinite(r))},t.ISERROR=function(r){return t.ISERR(r)||r===n.na},t.ISEVEN=function(r){return!(1&Math.floor(Math.abs(r)))},t.ISFORMULA=function(){throw Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(r){return r===!0||r===!1},t.ISNA=function(r){return r===n.na},t.ISNONTEXT=function(r){return"string"!=typeof r},t.ISNUMBER=function(r){return"number"==typeof r&&!isNaN(r)&&isFinite(r)},t.ISODD=function(r){return!!(1&Math.floor(Math.abs(r)))},t.ISREF=function(){throw Error("ISREF is not implemented")},t.ISTEXT=function(r){return"string"==typeof r},t.N=function(r){return this.ISNUMBER(r)?r:r instanceof Date?r.getTime():r===!0?1:r===!1?0:this.ISERROR(r)?r:0},t.NA=function(){return n.na},t.SHEET=function(){throw Error("SHEET is not implemented")},t.SHEETS=function(){throw Error("SHEETS is not implemented")},t.TYPE=function(r){return this.ISNUMBER(r)?1:this.ISTEXT(r)?2:this.ISLOGICAL(r)?4:this.ISERROR(r)?16:Array.isArray(r)?64:void 0}},function(r,t,e){var n=e(2),u=e(0),i=e(14);t.ASC=function(){throw Error("ASC is not implemented")},t.BAHTTEXT=function(){throw Error("BAHTTEXT is not implemented")},t.CHAR=function(r){return r=n.parseNumber(r),r instanceof Error?r:String.fromCharCode(r)},t.CLEAN=function(r){return r=r||"",r.replace(/[\0-\x1F]/g,"")},t.CODE=function(r){r=r||"";var t=r.charCodeAt(0);return isNaN(t)&&(t=u.na),t},t.CONCATENATE=function(){for(var r=n.flatten(arguments),t=0;(t=r.indexOf(!0))>-1;)r[t]="TRUE";for(var e=0;(e=r.indexOf(!1))>-1;)r[e]="FALSE";return r.join("")},t.DBCS=function(){throw Error("DBCS is not implemented")},t.DOLLAR=function(r,t){if(t=t===undefined?2:t,r=n.parseNumber(r),t=n.parseNumber(t),n.anyIsError(r,t))return u.value;var e="";return t>0?t>0&&(e="($0,0."+Array(t+1).join("0")+")"):(r=Math.round(r*Math.pow(10,t))/Math.pow(10,t),e="($0,0)"),i(r).format(e)},t.EXACT=function(r,t){return 2!==arguments.length?u.na:r===t},t.FIND=function(r,t,e){return 2>arguments.length?u.na:(e=e===undefined?0:e,t?t.indexOf(r,e-1)+1:null)},t.FIXED=function(r,t,e){if(t=t===undefined?2:t,e=e!==undefined&&e,r=n.parseNumber(r),t=n.parseNumber(t),n.anyIsError(r,t))return u.value;var o=e?"0":"0,0";return t>0?t>0&&(o+="."+Array(t+1).join("0")):r=Math.round(r*Math.pow(10,t))/Math.pow(10,t),i(r).format(o)},t.HTML2TEXT=function(r){var t="";return r&&(r instanceof Array?r.forEach(function(r){""!==t&&(t+="\n"),t+=r.replace(/<(?:.|\n)*?>/gm,"")}):t=r.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(r,t){return t=t===undefined?1:t,t=n.parseNumber(t),t instanceof Error||"string"!=typeof r?u.value:r?r.substring(0,t):null},t.LEN=function(r){return 0===arguments.length?u.error:"string"==typeof r?r?r.length:0:r.length?r.length:u.value},t.LOWER=function(r){return"string"!=typeof r?u.value:r?r.toLowerCase():r},t.MID=function(r,t,e){if(t=n.parseNumber(t),e=n.parseNumber(e),n.anyIsError(t,e)||"string"!=typeof r)return e;var u=t-1;return r.substring(u,u+e)},t.NUMBERVALUE=function(r,t,e){return t=void 0===t?".":t,e=void 0===e?",":e,+r.replace(t,".").replace(e,"")},t.PRONETIC=function(){throw Error("PRONETIC is not implemented")},t.PROPER=function(r){return r===undefined||0===r.length?u.value:(r===!0&&(r="TRUE"),r===!1&&(r="FALSE"),isNaN(r)&&"number"==typeof r?u.value:("number"==typeof r&&(r=""+r),r.replace(/\w\S*/g,function(r){return r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(r,t){if(2>arguments.length)return u.na;var e=r.match(RegExp(t));return e?e[e.length>1?e.length-1:0]:null},t.REGEXMATCH=function(r,t,e){if(2>arguments.length)return u.na;var n=r.match(RegExp(t));return e?n:!!n},t.REGEXREPLACE=function(r,t,e){return 3>arguments.length?u.na:r.replace(RegExp(t),e)},t.REPLACE=function(r,t,e,i){return t=n.parseNumber(t),e=n.parseNumber(e),n.anyIsError(t,e)||"string"!=typeof r||"string"!=typeof i?u.value:r.substr(0,t-1)+i+r.substr(t-1+e)},t.REPT=function(r,t){return t=n.parseNumber(t),t instanceof Error?t:Array(t+1).join(r)},t.RIGHT=function(r,t){return t=t===undefined?1:t,t=n.parseNumber(t),t instanceof Error?t:r?r.substring(r.length-t):u.na},t.SEARCH=function(r,t,e){var n;return"string"!=typeof r||"string"!=typeof t?u.value:(e=e===undefined?0:e,n=t.toLowerCase().indexOf(r.toLowerCase(),e-1)+1,0===n?u.value:n)},t.SPLIT=function(r,t){return r.split(t)},t.SUBSTITUTE=function(r,t,e,n){if(2>arguments.length)return u.na;if(!(r&&t&&e))return r;if(n===undefined)return r.replace(RegExp(t,"g"),e);for(var i=0,o=0;r.indexOf(t,i)>0;)if(i=r.indexOf(t,i+1),++o===n)return r.substring(0,i)+e+r.substring(i+t.length)},t.T=function(r){return"string"==typeof r?r:""},t.TEXT=function(r,t){return r=n.parseNumber(r),n.anyIsError(r)?u.na:i(r).format(t)},t.TRIM=function(r){return"string"!=typeof r?u.value:r.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(r){return"string"!=typeof r?u.value:r.toUpperCase()},t.VALUE=function(r){if("string"!=typeof r)return u.value;var t=i().unformat(r);return void 0===t?0:t}},function(r,t,e){"use strict";function n(r){var t=parseInt(r,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function u(r){var t="";return 0>r||(t=""+(r+1)),t}function i(r){var t=0;if("string"==typeof r){r=r.toUpperCase();for(var e=0,n=r.length-1;r.length>e;e+=1,n-=1)t+=Math.pow(f,n)*(l.indexOf(r[e])+1)}return--t}function o(r){for(var t="";r>=0;)t=String.fromCharCode(r%f+97)+t,r=Math.floor(r/f)-1;return t.toUpperCase()}function a(r){if("string"!=typeof r||!c.test(r))return[];var t=r.toUpperCase().match(c),e=t[1],u=t[2],o=t[3],a=t[4];return[{index:n(a),label:a,isAbsolute:"$"===o},{index:i(u),label:u,isAbsolute:"$"===e}]}function s(r,t){var e=(r.isAbsolute?"$":"")+u(r.index);return(t.isAbsolute?"$":"")+o(t.index)+e}t.__esModule=!0,t.rowLabelToIndex=n,t.rowIndexToLabel=u,t.columnLabelToIndex=i,t.columnIndexToLabel=o,t.extractLabel=a,t.toLabel=s;var l="ABCDEFGHIJKLMNOPQRSTUVWXYZ",f=l.length,c=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/},function(r,t,e){"use strict";t.__esModule=!0,t["default"]=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLAR","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FIXED","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","NUMERAL","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TEXT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"]},function(r,t,e){function n(r){return/^[01]{1,10}$/.test(r)}var u=e(0),i=e(13).jStat,o=e(8),a=e(2),s=e(32);t.BESSELI=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:s.besseli(r,t)},t.BESSELJ=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:s.besselj(r,t)},t.BESSELK=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:s.besselk(r,t)},t.BESSELY=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:s.bessely(r,t)},t.BIN2DEC=function(r){if(!n(r))return u.num;var t=parseInt(r,2),e=""+r;return 10===e.length&&"1"===e.substring(0,1)?parseInt(e.substring(1),2)-512:t},t.BIN2HEX=function(r,t){if(!n(r))return u.num;var e=""+r;if(10===e.length&&"1"===e.substring(0,1))return(0xfffffffe00+parseInt(e.substring(1),2)).toString(16);var i=parseInt(r,2).toString(16);return t===undefined?i:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),i.length>t?u.num:o.REPT("0",t-i.length)+i)},t.BIN2OCT=function(r,t){if(!n(r))return u.num;var e=""+r;if(10===e.length&&"1"===e.substring(0,1))return(1073741312+parseInt(e.substring(1),2)).toString(8);var i=parseInt(r,2).toString(8);return t===undefined?i:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),i.length>t?u.num:o.REPT("0",t-i.length)+i)},t.BITAND=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:0>r||0>t?u.num:Math.floor(r)!==r||Math.floor(t)!==t?u.num:r>0xffffffffffff||t>0xffffffffffff?u.num:r&t},t.BITLSHIFT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:0>r?u.num:Math.floor(r)!==r?u.num:r>0xffffffffffff?u.num:Math.abs(t)>53?u.num:0>t?r>>-t:r<r||0>t?u.num:Math.floor(r)!==r||Math.floor(t)!==t?u.num:r>0xffffffffffff||t>0xffffffffffff?u.num:r|t},t.BITRSHIFT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:0>r?u.num:Math.floor(r)!==r?u.num:r>0xffffffffffff?u.num:Math.abs(t)>53?u.num:0>t?r<<-t:r>>t},t.BITXOR=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:0>r||0>t?u.num:Math.floor(r)!==r||Math.floor(t)!==t?u.num:r>0xffffffffffff||t>0xffffffffffff?u.num:r^t},t.COMPLEX=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?r:"i"!==(e=e===undefined?"i":e)&&"j"!==e?u.value:0===r&&0===t?0:0===r?1===t?e:""+t+e:0===t?""+r:r+(t>0?"+":"")+(1===t?e:""+t+e)},t.CONVERT=function(r,t,e){if((r=a.parseNumber(r))instanceof Error)return r;for(var n,i=[["a.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["a.u. of charge","e",null,"electric_charge",!1,!1,1.60217653141414e-19],["a.u. of energy","Eh",null,"energy",!1,!1,4.35974417757576e-18],["a.u. of length","a?",null,"length",!1,!1,5.29177210818182e-11],["a.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["a.u. of time","?/Eh",null,"time",!1,!1,2.41888432650516e-17],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,1.49597870691667e-11],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,8.46786664623715e-47],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,1.66053886282828e-27],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["n.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,1.28808866778687e-21],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,8.95054210748189e31],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],o={Yi:["yobi",80,1.2089258196146292e24,"Yi","yotta"],Zi:["zebi",70,0x400000000000000000,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},s={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},l=null,f=null,c=t,p=e,m=1,d=1,h=0;i.length>h;h++)n=null===i[h][2]?[]:i[h][2],i[h][1]!==c&&0>n.indexOf(c)||(l=i[h]),i[h][1]!==p&&0>n.indexOf(p)||(f=i[h]);if(null===l){var E=o[t.substring(0,2)],g=s[t.substring(0,1)];"da"===t.substring(0,2)&&(g=["dekao",10,"da"]),E?(m=E[2],c=t.substring(2)):g&&(m=g[1],c=t.substring(g[2].length));for(var v=0;i.length>v;v++)n=null===i[v][2]?[]:i[v][2],i[v][1]!==c&&0>n.indexOf(c)||(l=i[v])}if(null===f){var N=o[e.substring(0,2)],b=s[e.substring(0,1)];"da"===e.substring(0,2)&&(b=["dekao",10,"da"]),N?(d=N[2],p=e.substring(2)):b&&(d=b[1],p=e.substring(b[2].length));for(var y=0;i.length>y;y++)n=null===i[y][2]?[]:i[y][2],i[y][1]!==p&&0>n.indexOf(p)||(f=i[y])}return null===l||null===f?u.na:l[3]!==f[3]?u.na:r*l[6]*m/(f[6]*d)},t.DEC2BIN=function(r,t){if((r=a.parseNumber(r))instanceof Error)return r;if(!/^-?[0-9]{1,3}$/.test(r)||-512>r||r>511)return u.num;if(0>r)return"1"+o.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var e=parseInt(r,10).toString(2);return void 0===t?e:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),e.length>t?u.num:o.REPT("0",t-e.length)+e)},t.DEC2HEX=function(r,t){if((r=a.parseNumber(r))instanceof Error)return r;if(!/^-?[0-9]{1,12}$/.test(r)||-549755813888>r||r>549755813887)return u.num;if(0>r)return(1099511627776+r).toString(16);var e=parseInt(r,10).toString(16);return void 0===t?e:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),e.length>t?u.num:o.REPT("0",t-e.length)+e)},t.DEC2OCT=function(r,t){if((r=a.parseNumber(r))instanceof Error)return r;if(!/^-?[0-9]{1,9}$/.test(r)||-536870912>r||r>536870911)return u.num;if(0>r)return(1073741824+r).toString(8);var e=parseInt(r,10).toString(8);return void 0===t?e:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),e.length>t?u.num:o.REPT("0",t-e.length)+e)},t.DELTA=function(r,t){return t=t===undefined?0:t,r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:r===t?1:0},t.ERF=function(r,t){return t=t===undefined?0:t,r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?u.value:i.erf(r)},t.ERF.PRECISE=function(){throw Error("ERF.PRECISE is not implemented")},t.ERFC=function(r){return isNaN(r)?u.value:i.erfc(r)},t.ERFC.PRECISE=function(){throw Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(r,t){return t=t||0,r=a.parseNumber(r),a.anyIsError(t,r)?r:t>r?0:1},t.HEX2BIN=function(r,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return u.num;var e=10===r.length&&"f"===r.substring(0,1).toLowerCase(),n=e?parseInt(r,16)-1099511627776:parseInt(r,16);if(-512>n||n>511)return u.num;if(e)return"1"+o.REPT("0",9-(512+n).toString(2).length)+(512+n).toString(2);var i=n.toString(2);return t===undefined?i:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),i.length>t?u.num:o.REPT("0",t-i.length)+i)},t.HEX2DEC=function(r){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return u.num;var t=parseInt(r,16);return 549755813888>t?t:t-1099511627776},t.HEX2OCT=function(r,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(r))return u.num;var e=parseInt(r,16);if(e>536870911&&0xffe0000000>e)return u.num;if(e>=0xffe0000000)return(e-0xffc0000000).toString(8);var n=e.toString(8);return t===undefined?n:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),n.length>t?u.num:o.REPT("0",t-n.length)+n)},t.IMABS=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?u.value:Math.sqrt(Math.pow(e,2)+Math.pow(n,2))},t.IMAGINARY=function(r){if(r===undefined||r===!0||r===!1)return u.value;if(0===r||"0"===r)return 0;if(["i","j"].indexOf(r)>=0)return 1;r=r.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j");var t=r.indexOf("+"),e=r.indexOf("-");0===t&&(t=r.indexOf("+",1)),0===e&&(e=r.indexOf("-",1));var n=r.substring(r.length-1,r.length),i="i"===n||"j"===n;return 0>t&&0>e?i?isNaN(r.substring(0,r.length-1))?u.num:r.substring(0,r.length-1):isNaN(r)?u.num:0:i?0>t?isNaN(r.substring(0,e))||isNaN(r.substring(e+1,r.length-1))?u.num:-+r.substring(e+1,r.length-1):isNaN(r.substring(0,t))||isNaN(r.substring(t+1,r.length-1))?u.num:+r.substring(t+1,r.length-1):u.num},t.IMARGUMENT=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);return a.anyIsError(e,n)?u.value:0===e&&0===n?u.div0:0===e&&n>0?Math.PI/2:0===e&&0>n?-Math.PI/2:0===n&&e>0?0:0===n&&0>e?-Math.PI:e>0?Math.atan(n/e):0>e&&n>=0?Math.atan(n/e)+Math.PI:Math.atan(n/e)-Math.PI},t.IMCONJUGATE=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",0!==n?t.COMPLEX(e,-n,i):r},t.IMCOS=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(e)*(Math.exp(n)+Math.exp(-n))/2,-Math.sin(e)*(Math.exp(n)-Math.exp(-n))/2,i)},t.IMCOSH=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(n)*(Math.exp(e)+Math.exp(-e))/2,Math.sin(n)*(Math.exp(e)-Math.exp(-e))/2,i)},t.IMCOT=function(r){return a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.value:t.IMDIV(t.IMCOS(r),t.IMSIN(r))},t.IMDIV=function(r,e){var n=t.IMREAL(r),i=t.IMAGINARY(r),o=t.IMREAL(e),s=t.IMAGINARY(e);if(a.anyIsError(n,i,o,s))return u.value;var l=r.substring(r.length-1),f=e.substring(e.length-1),c="i";if("j"===l?c="j":"j"===f&&(c="j"),0===o&&0===s)return u.num;var p=o*o+s*s;return t.COMPLEX((n*o+i*s)/p,(i*o-n*s)/p,c)},t.IMEXP=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);i="i"===i||"j"===i?i:"i";var o=Math.exp(e);return t.COMPLEX(o*Math.cos(n),o*Math.sin(n),i)},t.IMLN=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n)),Math.atan(n/e),i)},t.IMLOG10=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n))/Math.log(10),Math.atan(n/e)/Math.log(10),i)},t.IMLOG2=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(e*e+n*n))/Math.log(2),Math.atan(n/e)/Math.log(2),i)},t.IMPOWER=function(r,e){if(e=a.parseNumber(e),a.anyIsError(e,t.IMREAL(r),t.IMAGINARY(r)))return u.value;var n=r.substring(r.length-1);n="i"===n||"j"===n?n:"i";var i=Math.pow(t.IMABS(r),e),o=t.IMARGUMENT(r);return t.COMPLEX(i*Math.cos(e*o),i*Math.sin(e*o),n)},t.IMPRODUCT=function(){var r=arguments[0];if(!arguments.length)return u.value;for(var e=1;arguments.length>e;e++){var n=t.IMREAL(r),i=t.IMAGINARY(r),o=t.IMREAL(arguments[e]),s=t.IMAGINARY(arguments[e]);if(a.anyIsError(n,i,o,s))return u.value;r=t.COMPLEX(n*o-i*s,n*s+i*o)}return r},t.IMREAL=function(r){if(r===undefined||r===!0||r===!1)return u.value;if(0===r||"0"===r)return 0;if(["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(r)>=0)return 0;var t=r.indexOf("+"),e=r.indexOf("-");0===t&&(t=r.indexOf("+",1)),0===e&&(e=r.indexOf("-",1));var n=r.substring(r.length-1,r.length),i="i"===n||"j"===n;return 0>t&&0>e?i?isNaN(r.substring(0,r.length-1))?u.num:0:isNaN(r)?u.num:r:i?0>t?isNaN(r.substring(0,e))||isNaN(r.substring(e+1,r.length-1))?u.num:+r.substring(0,e):isNaN(r.substring(0,t))||isNaN(r.substring(t+1,r.length-1))?u.num:+r.substring(0,t):u.num},t.IMSEC=function(r){return r===!0||r===!1?u.value:a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.value:t.IMDIV("1",t.IMCOS(r))},t.IMSECH=function(r){return a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.value:t.IMDIV("1",t.IMCOSH(r))},t.IMSIN=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.sin(e)*(Math.exp(n)+Math.exp(-n))/2,Math.cos(e)*(Math.exp(n)-Math.exp(-n))/2,i)},t.IMSINH=function(r){var e=t.IMREAL(r),n=t.IMAGINARY(r);if(a.anyIsError(e,n))return u.value;var i=r.substring(r.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(n)*(Math.exp(e)-Math.exp(-e))/2,Math.sin(n)*(Math.exp(e)+Math.exp(-e))/2,i)},t.IMSQRT=function(r){if(a.anyIsError(t.IMREAL(r),t.IMAGINARY(r)))return u.value;var e=r.substring(r.length-1);e="i"===e||"j"===e?e:"i";var n=Math.sqrt(t.IMABS(r)),i=t.IMARGUMENT(r);return t.COMPLEX(n*Math.cos(i/2),n*Math.sin(i/2),e)},t.IMCSC=function(r){return r===!0||r===!1?u.value:a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.num:t.IMDIV("1",t.IMSIN(r))},t.IMCSCH=function(r){return r===!0||r===!1?u.value:a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.num:t.IMDIV("1",t.IMSINH(r))},t.IMSUB=function(r,t){var e=this.IMREAL(r),n=this.IMAGINARY(r),i=this.IMREAL(t),o=this.IMAGINARY(t);if(a.anyIsError(e,n,i,o))return u.value;var s=r.substring(r.length-1),l=t.substring(t.length-1),f="i";return"j"===s?f="j":"j"===l&&(f="j"),this.COMPLEX(e-i,n-o,f)},t.IMSUM=function(){if(!arguments.length)return u.value;for(var r=a.flatten(arguments),t=r[0],e=1;r.length>e;e++){var n=this.IMREAL(t),i=this.IMAGINARY(t),o=this.IMREAL(r[e]),s=this.IMAGINARY(r[e]);if(a.anyIsError(n,i,o,s))return u.value;t=this.COMPLEX(n+o,i+s)}return t},t.IMTAN=function(r){return r===!0||r===!1?u.value:a.anyIsError(t.IMREAL(r),t.IMAGINARY(r))?u.value:this.IMDIV(this.IMSIN(r),this.IMCOS(r))},t.OCT2BIN=function(r,t){if(!/^[0-7]{1,10}$/.test(r))return u.num;var e=10===r.length&&"7"===r.substring(0,1),n=e?parseInt(r,8)-1073741824:parseInt(r,8);if(-512>n||n>511)return u.num;if(e)return"1"+o.REPT("0",9-(512+n).toString(2).length)+(512+n).toString(2);var i=n.toString(2);return void 0===t?i:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),i.length>t?u.num:o.REPT("0",t-i.length)+i)},t.OCT2DEC=function(r){if(!/^[0-7]{1,10}$/.test(r))return u.num;var t=parseInt(r,8);return 536870912>t?t:t-1073741824},t.OCT2HEX=function(r,t){if(!/^[0-7]{1,10}$/.test(r))return u.num;var e=parseInt(r,8);if(e>=536870912)return"ff"+(e+3221225472).toString(16);var n=e.toString(16);return t===undefined?n:isNaN(t)?u.value:0>t?u.num:(t=Math.floor(t),n.length>t?u.num:o.REPT("0",t-n.length)+n)}},function(r,t,e){var n=e(2),u=e(14),i=e(0);t.UNIQUE=function(){for(var r=[],t=0;arguments.length>t;++t){for(var e=!1,n=arguments[t],u=0;r.length>u&&!(e=r[u]===n);++u);e||r.push(n)}return r},t.FLATTEN=n.flatten,t.ARGS2ARRAY=function(){return Array.prototype.slice.call(arguments,0)},t.REFERENCE=function(r,t){if(!arguments.length)return i.error;try{for(var e=t.split("."),n=r,u=0;e.length>u;++u){var o=e[u];if("]"===o[o.length-1]){var a=o.indexOf("["),s=o.substring(a+1,o.length-1);n=n[o.substring(0,a)][s]}else n=n[o]}return n}catch(i){}},t.JOIN=function(r,t){return r.join(t)},t.NUMBERS=function(){return n.flatten(arguments).filter(function(r){return"number"==typeof r})},t.NUMERAL=function(r,t){return u(r).format(t)}},function(r,t){this.j$=this.jStat=function(r,t){function e(t,e){var n=t>e?t:e;return r.pow(10,17-~~(r.log(n>0?n:-n)*r.LOG10E))}function n(r){return"[object Function]"===m.call(r)}function u(r){return"number"==typeof r&&r===r}function o(r){return c.apply([],r)}function a(){return new a._init(arguments)}function s(){return 0}function l(){return 1}function f(r,t){return r===t?1:0}var c=Array.prototype.concat,p=Array.prototype.slice,m=Object.prototype.toString,d=Array.isArray||function(r){return"[object Array]"===m.call(r)};a.fn=a.prototype,a._init=function(r){var t;if(d(r[0]))if(d(r[0][0])){n(r[1])&&(r[0]=a.map(r[0],r[1]));for(var t=0;r[0].length>t;t++)this[t]=r[0][t];this.length=r[0].length}else this[0]=n(r[1])?a.map(r[0],r[1]):r[0],this.length=1;else if(u(r[0]))this[0]=a.seq.apply(null,r),this.length=1;else{if(r[0]instanceof a)return a(r[0].toArray());this[0]=[],this.length=1}return this},a._init.prototype=a.prototype,a._init.constructor=a,a.utils={calcRdx:e,isArray:d,isFunction:n,isNumber:u,toVector:o},a.extend=function(r){var t,e;if(1===arguments.length){for(e in r)a[e]=r[e];return this}for(var t=1;arguments.length>t;t++)for(e in arguments[t])r[e]=arguments[t][e];return r},a.rows=function(r){return r.length||1},a.cols=function(r){return r[0].length||1},a.dimensions=function(r){return{rows:a.rows(r),cols:a.cols(r)}},a.row=function(r,t){return d(t)?t.map(function(t){return a.row(r,t)}):r[t]},a.rowa=function(r,t){return a.row(r,t)},a.col=function(r,t){if(d(t)){var e=a.arange(r.length).map(function(r){return Array(t.length)});return t.forEach(function(t,n){a.arange(r.length).forEach(function(u){e[u][n]=r[u][t]})}),e}for(var n=Array(r.length),u=0;r.length>u;u++)n[u]=[r[u][t]];return n},a.cola=function(r,t){return a.col(r,t).map(function(r){return r[0]})},a.diag=function(r){for(var t=a.rows(r),e=Array(t),n=0;t>n;n++)e[n]=[r[n][n]];return e},a.antidiag=function(r){for(var t=a.rows(r)-1,e=Array(t),n=0;t>=0;t--,n++)e[n]=[r[n][t]];return e},a.transpose=function(r){var t,e,n,u,i,o=[];d(r[0])||(r=[r]),e=r.length,n=r[0].length;for(var i=0;n>i;i++){for(t=Array(e),u=0;e>u;u++)t[u]=r[u][i];o.push(t)}return 1===o.length?o[0]:o},a.map=function(r,t,e){var n,u,i,o,a;for(d(r[0])||(r=[r]),u=r.length,i=r[0].length,o=e?r:Array(u),n=0;u>n;n++)for(o[n]||(o[n]=Array(i)),a=0;i>a;a++)o[n][a]=t(r[n][a],n,a);return 1===o.length?o[0]:o},a.cumreduce=function(r,t,e){var n,u,i,o,a;for(d(r[0])||(r=[r]),u=r.length,i=r[0].length,o=e?r:Array(u),n=0;u>n;n++)for(o[n]||(o[n]=Array(i)),i>0&&(o[n][0]=r[n][0]),a=1;i>a;a++)o[n][a]=t(o[n][a-1],r[n][a]);return 1===o.length?o[0]:o},a.alter=function(r,t){return a.map(r,t,!0)},a.create=function(r,t,e){var u,i,o=Array(r);n(t)&&(e=t,t=r);for(var u=0;r>u;u++)for(o[u]=Array(t),i=0;t>i;i++)o[u][i]=e(u,i);return o},a.zeros=function(r,t){return u(t)||(t=r),a.create(r,t,s)},a.ones=function(r,t){return u(t)||(t=r),a.create(r,t,l)},a.rand=function(t,e){return u(e)||(e=t),a.create(t,e,r.random)},a.identity=function(r,t){return u(t)||(t=r),a.create(r,t,f)},a.symmetric=function(r){var t,e,n=r.length;if(r.length!==r[0].length)return!1;for(t=0;n>t;t++)for(e=0;n>e;e++)if(r[e][t]!==r[t][e])return!1;return!0},a.clear=function(r){return a.alter(r,s)},a.seq=function(r,t,u,i){n(i)||(i=!1);var o,a=[],s=e(r,t),l=(t*s-r*s)/((u-1)*s),f=r;for(o=0;t>=f;o++,f=(r*s+l*s*o)/s)a.push(i?i(f,o):f);return a},a.arange=function(r,e,n){var u=[];if(n=n||1,e===t&&(e=r,r=0),r===e||0===n)return[];if(e>r&&0>n)return[];if(r>e&&n>0)return[];if(n>0)for(i=r;ie;i+=n)u.push(i);return u},a.slice=function(){function r(r,e,n,u){var i,o=[],s=r.length;if(e===t&&n===t&&u===t)return a.copy(r);if(e=e||0,n=n||r.length,e=0>e?s+e:e,n=0>n?s+n:n,u=u||1,e===n||0===u)return[];if(n>e&&0>u)return[];if(e>n&&u>0)return[];if(u>0)for(i=e;n>i;i+=u)o.push(r[i]);else for(i=e;i>n;i+=u)o.push(r[i]);return o}function e(t,e){if(e=e||{},u(e.row)){if(u(e.col))return t[e.row][e.col];var n=a.rowa(t,e.row),i=e.col||{};return r(n,i.start,i.end,i.step)}if(u(e.col)){var o=a.cola(t,e.col),s=e.row||{};return r(o,s.start,s.end,s.step)}var s=e.row||{},i=e.col||{};return r(t,s.start,s.end,s.step).map(function(t){return r(t,i.start,i.end,i.step)})}return e}(),a.sliceAssign=function(e,n,i){if(u(n.row)){if(u(n.col))return e[n.row][n.col]=i;n.col=n.col||{},n.col.start=n.col.start||0,n.col.end=n.col.end||e[0].length,n.col.step=n.col.step||1;var o=a.arange(n.col.start,r.min(e.length,n.col.end),n.col.step),s=n.row;return o.forEach(function(r,t){e[s][r]=i[t]}),e}if(u(n.col)){n.row=n.row||{},n.row.start=n.row.start||0,n.row.end=n.row.end||e.length,n.row.step=n.row.step||1;var l=a.arange(n.row.start,r.min(e[0].length,n.row.end),n.row.step),f=n.col;return l.forEach(function(r,t){e[r][f]=i[t]}),e}i[0].length===t&&(i=[i]),n.row.start=n.row.start||0,n.row.end=n.row.end||e.length,n.row.step=n.row.step||1,n.col.start=n.col.start||0,n.col.end=n.col.end||e[0].length,n.col.step=n.col.step||1;var l=a.arange(n.row.start,r.min(e.length,n.row.end),n.row.step),o=a.arange(n.col.start,r.min(e[0].length,n.col.end),n.col.step);return l.forEach(function(r,t){o.forEach(function(n,u){e[r][n]=i[t][u]})}),e},a.diagonal=function(r){var t=a.zeros(r.length,r.length);return r.forEach(function(r,e){t[e][e]=r}),t},a.copy=function(r){return r.map(function(r){return u(r)?r:r.map(function(r){return r})})};var h=a.prototype;return h.length=0,h.push=Array.prototype.push,h.sort=Array.prototype.sort,h.splice=Array.prototype.splice,h.slice=Array.prototype.slice,h.toArray=function(){return this.length>1?p.call(this):p.call(this)[0]},h.map=function(r,t){return a(a.map(this,r,t))},h.cumreduce=function(r,t){return a(a.cumreduce(this,r,t))},h.alter=function(r){return a.alter(this,r),this},function(r){for(var t=0;r.length>t;t++)!function(r){h[r]=function(t){var e,n=this;return t?(setTimeout(function(){t.call(n,h[r].call(n))}),this):(e=a[r](this),d(e)?a(e):e)}}(r[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(r){for(var t=0;r.length>t;t++)!function(r){h[r]=function(t,e){var n=this;return e?(setTimeout(function(){e.call(n,h[r].call(n,t))}),this):a(a[r](this,t))}}(r[t])}("row col".split(" ")),function(r){for(var t=0;r.length>t;t++)!function(r){h[r]=Function("return jStat(jStat."+r+".apply(null, arguments));")}(r[t])}("create zeros ones rand identity".split(" ")),a}(Math),function(r,t){function e(r,t){return r-t}function n(r,e,n){return t.max(e,t.min(r,n))}var u=r.utils.isFunction;r.sum=function o(r){for(var o=0,t=r.length;--t>=0;)o+=r[t];return o},r.sumsqrd=function(r){for(var t=0,e=r.length;--e>=0;)t+=r[e]*r[e];return t},r.sumsqerr=function(t){for(var e,n=r.mean(t),u=0,i=t.length;--i>=0;)e=t[i]-n,u+=e*e;return u},r.sumrow=function(r){for(var t=0,e=r.length;--e>=0;)t+=r[e];return t},r.product=function(r){for(var t=1,e=r.length;--e>=0;)t*=r[e];return t},r.min=function(r){for(var t=r[0],e=0;++er[e]&&(t=r[e]);return t},r.max=function(r){for(var t=r[0],e=0;++et&&(t=r[e]);return t},r.unique=function(r){for(var t={},e=[],n=0;r.length>n;n++)t[r[n]]||(t[r[n]]=!0,e.push(r[n]));return e},r.mean=function(t){return r.sum(t)/t.length},r.meansqerr=function(t){return r.sumsqerr(t)/t.length},r.geomean=function(e){return t.pow(r.product(e),1/e.length)},r.median=function(r){var t=r.length,n=r.slice().sort(e);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},r.cumsum=function(t){return r.cumreduce(t,function(r,t){return r+t})},r.cumprod=function(t){return r.cumreduce(t,function(r,t){return r*t})},r.diff=function(r){for(var t,e=[],n=r.length,t=1;n>t;t++)e.push(r[t]-r[t-1]);return e},r.rank=function(r){for(var t=r.length,n=r.slice().sort(e),u=Array(t),i=0;t>i;i++){var o=n.indexOf(r[i]),a=n.lastIndexOf(r[i]);if(o===a)var s=o;else var s=(o+a)/2;u[i]=s+1}return u},r.mode=function(r){for(var t,n=r.length,u=r.slice().sort(e),i=1,o=0,a=0,s=[],t=0;n>t;t++)u[t]===u[t+1]?i++:(i>o?(s=[u[t]],o=i,a=0):i===o&&(s.push(u[t]),a++),i=1);return 0===a?s[0]:s},r.range=function(t){return r.max(t)-r.min(t)},r.variance=function(t,e){return r.sumsqerr(t)/(t.length-(e?1:0))},r.deviation=function(t){for(var e=r.mean(t),n=t.length,u=Array(n),i=0;n>i;i++)u[i]=t[i]-e;return u},r.stdev=function(e,n){return t.sqrt(r.variance(e,n))},r.meandev=function(e){for(var n,u=0,i=r.mean(e),n=e.length-1;n>=0;n--)u+=t.abs(e[n]-i);return u/e.length},r.meddev=function(e){for(var n,u=0,i=r.median(e),n=e.length-1;n>=0;n--)u+=t.abs(e[n]-i);return u/e.length},r.coeffvar=function(t){return r.stdev(t)/r.mean(t)},r.quartiles=function(r){var n=r.length,u=r.slice().sort(e);return[u[t.round(n/4)-1],u[t.round(n/2)-1],u[t.round(3*n/4)-1]]},r.quantiles=function(r,u,i,o){var a,s,l,f,c,p,m=r.slice().sort(e),d=[u.length],h=r.length;void 0===i&&(i=3/8),void 0===o&&(o=3/8);for(var a=0;u.length>a;a++)s=u[a],l=i+s*(1-i-o),f=h*s+l,c=t.floor(n(f,1,h-1)),p=n(f-c,0,1),d[a]=(1-p)*m[c-1]+p*m[c];return d},r.percentile=function(r,t){var n=r.slice().sort(e),u=t*(n.length-1),i=parseInt(u),o=u-i;return n.length>i+1?n[i]*(1-o)+n[i+1]*o:n[i]},r.percentileOfScore=function(r,t,e){var n,u,i=0,o=r.length,a=!1;"strict"===e&&(a=!0);for(var u=0;o>u;u++)n=r[u],(a&&t>n||!a&&t>=n)&&i++;return i/o},r.histogram=function(e,n){for(var u,i=r.min(e),o=n||4,a=(r.max(e)-i)/o,s=e.length,n=[],u=0;o>u;u++)n[u]=0;for(var u=0;s>u;u++)n[t.min(t.floor((e[u]-i)/a),o-1)]+=1;return n},r.covariance=function(t,e){for(var n,u=r.mean(t),i=r.mean(e),o=t.length,a=Array(o),n=0;o>n;n++)a[n]=(t[n]-u)*(e[n]-i);return r.sum(a)/(o-1)},r.corrcoeff=function(t,e){return r.covariance(t,e)/r.stdev(t,1)/r.stdev(e,1)},r.spearmancoeff=function(e,n){e=r.rank(e),n=r.rank(n);var u=r.deviation(e),i=r.deviation(n);return r.sum(u.map(function(r,t){return r*i[t]}))/t.sqrt(r.sum(u.map(function(r){return t.pow(r,2)}))*r.sum(i.map(function(r){return t.pow(r,2)})))},r.stanMoment=function(e,n){for(var u=r.mean(e),i=r.stdev(e),o=e.length,a=0,s=0;o>s;s++)a+=t.pow((e[s]-u)/i,n);return a/e.length},r.skewness=function(t){return r.stanMoment(t,3)},r.kurtosis=function(t){return r.stanMoment(t,4)-3};var i=r.prototype;!function(t){for(var e=0;t.length>e;e++)!function(t){i[t]=function(e,n){var o=[],a=0,s=this;if(u(e)&&(n=e,e=!1),n)return setTimeout(function(){n.call(s,i[t].call(s,e))}),this;if(this.length>1){for(s=e===!0?this:this.transpose();s.length>a;a++)o[a]=r[t](s[a]);return o}return r[t](this[0],e)}}(t[e])}("cumsum cumprod".split(" ")),function(t){for(var e=0;t.length>e;e++)!function(t){i[t]=function(e,n){var o=[],a=0,s=this;if(u(e)&&(n=e,e=!1),n)return setTimeout(function(){n.call(s,i[t].call(s,e))}),this;if(this.length>1){for("sumrow"!==t&&(s=e===!0?this:this.transpose());s.length>a;a++)o[a]=r[t](s[a]);return e===!0?r[t](r.utils.toVector(o)):o}return r[t](this[0],e)}}(t[e])}("sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" ")),function(t){for(var e=0;t.length>e;e++)!function(t){i[t]=function(){var e=[],n=0,o=this,a=Array.prototype.slice.call(arguments);if(u(a[a.length-1])){var s=a[a.length-1],l=a.slice(0,a.length-1);return setTimeout(function(){s.call(o,i[t].apply(o,l))}),this}var s=undefined,f=function(e){return r[t].apply(o,[e].concat(a))};if(this.length>1){for(o=o.transpose();o.length>n;n++)e[n]=f(o[n]);return e}return f(this[0])}}(t[e])}("quantiles percentileOfScore".split(" "))}(this.jStat,Math),function(r,t){r.gammaln=function(r){var e,n,u,i=0,o=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],a=1.000000000190015;for(u=(n=e=r)+5.5,u-=(e+.5)*t.log(u);6>i;i++)a+=o[i]/++n;return t.log(2.5066282746310007*a/e)-u},r.gammafn=function(r){var e,n,u,i,o=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],a=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],s=!1,l=0,f=0,c=0,p=r;if(0>=p){if(!(i=p%1+3.6e-16))return Infinity;s=(1&p?-1:1)*t.PI/t.sin(t.PI*i),p=1-p}u=p,n=1>p?p++:(p-=l=(0|p)-1)-1;for(var e=0;8>e;++e)c=(c+o[e])*n,f=f*n+a[e];if(i=c/f+1,p>u)i/=u;else if(u>p)for(var e=0;l>e;++e)i*=p,p++;return s&&(i=s/i),i},r.gammap=function(t,e){return r.lowRegGamma(t,e)*r.gammafn(t)},r.lowRegGamma=function(e,n){var u,i=r.gammaln(e),o=e,a=1/e,s=a,l=n+1-e,f=1/1e-30,c=1/l,p=c,m=1,d=-~(8.5*t.log(1>e?1/e:e)+.4*e+17);if(0>n||0>=e)return NaN;if(e+1>n){for(;d>=m;m++)a+=s*=n/++o;return a*t.exp(-n+e*t.log(n)-i)}for(;d>=m;m++)u=-m*(m-e),l+=2,c=u*c+l,f=l+u/f,c=1/c,p*=c*f;return 1-p*t.exp(-n+e*t.log(n)-i)},r.factorialln=function(t){return 0>t?NaN:r.gammaln(t+1)},r.factorial=function(t){return 0>t?NaN:r.gammafn(t+1)},r.combination=function(e,n){return e>170||n>170?t.exp(r.combinationln(e,n)):r.factorial(e)/r.factorial(n)/r.factorial(e-n)},r.combinationln=function(t,e){return r.factorialln(t)-r.factorialln(e)-r.factorialln(t-e)},r.permutation=function(t,e){return r.factorial(t)/r.factorial(t-e)},r.betafn=function(e,n){return e>0&&n>0?e+n>170?t.exp(r.betaln(e,n)):r.gammafn(e)*r.gammafn(n)/r.gammafn(e+n):undefined},r.betaln=function(t,e){return r.gammaln(t)+r.gammaln(e)-r.gammaln(t+e)},r.betacf=function(r,e,n){var u,i,o,a,s=1e-30,l=1,f=e+n,c=e+1,p=e-1,m=1,d=1-f*r/c;for(t.abs(d)=l&&(u=2*l,i=l*(n-l)*r/((p+u)*(e+u)),d=1+i*d,t.abs(d)=1)return t.max(100,n+100*t.sqrt(n));if(0>=e)return 0;for(n>1?(l=t.log(p),f=t.exp(p*(l-1)-d),s=.5>e?e:1-e,o=t.sqrt(-2*t.log(s)),u=(2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o,.5>e&&(u=-u),u=t.max(.001,n*t.pow(1-1/(9*n)-u/(3*t.sqrt(n)),3))):(o=1-n*(.253+.12*n),u=o>e?t.pow(e/o,1/n):1-t.log(1-(e-o)/(1-o)));12>c;c++){if(0>=u)return 0;if(i=r.lowRegGamma(n,u)-e,o=n>1?f*t.exp(-(u-p)+p*(t.log(u)-l)):t.exp(-u+p*t.log(u)-d),a=i/o,u-=o=a/(1-.5*t.min(1,a*((n-1)/u-1))),u>0||(u=.5*(u+o)),t.abs(o)r&&(r=-r,s=!0),e=2/(2+r),n=4*e-2;a>0;a--)u=l,l=n*l-f+o[a],f=u;return i=e*t.exp(-r*r+.5*(o[0]+n*l)-f),s?i-1:1-i},r.erfc=function(t){return 1-r.erf(t)},r.erfcinv=function(e){var n,u,i,o,a=0;if(e>=2)return-100;if(0>=e)return 100;for(o=1>e?e:2-e,i=t.sqrt(-2*t.log(o/2)),n=-.70711*((2.30753+.27061*i)/(1+i*(.99229+.04481*i))-i);2>a;a++)u=r.erfc(n)-o,n+=u/(1.1283791670955126*t.exp(-n*n)-n*u);return 1>e?n:-n},r.ibetainv=function(e,n,u){var i,o,a,s,l,f,c,p,m,d,h,E=1e-8,g=n-1,v=u-1,N=0;if(0>=e)return 0;if(e>=1)return 1;for(1>n||1>u?(i=t.log(n/(n+u)),o=t.log(u/(n+u)),s=t.exp(n*i)/n,l=t.exp(u*o)/u,d=s+l,c=s/d>e?t.pow(n*d*e,1/n):1-t.pow(u*d*(1-e),1/u)):(a=.5>e?e:1-e,s=t.sqrt(-2*t.log(a)),c=(2.30753+.27061*s)/(1+s*(.99229+.04481*s))-s,.5>e&&(c=-c),p=(c*c-3)/6,m=2/(1/(2*n-1)+1/(2*u-1)),d=c*t.sqrt(p+m)/m-(1/(2*u-1)-1/(2*n-1))*(p+5/6-2/(3*m)),c=n/(n+u*t.exp(2*d))),h=-r.gammaln(n)-r.gammaln(u)+r.gammaln(n+u);10>N;N++){if(0===c||1===c)return c;if(f=r.ibeta(c,n,u)-e,s=t.exp(g*t.log(c)+v*t.log(1-c)+h),l=f/s,c-=s=l/(1-.5*t.min(1,l*(g/c-v/(1-c)))),c>0||(c=.5*(c+s)),1>c||(c=.5*(c+s+1)),t.abs(s)0)break}return c},r.ibeta=function(e,n,u){var i=0===e||1===e?0:t.exp(r.gammaln(n+u)-r.gammaln(n)-r.gammaln(u)+n*t.log(e)+u*t.log(1-e));return e>=0&&1>=e&&((n+1)/(n+u+2)>e?i*r.betacf(e,n,u)/n:1-i*r.betacf(1-e,u,n)/u)},r.randn=function(e,n){var u,i,o,a,s;if(n||(n=e),e)return r.create(e,n,function(){return r.randn()});do{u=t.random(),i=1.7156*(t.random()-.5),o=u-.449871,a=t.abs(i)+.386595,s=o*o+a*(.196*a-.25472*o)}while(s>.27597&&(s>.27846||i*i>-4*t.log(u)*u*u));return i/u},r.randg=function(e,n,u){var i,o,a,s,l,f,c=e;if(u||(u=n),e||(e=1),n)return f=r.zeros(n,u),f.alter(function(){return r.randg(e)}),f;1>e&&(e+=1),i=e-1/3,o=1/t.sqrt(9*i);do{do{l=r.randn(),s=1+o*l}while(0>=s);s*=s*s,a=t.random()}while(a>1-.331*t.pow(l,4)&&t.log(a)>.5*l*l+i*(1-s+t.log(s)));if(e==c)return i*s;do{a=t.random()}while(0===a);return t.pow(a,1/c)*i*s},function(t){for(var e=0;t.length>e;e++)!function(t){r.fn[t]=function(){return r(r.map(this,function(e){return r[t](e)}))}}(t[e])}("gammaln gammafn factorial factorialln".split(" ")),function(t){for(var e=0;t.length>e;e++)!function(t){r.fn[t]=function(){return r(r[t].apply(null,arguments))}}(t[e])}("randn".split(" "))}(this.jStat,Math),function(r,t){function e(r){return r/t.abs(r)}!function(t){for(var e=0;t.length>e;e++)!function(t){r[t]=function(r,t,e){return this instanceof arguments.callee?(this._a=r,this._b=t,this._c=e,this):new arguments.callee(r,t,e)},r.fn[t]=function(e,n,u){var i=r[t](e,n,u);return i.data=this,i},r[t].prototype.sample=function(e){var n=this._a,u=this._b,i=this._c;return e?r.alter(e,function(){return r[t].sample(n,u,i)}):r[t].sample(n,u,i)},function(e){for(var n=0;e.length>n;n++)!function(e){r[t].prototype[e]=function(n){var u=this._a,i=this._b,o=this._c;return n||0===n||(n=this.data),"number"!=typeof n?r.fn.map.call(n,function(n){return r[t][e](n,u,i,o)}):r[t][e](n,u,i,o)}}(e[n])}("pdf cdf inv".split(" ")),function(e){for(var n=0;e.length>n;n++)!function(e){r[t].prototype[e]=function(){return r[t][e](this._a,this._b,this._c)}}(e[n])}("mean median mode variance".split(" "))}(t[e])}("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular".split(" ")),r.extend(r.beta,{pdf:function(e,n,u){return e>1||0>e?0:1==n&&1==u?1:512>n&&512>u?t.pow(e,n-1)*t.pow(1-e,u-1)/r.betafn(n,u):t.exp((n-1)*t.log(e)+(u-1)*t.log(1-e)-r.betaln(n,u))},cdf:function(t,e,n){return t>1||0>t?1*(t>1):r.ibeta(t,e,n)},inv:function(t,e,n){return r.ibetainv(t,e,n)},mean:function(r,t){return r/(r+t)},median:function(t,e){return r.ibetainv(.5,t,e)},mode:function(r,t){return(r-1)/(r+t-2)},sample:function(t,e){var n=r.randg(t);return n/(n+r.randg(e))},variance:function(r,e){return r*e/(t.pow(r+e,2)*(r+e+1))}}),r.extend(r.centralF,{pdf:function(e,n,u){var i,o;return 0>e?0:n>2?(i=n*e/(u+e*n),o=u/(u+e*n),n*o/2*r.binomial.pdf((n-2)/2,(n+u-2)/2,i)):0===e&&2>n?Infinity:0===e&&2===n?1:t.sqrt(t.pow(n*e,n)*t.pow(u,u)/t.pow(n*e+u,n+u))/(e*r.betafn(n/2,u/2))},cdf:function(t,e,n){return 0>t?0:r.ibeta(e*t/(e*t+n),e/2,n/2)},inv:function(t,e,n){return n/(e*(1/r.ibetainv(t,e/2,n/2)-1))},mean:function(r,t){return t>2?t/(t-2):undefined},mode:function(r,t){return r>2?t*(r-2)/(r*(t+2)):undefined},sample:function(t,e){return 2*r.randg(t/2)/t/(2*r.randg(e/2)/e)},variance:function(r,t){return t>4?2*t*t*(r+t-2)/(r*(t-2)*(t-2)*(t-4)):undefined}}),r.extend(r.cauchy,{pdf:function(r,e,n){return 0>n?0:n/(t.pow(r-e,2)+t.pow(n,2))/t.PI},cdf:function(r,e,n){return t.atan((r-e)/n)/t.PI+.5},inv:function(r,e,n){return e+n*t.tan(t.PI*(r-.5))},median:function(r,t){return r},mode:function(r,t){return r},sample:function(e,n){return r.randn()*t.sqrt(1/(2*r.randg(.5)))*n+e}}),r.extend(r.chisquare,{pdf:function(e,n){return 0>e?0:0===e&&2===n?.5:t.exp((n/2-1)*t.log(e)-e/2-n/2*t.log(2)-r.gammaln(n/2))},cdf:function(t,e){return 0>t?0:r.lowRegGamma(e/2,t/2)},inv:function(t,e){return 2*r.gammapinv(t,.5*e)},mean:function(r){return r},median:function(r){return r*t.pow(1-2/(9*r),3)},mode:function(r){return r-2>0?r-2:0},sample:function(t){return 2*r.randg(t/2)},variance:function(r){return 2*r}}),r.extend(r.exponential,{pdf:function(r,e){return 0>r?0:e*t.exp(-e*r)},cdf:function(r,e){return 0>r?0:1-t.exp(-e*r)},inv:function(r,e){return-t.log(1-r)/e},mean:function(r){return 1/r},median:function(r){return 1/r*t.log(2)},mode:function(r){return 0},sample:function(r){return-1/r*t.log(t.random())},variance:function(r){return t.pow(r,-2)}}),r.extend(r.gamma,{pdf:function(e,n,u){return 0>e?0:0===e&&1===n?1/u:t.exp((n-1)*t.log(e)-e/u-r.gammaln(n)-n*t.log(u))},cdf:function(t,e,n){return 0>t?0:r.lowRegGamma(e,t/n)},inv:function(t,e,n){return r.gammapinv(t,e)*n},mean:function(r,t){return r*t},mode:function(r,t){return r>1?(r-1)*t:undefined},sample:function(t,e){return r.randg(t)*e},variance:function(r,t){return r*t*t}}),r.extend(r.invgamma,{pdf:function(e,n,u){return e>0?t.exp(-(n+1)*t.log(e)-u/e-r.gammaln(n)+n*t.log(u)):0},cdf:function(t,e,n){return t>0?1-r.lowRegGamma(e,n/t):0},inv:function(t,e,n){return n/r.gammapinv(1-t,e)},mean:function(r,t){return r>1?t/(r-1):undefined},mode:function(r,t){return t/(r+1)},sample:function(t,e){return e/r.randg(t)},variance:function(r,t){return r>2?t*t/((r-1)*(r-1)*(r-2)):undefined}}),r.extend(r.kumaraswamy,{pdf:function(r,e,n){return 0===r&&1===e?n:1===r&&1===n?e:t.exp(t.log(e)+t.log(n)+(e-1)*t.log(r)+(n-1)*t.log(1-t.pow(r,e)))},cdf:function(r,e,n){return 0>r?0:r>1?1:1-t.pow(1-t.pow(r,e),n)},inv:function(r,e,n){return t.pow(1-t.pow(1-r,1/n),1/e)},mean:function(t,e){return e*r.gammafn(1+1/t)*r.gammafn(e)/r.gammafn(1+1/t+e)},median:function(r,e){return t.pow(1-t.pow(2,-1/e),1/r)},mode:function(r,e){return 1>r||1>e||1===r||1===e?undefined:t.pow((r-1)/(r*e-1),1/r)},variance:function(r,t){throw Error("variance not yet implemented")}}),r.extend(r.lognormal,{pdf:function(r,e,n){return r>0?t.exp(-t.log(r)-.5*t.log(2*t.PI)-t.log(n)-t.pow(t.log(r)-e,2)/(2*n*n)):0},cdf:function(e,n,u){return 0>e?0:.5+.5*r.erf((t.log(e)-n)/t.sqrt(2*u*u))},inv:function(e,n,u){return t.exp(-1.4142135623730951*u*r.erfcinv(2*e)+n)},mean:function(r,e){return t.exp(r+e*e/2)},median:function(r,e){return t.exp(r)},mode:function(r,e){return t.exp(r-e*e)},sample:function(e,n){return t.exp(r.randn()*n+e)},variance:function(r,e){return(t.exp(e*e)-1)*t.exp(2*r+e*e)}}),r.extend(r.noncentralt,{pdf:function(e,n,u){var i=1e-14;return t.abs(u)e&&(a=!0,u=-u);for(var s=r.normal.cdf(-u,0,1),l=i+1,f=l,c=e*e/(e*e+n),p=0,m=t.exp(-u*u/2),d=t.exp(-u*u/2-.5*t.log(2)-r.gammaln(1.5))*u;o>p||f>i||l>i;)f=l,p>0&&(m*=u*u/(2*p),d*=u*u/(2*(p+.5))),l=m*r.beta.cdf(c,p+.5,n/2)+d*r.beta.cdf(c,p+1,n/2),s+=.5*l,p++;return a?1-s:s}}),r.extend(r.normal,{pdf:function(r,e,n){return t.exp(-.5*t.log(2*t.PI)-t.log(n)-t.pow(r-e,2)/(2*n*n))},cdf:function(e,n,u){return.5*(1+r.erf((e-n)/t.sqrt(2*u*u)))},inv:function(t,e,n){return-1.4142135623730951*n*r.erfcinv(2*t)+e},mean:function(r,t){return r},median:function(r,t){return r},mode:function(r,t){return r},sample:function(t,e){return r.randn()*e+t},variance:function(r,t){return t*t}}),r.extend(r.pareto,{pdf:function(r,e,n){return e>r?0:n*t.pow(e,n)/t.pow(r,n+1)},cdf:function(r,e,n){return e>r?0:1-t.pow(e/r,n)},inv:function(r,e,n){return e/t.pow(1-r,1/n)},mean:function(r,e){return e>1?e*t.pow(r,e)/(e-1):undefined},median:function(r,e){return r*(e*t.SQRT2)},mode:function(r,t){return r},variance:function(r,e){return e>2?r*r*e/(t.pow(e-1,2)*(e-2)):undefined}}),r.extend(r.studentt,{pdf:function(e,n){return n=n>1e100?1e100:n,1/(t.sqrt(n)*r.betafn(.5,n/2))*t.pow(1+e*e/n,-((n+1)/2))},cdf:function(e,n){var u=n/2;return r.ibeta((e+t.sqrt(e*e+n))/(2*t.sqrt(e*e+n)),u,u)},inv:function(e,n){var u=r.ibetainv(2*t.min(e,1-e),.5*n,.5);return u=t.sqrt(n*(1-u)/u),e>.5?u:-u},mean:function(r){return r>1?0:undefined},median:function(r){return 0},mode:function(r){return 0},sample:function(e){return r.randn()*t.sqrt(e/(2*r.randg(e/2)))},variance:function(r){return r>2?r/(r-2):r>1?Infinity:undefined}}),r.extend(r.weibull,{pdf:function(r,e,n){return 0>r||0>e||0>n?0:n/e*t.pow(r/e,n-1)*t.exp(-t.pow(r/e,n))},cdf:function(r,e,n){return 0>r?0:1-t.exp(-t.pow(r/e,n))},inv:function(r,e,n){return e*t.pow(-t.log(1-r),1/n)},mean:function(t,e){return t*r.gammafn(1+1/e)},median:function(r,e){return r*t.pow(t.log(2),1/e)},mode:function(r,e){return e>1?r*t.pow((e-1)/e,1/e):0},sample:function(r,e){return r*t.pow(-t.log(t.random()),1/e)},variance:function(e,n){return e*e*r.gammafn(1+2/n)-t.pow(r.weibull.mean(e,n),2)}}),r.extend(r.uniform,{pdf:function(r,t,e){return t>r||r>e?0:1/(e-t)},cdf:function(r,t,e){return t>r?0:e>r?(r-t)/(e-t):1},inv:function(r,t,e){return t+r*(e-t)},mean:function(r,t){return.5*(r+t)},median:function(t,e){return r.mean(t,e)},mode:function(r,t){throw Error("mode is not yet implemented")},sample:function(r,e){return r/2+e/2+(e/2-r/2)*(2*t.random()-1)},variance:function(r,e){return t.pow(e-r,2)/12}}),r.extend(r.binomial,{pdf:function(e,n,u){return 0===u||1===u?n*u===e?1:0:r.combination(n,e)*t.pow(u,e)*t.pow(1-u,n-e)},cdf:function(t,e,n){var u=[],i=0;if(0>t)return 0;if(e>t){for(;t>=i;i++)u[i]=r.binomial.pdf(i,e,n);return r.sum(u)}return 1}}),r.extend(r.negbin,{pdf:function(e,n,u){return e===e>>>0&&(0>e?0:r.combination(e+n-1,n-1)*t.pow(1-u,e)*t.pow(u,n))},cdf:function(t,e,n){var u=0,i=0;if(0>t)return 0;for(;t>=i;i++)u+=r.negbin.pdf(i,e,n);return u}}),r.extend(r.hypgeom,{pdf:function(e,n,u,i){if(e!==e|0)return!1;if(0>e||u-(n-i)>e)return 0;if(e>i||e>u)return 0;if(2*u>n)return 2*i>n?r.hypgeom.pdf(n-u-i+e,n,n-u,n-i):r.hypgeom.pdf(i-e,n,n-u,i);if(2*i>n)return r.hypgeom.pdf(u-e,n,u,n-i);if(i>u)return r.hypgeom.pdf(e,n,i,u);for(var o=1,a=0,s=0;e>s;s++){for(;o>1&&i>a;)o*=1-u/(n-a),a++;o*=(i-s)*(u-s)/((s+1)*(n-u-i+s+1))}for(;i>a;a++)o*=1-u/(n-a);return t.min(1,t.max(0,o))},cdf:function(e,n,u,i){if(0>e||u-(n-i)>e)return 0;if(i>e&&u>e){if(2*u>n)return 2*i>n?r.hypgeom.cdf(n-u-i+e,n,n-u,n-i):1-r.hypgeom.cdf(i-e-1,n,n-u,i);if(2*i>n)return 1-r.hypgeom.cdf(u-e-1,n,u,n-i);if(i>u)return r.hypgeom.cdf(e,n,i,u);for(var o=1,a=1,s=0,l=0;e>l;l++){for(;o>1&&i>s;){var f=1-u/(n-s);a*=f,o*=f,s++}a*=(i-l)*(u-l)/((l+1)*(n-u-i+l+1)),o+=a}for(;i>s;s++)o*=1-u/(n-s);return t.min(1,t.max(0,o))}return 1}}),r.extend(r.poisson,{pdf:function(e,n){return 0>n||e%1!=0||0>e?0:t.pow(n,e)*t.exp(-n)/r.factorial(e)},cdf:function(t,e){var n=[],u=0;if(0>t)return 0;for(;t>=u;u++)n.push(r.poisson.pdf(u,e));return r.sum(n)},mean:function(r){return r},variance:function(r){return r},sample:function(r){var e=1,n=0,u=t.exp(-r);do{n++,e*=t.random()}while(e>u);return n-1}}),r.extend(r.triangular,{pdf:function(r,t,e,n){return t>=e||t>n||n>e?NaN:t>r||r>e?0:n>r?2*(r-t)/((e-t)*(n-t)):r===n?2/(e-t):2*(e-r)/((e-t)*(e-n))},cdf:function(r,e,n,u){return e>=n||e>u||u>n?NaN:r>e?n>r?r>u?1-t.pow(n-r,2)/((n-e)*(n-u)):t.pow(r-e,2)/((n-e)*(u-e)):1:0},inv:function(r,e,n,u){return e>=n||e>u||u>n?NaN:r>(u-e)/(n-e)?e+(n-e)*(1-t.sqrt((1-r)*(1-(u-e)/(n-e)))):e+(n-e)*t.sqrt(r*((u-e)/(n-e)))},mean:function(r,t,e){return(r+t+e)/3},median:function(r,e,n){return n>(r+e)/2?n>(r+e)/2?r+t.sqrt((e-r)*(n-r))/t.sqrt(2):void 0:e-t.sqrt((e-r)*(e-n))/t.sqrt(2)},mode:function(r,t,e){return e},sample:function(r,e,n){var u=t.random();return(n-r)/(e-r)>u?r+t.sqrt(u*(e-r)*(n-r)):e-t.sqrt((1-u)*(e-r)*(e-n))},variance:function(r,t,e){return(r*r+t*t+e*e-r*t-r*e-t*e)/18}}),r.extend(r.laplace,{pdf:function(r,e,n){return n>0?t.exp(-t.abs(r-e)/n)/(2*n):0},cdf:function(r,e,n){return n>0?e>r?.5*t.exp((r-e)/n):1-.5*t.exp(-(r-e)/n):0},mean:function(r,t){return r},median:function(r,t){return r},mode:function(r,t){return r},variance:function(r,t){return 2*t*t},sample:function(r,n){var u=t.random()-.5;return r-n*e(u)*t.log(1-2*t.abs(u))}})}(this.jStat,Math),function(r,t){function e(t){return u(t)||t instanceof r}var n=Array.prototype.push,u=r.utils.isArray;r.extend({add:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.map(t,function(r,t,e){return r+n[t][e]})):r.map(t,function(r){return r+n})},subtract:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.map(t,function(r,t,e){return r-n[t][e]||0})):r.map(t,function(r){return r-n})},divide:function(t,n){return e(n)?(e(n[0])||(n=[n]),r.multiply(t,r.inv(n))):r.map(t,function(r){return r/n})},multiply:function(t,n){var u,i,o,a,s,l,f,c;if(t.length===undefined&&n.length===undefined)return t*n;if(s=t.length,l=t[0].length,f=r.zeros(s,o=e(n)?n[0].length:l),c=0,e(n)){for(;o>c;c++)for(u=0;s>u;u++){for(a=0,i=0;l>i;i++)a+=t[u][i]*n[i][c];f[u][c]=a}return 1===s&&1===c?f[0][0]:f}return r.map(t,function(r){return r*n})},outer:function(t,e){return r.multiply(t.map(function(r){return[r]}),[e])},dot:function(t,n){e(t[0])||(t=[t]),e(n[0])||(n=[n]);for(var u,i,o=1===t[0].length&&1!==t.length?r.transpose(t):t,a=1===n[0].length&&1!==n.length?r.transpose(n):n,s=[],l=0,f=o.length,c=o[0].length;f>l;l++){for(s[l]=[],u=0,i=0;c>i;i++)u+=o[l][i]*a[l][i];s[l]=u}return 1===s.length?s[0]:s},pow:function(e,n){return r.map(e,function(r){return t.pow(r,n)})},exp:function(e){return r.map(e,function(r){return t.exp(r)})},log:function(e){return r.map(e,function(r){return t.log(r)})},abs:function(e){return r.map(e,function(r){return t.abs(r)})},norm:function(r,n){var u=0,i=0;for(isNaN(n)&&(n=2),e(r[0])&&(r=r[0]);r.length>i;i++)u+=t.pow(t.abs(r[i]),n);return t.pow(u,1/n)},angle:function(e,n){return t.acos(r.dot(e,n)/(r.norm(e)*r.norm(n)))},aug:function(r,t){for(var e=[],u=0;r.length>u;u++)e.push(r[u].slice());for(var u=0;e.length>u;u++)n.apply(e[u],t[u]);return e},inv:function(t){for(var e,n=t.length,u=t[0].length,i=r.identity(n,u),o=r.gauss_jordan(t,i),a=[],s=0;n>s;s++)for(a[s]=[],e=u;o[0].length>e;e++)a[s][e-u]=o[s][e];return a},det:function(r){var t,e=r.length,n=2*e,u=Array(n),i=e-1,o=n-1,a=i-e+1,s=o,l=0,f=0;if(2===e)return r[0][0]*r[1][1]-r[0][1]*r[1][0];for(;n>l;l++)u[l]=1;for(var l=0;e>l;l++){for(t=0;e>t;t++)u[0>a?a+e:a]*=r[l][t],u[e>s?s+e:s]*=r[l][t],a++,s--;a=--i-e+1,s=--o}for(var l=0;e>l;l++)f+=u[l];for(;n>l;l++)f-=u[l];return f},gauss_elimination:function(e,n){var u,i,o,a,s=0,l=0,f=e.length,c=e[0].length,p=1,m=0,d=[];e=r.aug(e,n),u=e[0].length;for(var s=0;f>s;s++){for(i=e[s][s],l=s,a=s+1;c>a;a++)ia;a++)o=e[s][a],e[s][a]=e[l][a],e[l][a]=o;for(l=s+1;f>l;l++)for(p=e[l][s]/e[s][s],a=s;u>a;a++)e[l][a]=e[l][a]-p*e[s][a]}for(var s=f-1;s>=0;s--){for(m=0,l=s+1;f-1>=l;l++)m+=d[l]*e[s][l];d[s]=(e[s][u-1]-m)/e[s][s]}return d},gauss_jordan:function(e,n){for(var u=r.aug(e,n),i=u.length,o=u[0].length,a=0;i>a;a++){for(var s=a,l=a+1;i>l;l++)t.abs(u[l][a])>t.abs(u[s][a])&&(s=l);var f=u[a];u[a]=u[s],u[s]=f;for(var l=a+1;i>l;l++){c=u[l][a]/u[a][a];for(var p=a;o>p;p++)u[l][p]-=u[a][p]*c}}for(var a=i-1;a>=0;a--){c=u[a][a];for(var l=0;a>l;l++)for(var p=o-1;p>a-1;p--)u[l][p]-=u[a][p]*u[l][a]/c;u[a][a]/=c;for(var p=i;o>p;p++)u[a][p]/=c}return u},triaUpSolve:function(t,e){var n,u=t[0].length,i=r.zeros(1,u)[0],o=!1;return e[0].length!=undefined&&(e=e.map(function(r){return r[0]}),o=!0),r.arange(u-1,-1,-1).forEach(function(o){n=r.arange(o+1,u).map(function(r){return i[r]*t[o][r]}),i[o]=(e[o]-r.sum(n))/t[o][o]}),o?i.map(function(r){return[r]}):i},triaLowSolve:function(t,e){var n,u=t[0].length,i=r.zeros(1,u)[0],o=!1;return e[0].length!=undefined&&(e=e.map(function(r){return r[0]}),o=!0),r.arange(u).forEach(function(u){n=r.arange(u).map(function(r){return t[u][r]*i[r]}),i[u]=(e[u]-r.sum(n))/t[u][u]}),o?i.map(function(r){return[r]}):i},lu:function(t){var e,n=t.length,u=r.identity(n),o=r.zeros(t.length,t[0].length);return r.arange(n).forEach(function(r){o[0][r]=t[0][r]}),r.arange(1,n).forEach(function(a){r.arange(a).forEach(function(n){e=r.arange(n).map(function(r){return u[a][r]*o[r][n]}),u[a][n]=(t[a][n]-r.sum(e))/o[n][n]}),r.arange(a,n).forEach(function(n){e=r.arange(a).map(function(r){return u[a][r]*o[r][n]}),o[a][n]=t[i][n]-r.sum(e)})}),[u,o]},cholesky:function(e){var n,u=e.length,i=r.zeros(e.length,e[0].length);return r.arange(u).forEach(function(o){n=r.arange(o).map(function(r){return t.pow(i[o][r],2)}),i[o][o]=t.sqrt(e[o][o]-r.sum(n)),r.arange(o+1,u).forEach(function(t){n=r.arange(o).map(function(r){return i[o][r]*i[t][r]}),i[t][o]=(e[o][t]-r.sum(n))/i[o][o]})}),i},gauss_jacobi:function(e,n,u,i){for(var o,a,s,l,f=0,c=0,p=e.length,m=[],d=[],h=[];p>f;f++)for(m[f]=[],d[f]=[],h[f]=[],c=0;p>c;c++)f>c?(m[f][c]=e[f][c],d[f][c]=h[f][c]=0):c>f?(d[f][c]=e[f][c],m[f][c]=h[f][c]=0):(h[f][c]=e[f][c],m[f][c]=d[f][c]=0);for(s=r.multiply(r.multiply(r.inv(h),r.add(m,d)),-1),a=r.multiply(r.inv(h),n),o=u,l=r.add(r.multiply(s,u),a),f=2;t.abs(r.norm(r.subtract(l,o)))>i;)o=l,l=r.add(r.multiply(s,o),a),f++;return l},gauss_seidel:function(e,n,u,i){for(var o,a,s,l,f,c=0,p=e.length,m=[],d=[],h=[];p>c;c++)for(m[c]=[],d[c]=[],h[c]=[],o=0;p>o;o++)c>o?(m[c][o]=e[c][o],d[c][o]=h[c][o]=0):o>c?(d[c][o]=e[c][o],m[c][o]=h[c][o]=0):(h[c][o]=e[c][o],m[c][o]=d[c][o]=0);for(l=r.multiply(r.multiply(r.inv(r.add(h,m)),d),-1),s=r.multiply(r.inv(r.add(h,m)),n),a=u,f=r.add(r.multiply(l,u),s),c=2;t.abs(r.norm(r.subtract(f,a)))>i;)a=f,f=r.add(r.multiply(l,a),s),c+=1;return f},SOR:function(e,n,u,i,o){for(var a,s,l,f,c,p=0,m=e.length,d=[],h=[],E=[];m>p;p++)for(d[p]=[],h[p]=[],E[p]=[],a=0;m>a;a++)p>a?(d[p][a]=e[p][a],h[p][a]=E[p][a]=0):a>p?(h[p][a]=e[p][a],d[p][a]=E[p][a]=0):(E[p][a]=e[p][a],d[p][a]=h[p][a]=0);for(f=r.multiply(r.inv(r.add(E,r.multiply(d,o))),r.subtract(r.multiply(E,1-o),r.multiply(h,o))),l=r.multiply(r.multiply(r.inv(r.add(E,r.multiply(d,o))),n),o),s=u,c=r.add(r.multiply(f,u),l),p=2;t.abs(r.norm(r.subtract(c,s)))>i;)s=c,c=r.add(r.multiply(f,s),l),p++;return c},householder:function(e){for(var n,u,i,o,a,s=e.length,l=e[0].length,f=0,c=[],p=[];s-1>f;f++){for(n=0,o=f+1;l>o;o++)n+=e[o][f]*e[o][f];for(a=e[f+1][f]>0?-1:1,n=a*t.sqrt(n),u=t.sqrt((n*n-e[f+1][f]*n)/2),c=r.zeros(s,1),c[f+1][0]=(e[f+1][f]-n)/(2*u),i=f+2;s>i;i++)c[i][0]=e[i][f]/(2*u);p=r.subtract(r.identity(s,l),r.multiply(r.multiply(c,r.transpose(c)),2)),e=r.multiply(p,r.multiply(e,p))}return e},QR:function(){function t(t){var e=t.length,n=r.norm(t,2),u=r.zeros(1,e)[0];u[0]=1;var i=r.add(r.multiply(r.multiply(u,n),-1),t),o=r.norm(i,2),a=r.divide(i,o);return r.subtract(r.identity(e),r.multiply(r.outer(a,a),2))}function e(e){var n=e[0].length,u=[];return r.arange(n).forEach(function(n){var i=r.slice(e,{row:{start:n},col:n}),o=t(i),a=r.identity(e.length);a=r.sliceAssign(a,{row:{start:n},col:{start:n}},o),e=r.multiply(a,e),u.push(a)}),[u.reduce(function(t,e){return r.multiply(t,e)}),e]}return e}(),lstsq:function(t,e){function n(t){t=r.copy(t);var e=t.length,n=r.identity(e);return r.arange(e-1,-1,-1).forEach(function(e){r.sliceAssign(n,{row:e},r.divide(r.slice(n,{row:e}),t[e][e])),r.sliceAssign(t,{row:e},r.divide(r.slice(t,{row:e}),t[e][e])),r.arange(e).forEach(function(u){var i=r.multiply(t[u][e],-1);r.sliceAssign(t,{row:u},r.add(r.slice(t,{row:u}),r.multiply(r.slice(t,{row:e}),i))),r.sliceAssign(n,{row:u},r.add(r.slice(n,{row:u}),r.multiply(r.slice(n,{row:e}),i)))})}),n}function u(t,e){var u=!1;e[0].length===undefined&&(e=e.map(function(r){return[r]}),u=!0);var i=r.QR(t),o=i[0],a=i[1],s=t[0].length,l=r.slice(o,{col:{end:s}}),f=r.slice(a,{row:{end:s}}),c=n(f),p=r.multiply(r.multiply(c,r.transpose(l)),e);return u?p.map(function(r){return r[0]}):p}return u}(),jacobi:function(e){for(var n,u,i,o,a,s,l,f,c=1,p=0,m=e.length,d=r.identity(m,m),h=[];1===c;){p++,s=e[0][1],o=0,a=1;for(var u=0;m>u;u++)for(i=0;m>i;i++)u!=i&&s0?t.PI/4:-t.PI/4:t.atan(2*e[o][a]/(e[o][o]-e[a][a]))/2,f=r.identity(m,m),f[o][o]=t.cos(l),f[o][a]=-t.sin(l),f[a][o]=t.sin(l),f[a][a]=t.cos(l),d=r.multiply(d,f),n=r.multiply(r.multiply(r.inv(f),e),f),e=n,c=0;for(var u=1;m>u;u++)for(i=1;m>i;i++)u!=i&&t.abs(e[u][i])>.001&&(c=1)}for(var u=0;m>u;u++)h.push(e[u][u]);return[d,h]},rungekutta:function(r,t,e,n,u,i){var o,a,s,l,f;if(2===i)for(;e>=n;)o=t*r(n,u),a=t*r(n+t,u+o),s=u+(o+a)/2,u=s,n+=t;if(4===i)for(;e>=n;)o=t*r(n,u),a=t*r(n+t/2,u+o/2),l=t*r(n+t/2,u+a/2),f=t*r(n+t,u+l),s=u+(o+2*a+2*l+f)/6,u=s,n+=t;return u},romberg:function(r,e,n,u){for(var i,o,a,s,l,f=0,c=(n-e)/2,p=[],m=[],d=[];u/2>f;){for(l=r(e),a=e,s=0;n>=a;a+=c,s++)p[s]=a;for(i=p.length,a=1;i-1>a;a++)l+=(a%2!=0?4:2)*r(p[a]);l=c/3*(l+r(n)),d[f]=l,c/=2,f++}for(o=d.length,i=1;1!==o;){for(a=0;o-1>a;a++)m[a]=(t.pow(4,i)*d[a+1]-d[a])/(t.pow(4,i)-1);o=m.length,d=m,m=[],i++}return d},richardson:function(r,e,n,u){function i(r,t){for(var e,n=0,u=r.length;u>n;n++)r[n]===t&&(e=n);return e}for(var o,a,s,l,f,c=t.abs(n-r[i(r,n)+1]),p=0,m=[],d=[];u>=c;)o=i(r,n+u),a=i(r,n),m[p]=(e[o]-2*e[a]+e[2*a-o])/(u*u),u/=2,p++;for(l=m.length,s=1;1!=l;){for(f=0;l-1>f;f++)d[f]=(t.pow(4,s)*m[f+1]-m[f])/(t.pow(4,s)-1);l=d.length,m=d,d=[],s++}return m},simpson:function(r,t,e,n){for(var u,i=(e-t)/n,o=r(t),a=[],s=t,l=0,f=1;e>=s;s+=i,l++)a[l]=s;for(u=a.length;u-1>f;f++)o+=(f%2!=0?4:2)*r(a[f]);return i/3*(o+r(e))},hermite:function(r,t,e,n){for(var u,i=r.length,o=0,a=0,s=[],l=[],f=[],c=[];i>a;a++){for(s[a]=1,u=0;i>u;u++)a!=u&&(s[a]*=(n-r[u])/(r[a]-r[u]));for(l[a]=0,u=0;i>u;u++)a!=u&&(l[a]+=1/(r[a]-r[u]));f[a]=s[a]*s[a]*(1-2*(n-r[a])*l[a]),c[a]=s[a]*s[a]*(n-r[a]),o+=f[a]*t[a]+c[a]*e[a]}return o},lagrange:function(r,t,e){for(var n,u,i=0,o=0,a=r.length;a>o;o++){for(u=t[o],n=0;a>n;n++)o!=n&&(u*=(e-r[n])/(r[o]-r[n]));i+=u}return i},cubic_spline:function(t,e,n){for(var u,i=t.length,o=0,a=[],s=[],l=[],f=[],c=[],p=[],m=[];i-1>o;o++)c[o]=t[o+1]-t[o];l[0]=0;for(var o=1;i-1>o;o++)l[o]=3/c[o]*(e[o+1]-e[o])-3/c[o-1]*(e[o]-e[o-1]);for(var o=1;i-1>o;o++)a[o]=[],s[o]=[],a[o][o-1]=c[o-1],a[o][o]=2*(c[o-1]+c[o]),a[o][o+1]=c[o],s[o][0]=l[o];for(f=r.multiply(r.inv(a),s),u=0;i-1>u;u++)p[u]=(e[u+1]-e[u])/c[u]-c[u]*(f[u+1][0]+2*f[u][0])/3,m[u]=(f[u+1][0]-f[u][0])/(3*c[u]);for(u=0;i>u&&t[u]<=n;u++);return u-=1,e[u]+(n-t[u])*p[u]+r.sq(n-t[u])*f[u]+(n-t[u])*r.sq(n-t[u])*m[u]},gauss_quadrature:function(){throw Error("gauss_quadrature not yet implemented")},PCA:function(t){for(var e,n,u=t.length,i=t[0].length,o=0,a=[],s=[],l=[],f=[],c=[],p=[],m=[],d=[],h=[],E=[],o=0;u>o;o++)a[o]=r.sum(t[o])/i;for(var o=0;i>o;o++)for(m[o]=[],e=0;u>e;e++)m[o][e]=t[e][o]-a[e];m=r.transpose(m);for(var o=0;u>o;o++)for(d[o]=[],e=0;u>e;e++)d[o][e]=r.dot([m[o]],[m[e]])/(i-1);l=r.jacobi(d),h=l[0],s=l[1],E=r.transpose(h);for(var o=0;s.length>o;o++)for(e=o;s.length>e;e++)s[e]>s[o]&&(n=s[o],s[o]=s[e],s[e]=n,f=E[o],E[o]=E[e],E[e]=f);p=r.transpose(m);for(var o=0;u>o;o++)for(c[o]=[],e=0;p.length>e;e++)c[o][e]=r.dot([E[o]],[p[e]]);return[t,s,E,c]}}),function(t){for(var e=0;t.length>e;e++)!function(t){r.fn[t]=function(e,n){var u=this;return n?(setTimeout(function(){n.call(u,r.fn[t].call(u,e))},15),this):"number"==typeof r[t](this,e)?r[t](this,e):r(r[t](this,e))}}(t[e])}("add divide multiply subtract dot pow exp log abs norm angle".split(" "))}(this.jStat,Math),function(r,t){function e(r,e,n,u){if(r>1||n>1||0>=r||0>=n)throw Error("Proportions should be greater than 0 and less than 1");var i=(r*e+n*u)/(e+u);return(r-n)/t.sqrt(i*(1-i)*(1/e+1/u))}var n=[].slice,u=r.utils.isNumber,i=r.utils.isArray;r.extend({zscore:function(){var t=n.call(arguments);return u(t[1])?(t[0]-t[1])/t[2]:(t[0]-r.mean(t[1]))/r.stdev(t[1],t[2])},ztest:function(){var e,u=n.call(arguments);return i(u[1])?(e=r.zscore(u[0],u[1],u[3]),1===u[2]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1)):u.length>2?(e=r.zscore(u[0],u[1],u[2]),1===u[3]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1)):(e=u[0],1===u[1]?r.normal.cdf(-t.abs(e),0,1):2*r.normal.cdf(-t.abs(e),0,1))}}),r.extend(r.fn,{zscore:function(r,t){return(r-this.mean())/this.stdev(t)},ztest:function(e,n,u){var i=t.abs(this.zscore(e,u));return 1===n?r.normal.cdf(-i,0,1):2*r.normal.cdf(-i,0,1)}}),r.extend({tscore:function(){var e=n.call(arguments);return 4===e.length?(e[0]-e[1])/(e[2]/t.sqrt(e[3])):(e[0]-r.mean(e[1]))/(r.stdev(e[1],!0)/t.sqrt(e[1].length))},ttest:function(){var e,i=n.call(arguments);return 5===i.length?(e=t.abs(r.tscore(i[0],i[1],i[2],i[3])),1===i[4]?r.studentt.cdf(-e,i[3]-1):2*r.studentt.cdf(-e,i[3]-1)):u(i[1])?(e=t.abs(i[0]),1==i[2]?r.studentt.cdf(-e,i[1]-1):2*r.studentt.cdf(-e,i[1]-1)):(e=t.abs(r.tscore(i[0],i[1])),1==i[2]?r.studentt.cdf(-e,i[1].length-1):2*r.studentt.cdf(-e,i[1].length-1))}}),r.extend(r.fn,{tscore:function(r){return(r-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(e,n){return 1===n?1-r.studentt.cdf(t.abs(this.tscore(e)),this.cols()-1):2*r.studentt.cdf(-t.abs(this.tscore(e)),this.cols()-1)}}),r.extend({anovafscore:function(){var e,u,i,o,a,s,l,f,c=n.call(arguments);if(1===c.length){a=Array(c[0].length);for(var l=0;c[0].length>l;l++)a[l]=c[0][l];c=a}if(2===c.length)return r.variance(c[0])/r.variance(c[1]);u=[];for(var l=0;c.length>l;l++)u=u.concat(c[l]);i=r.mean(u),e=0;for(var l=0;c.length>l;l++)e+=c[l].length*t.pow(r.mean(c[l])-i,2);e/=c.length-1,s=0;for(var l=0;c.length>l;l++)for(o=r.mean(c[l]),f=0;c[l].length>f;f++)s+=t.pow(c[l][f]-o,2);return s/=u.length-c.length,e/s},anovaftest:function(){var t,e,i,o,a=n.call(arguments);if(u(a[0]))return 1-r.centralF.cdf(a[0],a[1],a[2]);anovafscore=r.anovafscore(a),t=a.length-1,i=0;for(var o=0;a.length>o;o++)i+=a[o].length;return e=i-t-1,1-r.centralF.cdf(anovafscore,t,e)},ftest:function(t,e,n){return 1-r.centralF.cdf(t,e,n)}}),r.extend(r.fn,{anovafscore:function(){return r.anovafscore(this.toArray())},anovaftes:function(){for(var t,e=0,t=0;this.length>t;t++)e+=this[t].length;return r.ftest(this.anovafscore(),this.length-1,e-this.length)}}),r.extend({normalci:function(){var e,u=n.call(arguments),i=Array(2);return e=t.abs(4===u.length?r.normal.inv(u[1]/2,0,1)*u[2]/t.sqrt(u[3]):r.normal.inv(u[1]/2,0,1)*r.stdev(u[2])/t.sqrt(u[2].length)),i[0]=u[0]-e,i[1]=u[0]+e,i},tci:function(){var e,u=n.call(arguments),i=Array(2);return e=t.abs(4===u.length?r.studentt.inv(u[1]/2,u[3]-1)*u[2]/t.sqrt(u[3]):r.studentt.inv(u[1]/2,u[2].length-1)*r.stdev(u[2],!0)/t.sqrt(u[2].length)),i[0]=u[0]-e,i[1]=u[0]+e,i},significant:function(r,t){return t>r}}),r.extend(r.fn,{normalci:function(t,e){return r.normalci(t,e,this.toArray())},tci:function(t,e){return r.tci(t,e,this.toArray())}}),r.extend(r.fn,{oneSidedDifferenceOfProportions:function(t,n,u,i){return r.ztest(e(t,n,u,i),1)},twoSidedDifferenceOfProportions:function(t,n,u,i){return r.ztest(e(t,n,u,i),2)}})}(this.jStat,Math),this.jStat.models=function(){function r(r,e){return t(r,e)}function r(r){var e=r[0].length;return jStat.arange(e).map(function(n){var u=jStat.arange(e).filter(function(r){return r!==n});return t(jStat.col(r,n).map(function(r){return r[0]}),jStat.col(r,u))})}function t(r,t){var e=r.length,n=t[0].length-1,u=e-n-1,i=jStat.lstsq(t,r),o=jStat.multiply(t,i.map(function(r){return[r]})).map(function(r){return r[0]}),a=jStat.subtract(r,o),s=jStat.mean(r),l=jStat.sum(o.map(function(r){return Math.pow(r-s,2)})),f=jStat.sum(r.map(function(r,t){return Math.pow(r-o[t],2)})),c=l+f;return{exog:t,endog:r,nobs:e,df_model:n,df_resid:u,coef:i,predict:o,resid:a,ybar:s,SST:c,SSE:l,SSR:f,R2:l/c}}function e(t){var e=r(t.exog),n=Math.sqrt(t.SSR/t.df_resid),u=e.map(function(r){var t=r.SST,e=r.R2;return n/Math.sqrt(t*(1-e))}),i=t.coef.map(function(r,t){return(r-0)/u[t]}),o=i.map(function(r){var e=jStat.studentt.cdf(r,t.df_resid);return 2*(e>.5?1-e:e)}),a=jStat.studentt.inv(.975,t.df_resid);return{se:u,t:i,p:o,sigmaHat:n,interval95:t.coef.map(function(r,t){var e=a*u[t];return[r-e,r+e]})}}function n(r){var t=r.R2/r.df_model/((1-r.R2)/r.df_resid);return{F_statistic:t,pvalue:1-function(r,t,e){return jStat.beta.cdf(r/(e/t+r),t/2,e/2)}(t,r.df_model,r.df_resid)}}function u(r,u){var i=t(r,u),o=e(i),a=n(i),s=1-(i.nobs-1)/i.df_resid*(1-i.rsquared);return i.t=o,i.f=a,i.adjust_R2=s,i}return{ols:u}}()},function(r,t,e){(function(n){var u,i;/*! * numbro.js * version : 1.9.3 * author : Företagsplatsen AB * license : MIT * http://www.foretagsplatsen.se */ -(function(){"use strict";function u(r){this._value=r}function a(r){var t,e="";for(t=0;r>t;t++)e+="0";return e}function s(r,t){var e,n,i,o,u,s,l,f;return f=""+r,e=f.split("e")[0],o=f.split("e")[1],n=e.split(".")[0],i=e.split(".")[1]||"",+o>0?f=n+i+a(o-i.length):(u=0>+n?"-0":"0",t>0&&(u+="."),l=a(-1*o-1),s=(l+Math.abs(n)+i).substr(0,t),f=u+s),+o>0&&t>0&&(f+="."+a(t)),f}function l(r,t,e,n){var i,o,u=Math.pow(10,t);return(""+r).indexOf("e")>-1?(o=s(r,t),"-"!==o.charAt(0)||0>+o||(o=o.substr(1))):o=(e(r+"e+"+t)/u).toFixed(t),n&&(i=RegExp("0{1,"+n+"}$"),o=o.replace(i,"")),o}function f(r,t,e){var n,i=t.replace(/\{[^\{\}]*\}/g,"");return n=i.indexOf("$")>-1?p(r,$[C].currency.symbol,t,e):i.indexOf("%")>-1?h(r,t,e):i.indexOf(":")>-1?d(r,t):g(r._value,t,e)}function c(r,t){var e,n,i,o,u,a=t,s=!1;if(t.indexOf(":")>-1)r._value=v(t);else if(t===V)r._value=0;else{for("."!==$[C].delimiters.decimal&&(t=t.replace(/\./g,"").replace($[C].delimiters.decimal,".")),e=RegExp("[^a-zA-Z]"+$[C].abbreviations.thousand+"(?:\\)|(\\"+$[C].currency.symbol+")?(?:\\))?)?$"),n=RegExp("[^a-zA-Z]"+$[C].abbreviations.million+"(?:\\)|(\\"+$[C].currency.symbol+")?(?:\\))?)?$"),i=RegExp("[^a-zA-Z]"+$[C].abbreviations.billion+"(?:\\)|(\\"+$[C].currency.symbol+")?(?:\\))?)?$"),o=RegExp("[^a-zA-Z]"+$[C].abbreviations.trillion+"(?:\\)|(\\"+$[C].currency.symbol+")?(?:\\))?)?$"),u=1;R.length>u&&!s;++u)t.indexOf(R[u])>-1?s=Math.pow(1024,u):t.indexOf(T[u])>-1&&(s=Math.pow(1e3,u));var l=t.replace(/[^0-9\.]+/g,"");""===l?r._value=NaN:(r._value=(s?s:1)*(a.match(e)?Math.pow(10,3):1)*(a.match(n)?Math.pow(10,6):1)*(a.match(i)?Math.pow(10,9):1)*(a.match(o)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*+l,r._value=s?Math.ceil(r._value):r._value)}return r._value}function p(r,t,e,n){var i,o,u=e,a=u.indexOf("$"),s=u.indexOf("("),l=u.indexOf("+"),f=u.indexOf("-"),c="",p="";if(u.indexOf("$")===-1?"infix"===$[C].currency.position?(p=t,$[C].currency.spaceSeparated&&(p=" "+p+" ")):$[C].currency.spaceSeparated&&(c=" "):u.indexOf(" $")>-1?(c=" ",u=u.replace(" $","")):u.indexOf("$ ")>-1?(c=" ",u=u.replace("$ ","")):u=u.replace("$",""),o=g(r._value,u,n,p),e.indexOf("$")===-1)switch($[C].currency.position){case"postfix":o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,c+t),o=o.join("")):o=o+c+t;break;case"infix":break;case"prefix":o.indexOf("(")>-1||o.indexOf("-")>-1?(o=o.split(""),i=Math.max(s,f)+1,o.splice(i,0,t+c),o=o.join("")):o=t+c+o;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else a>1?o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,c+t),o=o.join("")):o=o+c+t:o.indexOf("(")>-1||o.indexOf("+")>-1||o.indexOf("-")>-1?(o=o.split(""),i=1,(s>a||l>a||f>a)&&(i=0),o.splice(i,0,t+c),o=o.join("")):o=t+c+o;return o}function m(r,t,e,n){return p(r,t,e,n)}function h(r,t,e){var n,i="",o=100*r._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),n=g(o,t,e),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,i+"%"),n=n.join("")):n=n+i+"%",n}function d(r){var t=Math.floor(r._value/60/60),e=Math.floor((r._value-60*t*60)/60),n=Math.round(r._value-60*t*60-60*e);return t+":"+(10>e?"0"+e:e)+":"+(10>n?"0"+n:n)}function v(r){var t=r.split(":"),e=0;return 3===t.length?(e+=60*+t[0]*60,e+=60*+t[1],e+=+t[2]):2===t.length&&(e+=60*+t[0],e+=+t[1]),+e}function E(r,t,e){var n,i,o,u=t[0],a=Math.abs(r);if(a>=e){for(n=1;t.length>n;++n)if(i=Math.pow(e,n),o=Math.pow(e,n+1),a>=i&&o>a){u=t[n],r/=i;break}u===t[0]&&(r/=Math.pow(e,t.length-1),u=t[t.length-1])}return{value:r,suffix:u}}function g(r,t,e,n){var i,o,u,s,f,c,p,m,h,d,v,g,N,b,y,I,w,M=!1,A=!1,R=!1,T="",x=!1,O=!1,D=!1,L=!1,_=!1,P="",U="",F=Math.abs(r),B="",j=!1,k=!1,G="";if(0===r&&null!==V)return V;if(!isFinite(r))return""+r;if(0===t.indexOf("{")){var Y=t.indexOf("}");if(Y===-1)throw Error('Format should also contain a "}"');d=t.slice(1,Y),t=t.slice(Y+1)}else d="";if(t.indexOf("}")===t.length-1){var W=t.indexOf("{");if(W===-1)throw Error('Format should also contain a "{"');v=t.slice(W+1,-1),t=t.slice(0,W+1)}else v="";var H;for(H=t.match(t.indexOf(".")===-1?/([0-9]+).*/:/([0-9]+)\..*/),I=null===H?-1:H[1].length,t.indexOf("-")!==-1&&(j=!0),t.indexOf("(")>-1?(M=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(A=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(m=t.split(".")[0].match(/[0-9]+/g)||["0"],m=parseInt(m[0],10),x=t.indexOf("aK")>=0,O=t.indexOf("aM")>=0,D=t.indexOf("aB")>=0,L=t.indexOf("aT")>=0,_=x||O||D||L,t.indexOf(" a")>-1?(T=" ",t=t.replace(" a","")):t=t.replace("a",""),u=Math.floor(Math.log(F)/Math.LN10)+1,f=u%3,f=0===f?3:f,m&&0!==F&&(s=Math.floor(Math.log(F)/Math.LN10)+1-m,c=3*~~((Math.min(m,u)-f)/3),F/=Math.pow(10,c),t.indexOf(".")===-1&&m>3&&(t+="[.]",b=0===s?0:3*~~(s/3)-s,b=0>b?b+3:b,t+=a(b))),Math.floor(Math.log(Math.abs(r))/Math.LN10)+1!==m&&(F>=Math.pow(10,12)&&!_||L?(T+=$[C].abbreviations.trillion,r/=Math.pow(10,12)):F=Math.pow(10,9)&&!_||D?(T+=$[C].abbreviations.billion,r/=Math.pow(10,9)):F=Math.pow(10,6)&&!_||O?(T+=$[C].abbreviations.million,r/=Math.pow(10,6)):(F=Math.pow(10,3)&&!_||x)&&(T+=$[C].abbreviations.thousand,r/=Math.pow(10,3)))),w=0;S.length>w;++w)if(i=S[w],t.indexOf(i.marker)>-1){t.indexOf(" "+i.marker)>-1&&(P=" "),t=t.replace(P+i.marker,""),o=E(r,i.suffixes,i.scale),r=o.value,P+=o.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(U=" ",t=t.replace(" o","")):t=t.replace("o",""),$[C].ordinal&&(U+=$[C].ordinal(r))),t.indexOf("[.]")>-1&&(R=!0,t=t.replace("[.]",".")),p=(""+r).split(".")[0],h=t.split(".")[1],g=t.indexOf(","),h){if(h.indexOf("*")!==-1?B=l(r,(""+r).split(".")[1].length,e):h.indexOf("[")>-1?(h=h.replace("]",""),h=h.split("["),B=l(r,h[0].length+h[1].length,e,h[1].length)):B=l(r,h.length,e),p=B.split(".")[0],B.split(".")[1].length){var q=n?T+n:$[C].delimiters.decimal;B=q+B.split(".")[1]}else B="";R&&0===+B.slice(1)&&(B="")}else p=l(r,0,e);return p.indexOf("-")>-1&&(p=p.slice(1),k=!0),I>p.length&&(p=a(I-p.length)+p),g>-1&&(p=(""+p).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+$[C].delimiters.thousands)),0===t.indexOf(".")&&(p=""),N=t.indexOf("("),y=t.indexOf("-"),G=y>N?(M&&k?"(":"")+(j&&k||!M&&k?"-":""):(j&&k||!M&&k?"-":"")+(M&&k?"(":""),d+G+(!k&&A&&0!==r?"+":"")+p+B+(U?U:"")+(T&&!n?T:"")+(P?P:"")+(M&&k?")":"")+v}function N(r,t){$[r]=t}function b(r){C=r;var t=$[r].defaults;t&&t.format&&M.defaultFormat(t.format),t&&t.currencyFormat&&M.defaultCurrencyFormat(t.currencyFormat)}function y(){return void 0!==n&&void 0===n.browser&&n.title&&(0===n.title.indexOf("node")||n.title.indexOf("meteor-tool")>0||"grunt"===n.title||"gulp"===n.title)&&!0}function I(r){var t=(""+r).split(".");return 2>t.length?1:Math.pow(10,t[1].length)}function w(){var r=Array.prototype.slice.call(arguments);return r.reduce(function(r,t){var e=I(r),n=I(t);return e>n?e:n},-(1/0))}var M,A="1.9.3",R=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],T=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],x={general:{scale:1024,suffixes:T,marker:"bd"},binary:{scale:1024,suffixes:R,marker:"b"},decimal:{scale:1e3,suffixes:T,marker:"d"}},S=[x.general,x.binary,x.decimal],$={},O=$,C="en-US",V=null,D="0,0",L="0$",_=void 0!==r&&r.exports,P={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}};M=function(r){return M.isNumbro(r)?r=r.value():0===r||void 0===r?r=0:+r||(r=M.fn.unformat(r)),new u(+r)},M.version=A,M.isNumbro=function(r){return r instanceof u},M.setLanguage=function(r,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var e=r,n=r.split("-")[0],i=null;O[e]||(Object.keys(O).forEach(function(r){i||r.split("-")[0]!==n||(i=r)}),e=i||t||"en-US"),b(e)},M.setCulture=function(r,t){var e=r,n=r.split("-")[1],i=null;$[e]||(n&&Object.keys($).forEach(function(r){i||r.split("-")[1]!==n||(i=r)}),e=i||t||"en-US"),b(e)},M.language=function(r,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!r)return C;if(r&&!t){if(!O[r])throw Error("Unknown language : "+r);b(r)}return!t&&O[r]||N(r,t),M},M.culture=function(r,t){if(!r)return C;if(r&&!t){if(!$[r])throw Error("Unknown culture : "+r);b(r)}return!t&&$[r]||N(r,t),M},M.languageData=function(r){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!r)return O[C];if(!O[r])throw Error("Unknown language : "+r);return O[r]},M.cultureData=function(r){if(!r)return $[C];if(!$[r])throw Error("Unknown culture : "+r);return $[r]},M.culture("en-US",P),M.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),O},M.cultures=function(){return $},M.zeroFormat=function(r){V="string"==typeof r?r:null},M.defaultFormat=function(r){D="string"==typeof r?r:"0.0"},M.defaultCurrencyFormat=function(r){L="string"==typeof r?r:"0$"},M.validate=function(r,t){var e,n,i,o,u,a,s,l;if("string"!=typeof r&&(r+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",r)),r=r.trim(),r=r.replace(/^[+-]?/,""),r.match(/^\d+$/))return!0;if(""===r)return!1;try{s=M.cultureData(t)}catch(f){s=M.cultureData(M.culture())}return i=s.currency.symbol,u=s.abbreviations,e=s.delimiters.decimal,n="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,l=r.match(/^[^\d\.\,]+/),(null===l||(r=r.substr(1),l[0]===i))&&(l=r.match(/[^\d]+$/),(null===l||(r=r.slice(0,-1),l[0]===u.thousand||l[0]===u.million||l[0]===u.billion||l[0]===u.trillion))&&(a=RegExp(n+"{2}"),!r.match(/[^\d.,]/g)&&(o=r.split(e),2>=o.length&&(2>o.length?!!o[0].match(/^\d+.*\d$/)&&!o[0].match(a):""===o[0]?!o[0].match(a)&&!!o[1].match(/^\d+$/):1===o[0].length?!!o[0].match(/^\d+$/)&&!o[0].match(a)&&!!o[1].match(/^\d+$/):!!o[0].match(/^\d+.*\d$/)&&!o[0].match(a)&&!!o[1].match(/^\d+$/)))))},M.loadLanguagesInNode=function(){console.warn("`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead"),M.loadCulturesInNode()},M.loadCulturesInNode=function(){var r=e(58);for(var t in r)t&&M.culture(t,r[t])},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(r,t){if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof r)throw new TypeError(r+" is not a function");var e,n,i=this.length>>>0,o=!1;for(arguments.length>1&&(n=t,o=!0),e=0;i>e;++e)this.hasOwnProperty(e)&&(o?n=r(n,this[e],e,this):(n=this[e],o=!0));if(!o)throw new TypeError("Reduce of empty array with no initial value");return n}),M.fn=u.prototype={clone:function(){return M(this)},format:function(r,t){return f(this,r?r:D,void 0!==t?t:Math.round)},formatCurrency:function(r,t){return p(this,$[C].currency.symbol,r?r:L,void 0!==t?t:Math.round)},formatForeignCurrency:function(r,t,e){return m(this,r,t?t:L,void 0!==e?e:Math.round)},unformat:function(r){if("number"==typeof r)return r;if("string"==typeof r){var t=c(this,r);return isNaN(t)?void 0:t}},binaryByteUnits:function(){return E(this._value,x.binary.suffixes,x.binary.scale).suffix},byteUnits:function(){return E(this._value,x.general.suffixes,x.general.scale).suffix},decimalByteUnits:function(){return E(this._value,x.decimal.suffixes,x.decimal.scale).suffix},value:function(){return this._value},valueOf:function(){return this._value},set:function(r){return this._value=+r,this},add:function(r){function t(r,t){return r+e*t}var e=w.call(null,this._value,r);return this._value=[this._value,r].reduce(t,0)/e,this},subtract:function(r){function t(r,t){return r-e*t}var e=w.call(null,this._value,r);return this._value=[r].reduce(t,this._value*e)/e,this},multiply:function(r){function t(r,t){var e=w(r,t),n=r*e;return n*=t*e,n/=e*e}return this._value=[this._value,r].reduce(t,1),this},divide:function(r){function t(r,t){var e=w(r,t);return r*e/(t*e)}return this._value=[this._value,r].reduce(t),this},difference:function(r){return Math.abs(M(this._value).subtract(r).value())}},y()&&M.loadCulturesInNode(),_?r.exports=M:("undefined"==typeof ender&&(this.numbro=M),i=[],o=function(){return M}.apply(t,i),!(void 0!==o&&(r.exports=o)))}).call("undefined"==typeof window?this:window)}).call(t,e(15))},function(r,t){function e(){throw Error("setTimeout has not been defined")}function n(){throw Error("clearTimeout has not been defined")}function i(r){if(f===setTimeout)return setTimeout(r,0);if((f===e||!f)&&setTimeout)return f=setTimeout,setTimeout(r,0);try{return f(r,0)}catch(t){try{return f.call(null,r,0)}catch(t){return f.call(this,r,0)}}}function o(r){if(c===clearTimeout)return clearTimeout(r);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(r);try{return c(r)}catch(t){try{return c.call(null,r)}catch(t){return c.call(this,r)}}}function u(){d&&m&&(d=!1,m.length?h=m.concat(h):v=-1,h.length&&a())}function a(){if(!d){var r=i(u);d=!0;for(var t=h.length;t;){for(m=h,h=[];++v1)for(var e=1;arguments.length>e;e++)t[e-1]=arguments[e];h.push(new s(r,t)),1!==h.length||d||i(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(r){throw Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(r){throw Error("process.chdir is not supported")},p.umask=function(){return 0}},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}function i(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function o(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?r:t}function u(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}t.__esModule=!0;var a=e(78),s=n(a),l=e(17),f=n(l),c=e(80),p=e(31),m=e(3),h=e(1),d=n(h),v=e(9),E=function(r){function t(){i(this,t);var e=o(this,r.call(this));return e.parser=new c.Parser,e.parser.yy={toNumber:m.toNumber,trimEdges:p.trimEdges,invertNumber:m.invertNumber,throwError:function(r){return e._throwError(r)},callVariable:function(r){return e._callVariable(r)},evaluateByOperator:f["default"],callFunction:f["default"],cellValue:function(r){return e._callCellValue(r)},rangeValue:function(r,t){return e._callRangeValue(r,t)}},e.variables=Object.create(null),e.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),e}return u(t,r),t.prototype.parse=function(r){var t=null,e=null;try{t=""===r?"":this.parser.parse(r)}catch(n){var i=(0,d["default"])(n.message);e=i?i:(0,d["default"])(h.ERROR)}return t instanceof Error&&(e=(0,d["default"])(t.message)||(0,d["default"])(h.ERROR),t=null),{error:e,result:t}},t.prototype.setVariable=function(r,t){return this.variables[r]=t,this},t.prototype.getVariable=function(r){return this.variables[r]},t.prototype._callVariable=function(r){var t=this.getVariable(r);if(this.emit("callVariable",r,function(r){void 0!==r&&(t=r)}),void 0===t)throw Error(h.ERROR_NAME);return t},t.prototype._callCellValue=function(r){r=r.toUpperCase();var t=(0,v.extractLabel)(r),e=t[0],n=t[1],i=void 0;return this.emit("callCellValue",{label:r,row:e,column:n},function(r){i=r}),i},t.prototype._callRangeValue=function(r,t){r=r.toUpperCase(),t=t.toUpperCase();var e=(0,v.extractLabel)(r),n=e[0],i=e[1],o=(0,v.extractLabel)(t),u=o[0],a=o[1],s={},l={};n.index>u.index?(s.row=u,l.row=n):(s.row=n,l.row=u),i.index>a.index?(s.column=a,l.column=i):(s.column=i,l.column=a),s.label=(0,v.toLabel)(s.row,s.column),l.label=(0,v.toLabel)(l.row,l.column);var f=[];return this.emit("callRangeValue",s,l,function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f=r}),f},t.prototype._throwError=function(r){if((0,h.isValidStrict)(r))throw Error(r);throw Error(h.ERROR)},t}(s["default"]);t["default"]=E},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}function i(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(r=r.toUpperCase(),!V[r])throw Error(C.ERROR_NAME);return V[r].apply(V,t)}function o(r,t){Array.isArray(r)||(r=[r.toUpperCase()]),r.forEach(function(r){V[r]=t.isFactory?t(r):t})}t.__esModule=!0,t["default"]=i,t.registerOperation=o;var u=e(18),a=n(u),s=e(19),l=n(s),f=e(20),c=n(f),p=e(21),m=n(p),h=e(22),d=n(h),v=e(24),E=n(v),g=e(23),N=n(g),b=e(26),y=n(b),I=e(25),w=n(I),M=e(27),A=n(M),R=e(28),T=n(R),x=e(29),S=n(x),$=e(30),O=n($),C=e(1),V=Object.create(null);o(a["default"].SYMBOL,a["default"]),o(l["default"].SYMBOL,l["default"]),o(c["default"].SYMBOL,c["default"]),o(m["default"].SYMBOL,m["default"]),o(O["default"].SYMBOL,O["default"]),o(d["default"].SYMBOL,d["default"]),o(E["default"].SYMBOL,E["default"]),o(N["default"].SYMBOL,N["default"]),o(y["default"].SYMBOL,y["default"]),o(w["default"].SYMBOL,w["default"]),o(T["default"].SYMBOL,T["default"]),o(S["default"].SYMBOL,S["default"]),o(A["default"].SYMBOL,A["default"])},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var u=e.reduce(function(r,t){return r+(0,i.toNumber)(t)},(0,i.toNumber)(r));if(isNaN(u))throw Error(o.ERROR_VALUE);return u}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=n;var i=e(3),o=e(1),u=t.SYMBOL="+";n.SYMBOL=u},function(r,t,e){"use strict";function n(){for(var r=arguments.length,t=Array(r),e=0;r>e;e++)t[e]=arguments[e];return t.reduce(function(r,t){return r+(""+t)},"")}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL="&";n.SYMBOL=i},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var u=e.reduce(function(r,t){return r/(0,i.toNumber)(t)},(0,i.toNumber)(r));if(u===1/0)throw Error(o.ERROR_DIV_ZERO);if(isNaN(u))throw Error(o.ERROR_VALUE);return u}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=n;var i=e(3),o=e(1),u=t.SYMBOL="/";n.SYMBOL=u},function(r,t,e){"use strict";function n(r,t){return r===t}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL="=";n.SYMBOL=i},function(r,t,e){"use strict";function n(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t["default"]=r,t}function i(r){return r&&r.__esModule?r:{"default":r}}function o(r){return function(){r=r.toUpperCase();var t=r.split("."),e=!1,n=void 0;if(1===t.length)f[t[0]]&&(e=!0,n=f[t[0]].apply(f,arguments));else{for(var i=t.length,o=0,u=f;i>o;)if(u=u[t[o]],o++,!u){u=null;break}u&&(e=!0,n=u.apply(void 0,arguments))}if(!e)throw Error(s.ERROR_NAME);return n}}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=o;var u=e(10),a=i(u),s=e(1),l=e(33),f=n(l),c=t.SYMBOL=a["default"];o.isFactory=!0,o.SYMBOL=c},function(r,t,e){"use strict";function n(r,t){return r>=t}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL=">=";n.SYMBOL=i},function(r,t,e){"use strict";function n(r,t){return r>t}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL=">";n.SYMBOL=i},function(r,t,e){"use strict";function n(r,t){return t>=r}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL="<=";n.SYMBOL=i},function(r,t,e){"use strict";function n(r,t){return t>r}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL="<";n.SYMBOL=i},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var u=e.reduce(function(r,t){return r-(0,i.toNumber)(t)},(0,i.toNumber)(r));if(isNaN(u))throw Error(o.ERROR_VALUE);return u}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=n;var i=e(3),o=e(1),u=t.SYMBOL="-";n.SYMBOL=u},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var u=e.reduce(function(r,t){return r*(0,i.toNumber)(t)},(0,i.toNumber)(r));if(isNaN(u))throw Error(o.ERROR_VALUE);return u}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=n;var i=e(3),o=e(1),u=t.SYMBOL="*";n.SYMBOL=u},function(r,t,e){"use strict";function n(r,t){return r!==t}t.__esModule=!0,t["default"]=n;var i=t.SYMBOL="<>";n.SYMBOL=i},function(r,t,e){"use strict";function n(r,t){var e=Math.pow((0,i.toNumber)(r),(0,i.toNumber)(t));if(isNaN(e))throw Error(o.ERROR_VALUE);return e}t.__esModule=!0,t.SYMBOL=void 0,t["default"]=n;var i=e(3),o=e(1),u=t.SYMBOL="^";n.SYMBOL=u},function(r,t,e){"use strict";function n(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return r=r.substring(t,r.length-t)}t.__esModule=!0,t.trimEdges=n},function(r,t,e){function n(r,t){return r.reduce(function(r,e){return t*r+e},0)}function i(r,t,e,n,i){i||(i=-1);var o,u=2/r;if(0===t)return e;if(1===t)return n;for(var a=1;a!=t;++a)o=n*a*u+i*e,e=n,n=o;return n}function o(r,t,e,n,o){return function(u,a){if(0===a)return r(u);if(1===a)return t(u);if(0>a)throw e+": Order ("+a+") must be nonnegative";if(1==n&&0===u)throw e+": Undefined when x == 0";if(2==n&&0>=u)throw e+": Undefined when x <= 0";var s=r(u),l=t(u);return i(u,a,s,l,o)}}var u=Math,a=function(){function r(r){var t,i,f,c=r*r,p=u.abs(r)-.785398164;return u.abs(r)<8?(i=n(e,c),f=n(o,c),t=i/f):(c=64/c,i=n(a,c),f=n(s,c),t=u.sqrt(l/u.abs(r))*(u.cos(p)*i-u.sin(p)*f*8/u.abs(r))),t}function t(r){var t,e,i,o=r*r,a=u.abs(r)-2.356194491;return Math.abs(r)<8?(e=r*n(f,o),i=n(c,o),t=e/i):(o=64/o,e=n(p,o),i=n(m,o),t=u.sqrt(l/u.abs(r))*(u.cos(a)*e-u.sin(a)*i*8/u.abs(r)),0>r&&(t=-t)),t}var e=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),o=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),a=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),s=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),l=.636619772,f=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),c=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),p=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),m=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return function(e,n){if(n=Math.round(n),0===n)return r(u.abs(e));if(1===n)return t(u.abs(e));if(0>n)throw"BESSELJ: Order ("+n+") must be nonnegative";if(0===u.abs(e))return 0;var o,a,s,l,f,c,p,m,h=2/u.abs(e);if(u.abs(e)>n)o=i(e,n,r(u.abs(e)),t(u.abs(e)),-1);else{for(s=2*u.floor((n+u.floor(u.sqrt(40*n)))/2),l=0,c=o=f=0,p=1,a=s;a>0;a--)m=a*h*p-c,c=p,p=m,u.abs(p)>1e10&&(p*=1e-10,c*=1e-10,o*=1e-10,f*=1e-10),l&&(f+=p),l=!l,a==n&&(o=c);f=2*f-p,o/=f}return 0>e&&n%2?-o:o}}(),s=function(){function r(r){var t,o,c,p=r*r,m=r-.785398164;return 8>r?(o=n(e,p),c=n(i,p),t=o/c+f*a(r,0)*u.log(r)):(p=64/p,o=n(s,p),c=n(l,p),t=u.sqrt(f/r)*(u.sin(m)*o+u.cos(m)*c*8/r)),t}function t(r){var t,e,i,o=r*r,s=r-2.356194491;return 8>r?(e=r*n(c,o),i=n(p,o),t=e/i+f*(a(r,1)*u.log(r)-1/r)):(o=64/o,e=n(m,o),i=n(h,o),t=u.sqrt(f/r)*(u.sin(s)*e+u.cos(s)*i*8/r)),t}var e=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),i=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),s=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),l=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),f=.636619772,c=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),p=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),m=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),h=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return o(r,t,"BESSELY",1,-1)}(),l=function(){function r(r){return r>3.75?u.exp(u.abs(r))/u.sqrt(u.abs(r))*n(i,3.75/u.abs(r)):n(e,r*r/14.0625)}function t(r){return 3.75>r?r*n(o,r*r/14.0625):(0>r?-1:1)*u.exp(u.abs(r))/u.sqrt(u.abs(r))*n(a,3.75/u.abs(r))}var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),i=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),o=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),a=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();return function s(e,n){if(n=Math.round(n),0===n)return r(e);if(1==n)return t(e);if(0>n)throw"BESSELI Order ("+n+") must be nonnegative";if(0===u.abs(e))return 0;var i,o,a,l,f,c,p=2/u.abs(e);for(a=2*u.round((n+u.round(u.sqrt(40*n)))/2),l=i=0,f=1,o=a;o>0;o--)c=o*p*f+l,l=f,f=c,u.abs(f)>1e10&&(f*=1e-10,l*=1e-10,i*=1e-10),o==n&&(i=l);return i*=s(e,0)/f,0>e&&n%2?-i:i}}(),f=function(){function r(r){return r>2?u.exp(-r)/u.sqrt(r)*n(i,2/r):-u.log(r/2)*l(r,0)+n(e,r*r/4)}function t(r){return r>2?u.exp(-r)/u.sqrt(r)*n(s,2/r):u.log(r/2)*l(r,1)+1/r*n(a,r*r/4)}var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),i=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),a=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),s=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return o(r,t,"BESSELK",2,1)}();t.besselj=a,t.bessely=s,t.besseli=l,t.besselk=f},function(r,t,e){var n=[e(34),e(35),e(11),e(37),e(4),e(8),e(6),e(36),e(7),e(38),e(5),e(12)];for(var i in n){var o=n[i];for(var u in o)t[u]=t[u]||o[u]}},function(r,t,e){function n(r,t){if(t)for(var e in t)r[e]=t[e];return r}var i=e(4),o=e(5),u=e(11),a=e(6);t.BETADIST=o.BETA.DIST,t.BETAINV=o.BETA.INV,t.BINOMDIST=o.BINOM.DIST,t.CEILING=t.ISOCEILING=n(i.CEILING.MATH,i.CEILING),t.CEILINGMATH=i.CEILING.MATH,t.CEILINGPRECISE=i.CEILING.PRECISE,t.CHIDIST=o.CHISQ.DIST,t.CHIDISTRT=o.CHISQ.DIST.RT,t.CHIINV=o.CHISQ.INV,t.CHIINVRT=o.CHISQ.INV.RT,t.CHITEST=o.CHISQ.TEST,t.CONFIDENCE=n(o.CONFIDENCE.NORM,o.CONFIDENCE),t.COVAR=o.COVARIANCE.P,t.COVARIANCEP=o.COVARIANCE.P,t.COVARIANCES=o.COVARIANCE.S,t.CRITBINOM=o.BINOM.INV,t.EXPONDIST=o.EXPON.DIST,t.ERFCPRECISE=u.ERFC.PRECISE,t.ERFPRECISE=u.ERF.PRECISE,t.FDIST=o.F.DIST,t.FDISTRT=o.F.DIST.RT,t.FINVRT=o.F.INV.RT,t.FINV=o.F.INV,t.FLOOR=n(i.FLOOR.MATH,i.FLOOR),t.FLOORMATH=i.FLOOR.MATH,t.FLOORPRECISE=i.FLOOR.PRECISE,t.FTEST=o.F.TEST,t.GAMMADIST=o.GAMMA.DIST,t.GAMMAINV=o.GAMMA.INV,t.GAMMALNPRECISE=o.GAMMALN.PRECISE,t.HYPGEOMDIST=o.HYPGEOM.DIST,t.LOGINV=o.LOGNORM.INV,t.LOGNORMINV=o.LOGNORM.INV,t.LOGNORMDIST=o.LOGNORM.DIST,t.MODE=n(o.MODE.SNGL,o.MODE),t.MODEMULT=o.MODE.MULT,t.MODESNGL=o.MODE.SNGL,t.NEGBINOMDIST=o.NEGBINOM.DIST,t.NETWORKDAYSINTL=a.NETWORKDAYS.INTL,t.NORMDIST=o.NORM.DIST,t.NORMINV=o.NORM.INV,t.NORMSDIST=o.NORM.S.DIST,t.NORMSINV=o.NORM.S.INV,t.PERCENTILE=n(o.PERCENTILE.EXC,o.PERCENTILE),t.PERCENTILEEXC=o.PERCENTILE.EXC,t.PERCENTILEINC=o.PERCENTILE.INC,t.PERCENTRANK=n(o.PERCENTRANK.INC,o.PERCENTRANK),t.PERCENTRANKEXC=o.PERCENTRANK.EXC,t.PERCENTRANKINC=o.PERCENTRANK.INC,t.POISSON=n(o.POISSON.DIST,o.POISSON),t.POISSONDIST=o.POISSON.DIST,t.QUARTILE=n(o.QUARTILE.INC,o.QUARTILE),t.QUARTILEEXC=o.QUARTILE.EXC,t.QUARTILEINC=o.QUARTILE.INC,t.RANK=n(o.RANK.EQ,o.RANK),t.RANKAVG=o.RANK.AVG,t.RANKEQ=o.RANK.EQ,t.SKEWP=o.SKEW.P,t.STDEV=n(o.STDEV.S,o.STDEV),t.STDEVP=o.STDEV.P,t.STDEVS=o.STDEV.S,t.TDIST=o.T.DIST,t.TDISTRT=o.T.DIST.RT,t.TINV=o.T.INV,t.TTEST=o.T.TEST,t.VAR=n(o.VAR.S,o.VAR),t.VARP=o.VAR.P,t.VARS=o.VAR.S,t.WEIBULL=n(o.WEIBULL.DIST,o.WEIBULL),t.WEIBULLDIST=o.WEIBULL.DIST,t.WORKDAYINTL=a.WORKDAY.INTL,t.ZTEST=o.Z.TEST},function(module,exports,__webpack_require__){function compact(r){var t=[];return utils.arrayEach(r,function(r){r&&t.push(r)}),t}function findResultIndex(database,criterias){for(var matches={},i=1;database[0].length>i;++i)matches[i]=!0;var maxCriteriaLength=criterias[0].length;for(i=1;criterias.length>i;++i)criterias[i].length>maxCriteriaLength&&(maxCriteriaLength=criterias[i].length);for(var k=1;database.length>k;++k)for(var l=1;database[k].length>l;++l){for(var currentCriteriaResult=!1,hasMatchingCriteria=!1,j=0;criterias.length>j;++j){var criteria=criterias[j];if(criteria.length>=maxCriteriaLength){var criteriaField=criteria[0];if(database[k][0]===criteriaField){hasMatchingCriteria=!0;for(var p=1;criteria.length>p;++p)currentCriteriaResult=currentCriteriaResult||eval(database[k][l]+criteria[p])}}}hasMatchingCriteria&&(matches[l]=matches[l]&¤tCriteriaResult)}for(var result=[],n=0;database[0].length>n;++n)matches[n]&&result.push(n-1);return result}var error=__webpack_require__(0),stats=__webpack_require__(5),maths=__webpack_require__(4),utils=__webpack_require__(2);exports.FINDFIELD=function(r,t){var e=null;return utils.arrayEach(r,function(r,n){if(r[0]===t)return e=n,!1}),null==e?error.value:e},exports.DAVERAGE=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=0;return utils.arrayEach(n,function(r){u+=i[r]}),0===n.length?error.div0:u/n.length},exports.DCOUNT=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),stats.COUNT(u)},exports.DCOUNTA=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),stats.COUNTA(u)},exports.DGET=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);return 0===n.length?error.value:n.length>1?error.num:i[n[0]]},exports.DMAX=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=i[n[0]];return utils.arrayEach(n,function(r){i[r]>u&&(u=i[r])}),u},exports.DMIN=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=i[n[0]];return utils.arrayEach(n,function(r){u>i[r]&&(u=i[r])}),u},exports.DPRODUCT=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];utils.arrayEach(n,function(r){u.push(i[r])}),u=compact(u);var a=1;return utils.arrayEach(u,function(r){a*=r}),a},exports.DSTDEV=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),u=compact(u),stats.STDEV.S(u)},exports.DSTDEVP=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),u=compact(u),stats.STDEV.P(u)},exports.DSUM=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[]; -if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),maths.SUM(u)},exports.DVAR=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),stats.VAR.S(u)},exports.DVARP=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),i=[];if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=utils.rest(r[t]);var u=[];return utils.arrayEach(n,function(r){u.push(i[r])}),stats.VAR.P(u)}},function(r,t,e){function n(r){return r&&r.getTime&&!isNaN(r.getTime())}function i(r){return r instanceof Date?r:new Date(r)}var o=e(0),u=e(6),a=e(2);t.ACCRINT=function(r,t,e,a,s,l,f){return r=i(r),t=i(t),e=i(e),n(r)&&n(t)&&n(e)?a>0&&s>0?[1,2,4].indexOf(l)===-1?o.num:[0,1,2,3,4].indexOf(f)===-1?o.num:e>r?(s=s||0,f=f||0,s*a*u.YEARFRAC(r,e,f)):o.num:o.num:o.value},t.ACCRINTM=function(){throw Error("ACCRINTM is not implemented")},t.AMORDEGRC=function(){throw Error("AMORDEGRC is not implemented")},t.AMORLINC=function(){throw Error("AMORLINC is not implemented")},t.COUPDAYBS=function(){throw Error("COUPDAYBS is not implemented")},t.COUPDAYS=function(){throw Error("COUPDAYS is not implemented")},t.COUPDAYSNC=function(){throw Error("COUPDAYSNC is not implemented")},t.COUPNCD=function(){throw Error("COUPNCD is not implemented")},t.COUPNUM=function(){throw Error("COUPNUM is not implemented")},t.COUPPCD=function(){throw Error("COUPPCD is not implemented")},t.CUMIPMT=function(r,e,n,i,u,s){if(r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return o.value;if(0>=r||0>=e||0>=n)return o.num;if(1>i||1>u||i>u)return o.num;if(0!==s&&1!==s)return o.num;var l=t.PMT(r,e,n,0,s),f=0;1===i&&0===s&&(f=-n,i++);for(var c=i;u>=c;c++)f+=1===s?t.FV(r,c-2,l,n,1)-l:t.FV(r,c-1,l,n,0);return f*=r},t.CUMPRINC=function(r,e,n,i,u,s){if(r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return o.value;if(0>=r||0>=e||0>=n)return o.num;if(1>i||1>u||i>u)return o.num;if(0!==s&&1!==s)return o.num;var l=t.PMT(r,e,n,0,s),f=0;1===i&&(f=0===s?l+n*r:l,i++);for(var c=i;u>=c;c++)f+=s>0?l-(t.FV(r,c-2,l,n,1)-l)*r:l-t.FV(r,c-1,l,n,0)*r;return f},t.DB=function(r,t,e,n,i){if(i=void 0===i?12:i,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i))return o.value;if(0>r||0>t||0>e||0>n)return o.num;if([1,2,3,4,5,6,7,8,9,10,11,12].indexOf(i)===-1)return o.num;if(n>e)return o.num;if(t>=r)return 0;for(var u=(1-Math.pow(t/r,1/e)).toFixed(3),s=r*u*i/12,l=s,f=0,c=n===e?e-1:n,p=2;c>=p;p++)f=(r-l)*u,l+=f;return 1===n?s:n===e?(r-l)*u:f},t.DDB=function(r,t,e,n,i){if(i=void 0===i?2:i,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i))return o.value;if(0>r||0>t||0>e||0>n||0>=i)return o.num;if(n>e)return o.num;if(t>=r)return 0;for(var u=0,s=0,l=1;n>=l;l++)s=Math.min((r-u)*(i/e),r-t-u),u+=s;return s},t.DISC=function(){throw Error("DISC is not implemented")},t.DOLLARDE=function(r,t){if(r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t))return o.value;if(0>t)return o.num;if(t>=0&&1>t)return o.div0;t=parseInt(t,10);var e=parseInt(r,10);e+=r%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var n=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return e=Math.round(e*n)/n},t.DOLLARFR=function(r,t){if(r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t))return o.value;if(0>t)return o.num;if(t>=0&&1>t)return o.div0;t=parseInt(t,10);var e=parseInt(r,10);return e+=r%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},t.DURATION=function(){throw Error("DURATION is not implemented")},t.EFFECT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?o.value:0>=r||1>t?o.num:(t=parseInt(t,10),Math.pow(1+r/t,t)-1)},t.FV=function(r,t,e,n,i){if(n=n||0,i=i||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i))return o.value;var u;if(0===r)u=n+e*t;else{var s=Math.pow(1+r,t);u=1===i?n*s+e*(1+r)*(s-1)/r:n*s+e*(s-1)/r}return-u},t.FVSCHEDULE=function(r,t){if(r=a.parseNumber(r),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(r,t))return o.value;for(var e=t.length,n=r,i=0;e>i;i++)n*=1+t[i];return n},t.INTRATE=function(){throw Error("INTRATE is not implemented")},t.IPMT=function(r,e,n,i,u,s){if(u=u||0,s=s||0,r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),u=a.parseNumber(u),s=a.parseNumber(s),a.anyIsError(r,e,n,i,u,s))return o.value;var l,f=t.PMT(r,n,i,u,s);return l=1===e?1===s?0:-i:1===s?t.FV(r,e-2,f,i,1)-f:t.FV(r,e-1,f,i,0),l*r},t.IRR=function(r,t){if(t=t||0,r=a.parseNumberArray(a.flatten(r)),t=a.parseNumber(t),a.anyIsError(r,t))return o.value;for(var e=function(r,t,e){for(var n=e+1,i=r[0],o=1;r.length>o;o++)i+=r[o]/Math.pow(n,(t[o]-t[0])/365);return i},n=function(r,t,e){for(var n=e+1,i=0,o=1;r.length>o;o++){var u=(t[o]-t[0])/365;i-=u*r[o]/Math.pow(n,u+1)}return i},i=[],u=!1,s=!1,l=0;r.length>l;l++)i[l]=0===l?0:i[l-1]+365,r[l]>0&&(u=!0),0>r[l]&&(s=!0);if(!u||!s)return o.num;t=void 0===t?.1:t;var f,c,p,m=t,h=1e-10,d=!0;do p=e(r,i,m),f=m-p/n(r,i,m),c=Math.abs(f-m),m=f,d=c>h&&Math.abs(p)>h;while(d);return m},t.ISPMT=function(r,t,e,n){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,t,e,n)?o.value:n*r*(t/e-1)},t.MDURATION=function(){throw Error("MDURATION is not implemented")},t.MIRR=function(r,e,n){if(r=a.parseNumberArray(a.flatten(r)),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return o.value;for(var i=r.length,u=[],s=[],l=0;i>l;l++)0>r[l]?u.push(r[l]):s.push(r[l]);var f=-t.NPV(n,s)*Math.pow(1+n,i-1),c=t.NPV(e,u)*(1+e);return Math.pow(f/c,1/(i-1))-1},t.NOMINAL=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?o.value:0>=r||1>t?o.num:(t=parseInt(t,10),(Math.pow(r+1,1/t)-1)*t)},t.NPER=function(r,t,e,n,i){if(i=void 0===i?0:i,n=void 0===n?0:n,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i))return o.value;var u=t*(1+r*i)-n*r,s=e*r+t*(1+r*i);return Math.log(u/s)/Math.log(1+r)},t.NPV=function(){var r=a.parseNumberArray(a.flatten(arguments));if(r instanceof Error)return r;for(var t=r[0],e=0,n=1;r.length>n;n++)e+=r[n]/Math.pow(1+t,n);return e},t.ODDFPRICE=function(){throw Error("ODDFPRICE is not implemented")},t.ODDFYIELD=function(){throw Error("ODDFYIELD is not implemented")},t.ODDLPRICE=function(){throw Error("ODDLPRICE is not implemented")},t.ODDLYIELD=function(){throw Error("ODDLYIELD is not implemented")},t.PDURATION=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:r>0?(Math.log(e)-Math.log(t))/Math.log(1+r):o.num},t.PMT=function(r,t,e,n,i){if(n=n||0,i=i||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i))return o.value;var u;if(0===r)u=(e+n)/t;else{var s=Math.pow(1+r,t);u=1===i?(n*r/(s-1)+e*r/(1-1/s))/(1+r):n*r/(s-1)+e*r/(1-1/s)}return-u},t.PPMT=function(r,e,n,i,u,s){return u=u||0,s=s||0,r=a.parseNumber(r),n=a.parseNumber(n),i=a.parseNumber(i),u=a.parseNumber(u),s=a.parseNumber(s),a.anyIsError(r,n,i,u,s)?o.value:t.PMT(r,n,i,u,s)-t.IPMT(r,e,n,i,u,s)},t.PRICE=function(){throw Error("PRICE is not implemented")},t.PRICEDISC=function(){throw Error("PRICEDISC is not implemented")},t.PRICEMAT=function(){throw Error("PRICEMAT is not implemented")},t.PV=function(r,t,e,n,i){return n=n||0,i=i||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),a.anyIsError(r,t,e,n,i)?o.value:0===r?-e*t-n:((1-Math.pow(1+r,t))/r*e*(1+r*i)-n)/Math.pow(1+r,t)},t.RATE=function(r,t,e,n,i,u){if(u=void 0===u?.01:u,n=void 0===n?0:n,i=void 0===i?0:i,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),i=a.parseNumber(i),u=a.parseNumber(u),a.anyIsError(r,t,e,n,i,u))return o.value;var s,l,f,c,p=1e-10,m=50,h=0,d=0,v=0,E=u;for(Math.abs(E)p&&m>v;)E=(f*c-l*h)/(f-l),c=h,h=E,Math.abs(E)n||n>e?o.num:(n=parseInt(n,10),(r-t)*(e-n+1)*2/(e*(e+1)))},t.TBILLEQ=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:e>0?r>t?o.num:t-r>31536e6?o.num:365*e/(360-e*u.DAYS360(r,t,!1)):o.num},t.TBILLPRICE=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:e>0?r>t?o.num:t-r>31536e6?o.num:100*(1-e*u.DAYS360(r,t,!1)/360):o.num},t.TBILLYIELD=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?o.value:e>0?r>t?o.num:t-r>31536e6?o.num:360*(100-e)/(e*u.DAYS360(r,t,!1)):o.num},t.VDB=function(){throw Error("VDB is not implemented")},t.XNPV=function(r,t,e){if(r=a.parseNumber(r),t=a.parseNumberArray(a.flatten(t)),e=a.parseDateArray(a.flatten(e)),a.anyIsError(r,t,e))return o.value;for(var n=0,i=0;t.length>i;i++)n+=t[i]/Math.pow(1+r,u.DAYS(e[i],e[0])/365);return n},t.YIELD=function(){throw Error("YIELD is not implemented")},t.YIELDDISC=function(){throw Error("YIELDDISC is not implemented")},t.YIELDMAT=function(){throw Error("YIELDMAT is not implemented")}},function(r,t,e){var n=e(0),i=e(2),o=e(7);t.AND=function(){for(var r=i.flatten(arguments),t=!0,e=0;r.length>e;e++)r[e]||(t=!1);return t},t.CHOOSE=function(){if(2>arguments.length)return n.na;var r=arguments[0];return 1>r||r>254?n.value:r+1>arguments.length?n.value:arguments[r]},t.FALSE=function(){return!1},t.IF=function(r,t,e){return r?t:e},t.IFERROR=function(r,t){return o.ISERROR(r)?t:r},t.IFNA=function(r,t){return r===n.na?t:r},t.NOT=function(r){return!r},t.OR=function(){for(var r=i.flatten(arguments),t=!1,e=0;r.length>e;e++)r[e]&&(t=!0);return t},t.TRUE=function(){return!0},t.XOR=function(){for(var r=i.flatten(arguments),t=0,e=0;r.length>e;e++)r[e]&&t++;return!!(1&Math.floor(Math.abs(t)))},t.SWITCH=function(){var r;if(arguments.length>0){var t=arguments[0],e=arguments.length-1,i=Math.floor(e/2),o=!1,u=e%2!==0,a=e%2===0?null:arguments[arguments.length-1];if(i)for(var s=0;i>s;s++)if(t===arguments[2*s+1]){r=arguments[2*s+2],o=!0;break}o||(r=u?a:n.na)}else r=n.value;return r}},function(r,t,e){var n=e(0);t.MATCH=function(r,t,e){if(!r&&!t)return n.na;if(2===arguments.length&&(e=1),!(t instanceof Array))return n.na;if(e!==-1&&0!==e&&1!==e)return n.na;for(var i,o,u=0;t.length>u;u++)if(1===e){if(t[u]===r)return u+1;r>t[u]&&(o?t[u]>o&&(i=u+1,o=t[u]):(i=u+1,o=t[u]))}else if(0===e){if("string"==typeof r){if(r=r.replace(/\?/g,"."),t[u].toLowerCase().match(r.toLowerCase()))return u+1}else if(t[u]===r)return u+1}else if(e===-1){if(t[u]===r)return u+1;t[u]>r&&(o?o>t[u]&&(i=u+1,o=t[u]):(i=u+1,o=t[u]))}return i?i:n.na}},function(r,t){/*! +(function(){"use strict";function o(r){this._value=r}function a(r){var t,e="";for(t=0;r>t;t++)e+="0";return e}function s(r,t){var e,n,u,i,o,s,l,f;return f=""+r,e=f.split("e")[0],i=f.split("e")[1],n=e.split(".")[0],u=e.split(".")[1]||"",+i>0?f=n+u+a(i-u.length):(o=0>+n?"-0":"0",t>0&&(o+="."),l=a(-1*i-1),s=(l+Math.abs(n)+u).substr(0,t),f=o+s),+i>0&&t>0&&(f+="."+a(t)),f}function l(r,t,e,n){var u,i,o=Math.pow(10,t);return(""+r).indexOf("e")>-1?(i=s(r,t),"-"!==i.charAt(0)||0>+i||(i=i.substr(1))):i=(e(r+"e+"+t)/o).toFixed(t),n&&(u=RegExp("0{1,"+n+"}$"),i=i.replace(u,"")),i}function f(r,t,e){var n=t.replace(/\{[^\{\}]*\}/g,"");return n.indexOf("$")>-1?p(r,S[$].currency.symbol,t,e):n.indexOf("%")>-1?d(r,t,e):n.indexOf(":")>-1?h(r,t):v(r._value,t,e)}function c(r,t){var e,n,u,i,o,a=t,s=!1;if(t.indexOf(":")>-1)r._value=E(t);else if(t===C)r._value=0;else{for("."!==S[$].delimiters.decimal&&(t=t.replace(/\./g,"").replace(S[$].delimiters.decimal,".")),e=RegExp("[^a-zA-Z]"+S[$].abbreviations.thousand+"(?:\\)|(\\"+S[$].currency.symbol+")?(?:\\))?)?$"),n=RegExp("[^a-zA-Z]"+S[$].abbreviations.million+"(?:\\)|(\\"+S[$].currency.symbol+")?(?:\\))?)?$"),u=RegExp("[^a-zA-Z]"+S[$].abbreviations.billion+"(?:\\)|(\\"+S[$].currency.symbol+")?(?:\\))?)?$"),i=RegExp("[^a-zA-Z]"+S[$].abbreviations.trillion+"(?:\\)|(\\"+S[$].currency.symbol+")?(?:\\))?)?$"),o=1;A.length>o&&!s;++o)t.indexOf(A[o])>-1?s=Math.pow(1024,o):t.indexOf(R[o])>-1&&(s=Math.pow(1e3,o));var l=t.replace(/[^0-9\.]+/g,"");""===l?r._value=NaN:(r._value=(s?s:1)*(a.match(e)?Math.pow(10,3):1)*(a.match(n)?Math.pow(10,6):1)*(a.match(u)?Math.pow(10,9):1)*(a.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*+l,r._value=s?Math.ceil(r._value):r._value)}return r._value}function p(r,t,e,n){var u,i,o=e,a=o.indexOf("$"),s=o.indexOf("("),l=o.indexOf("+"),f=o.indexOf("-"),c="",p="";if(o.indexOf("$")===-1?"infix"===S[$].currency.position?(p=t,S[$].currency.spaceSeparated&&(p=" "+p+" ")):S[$].currency.spaceSeparated&&(c=" "):o.indexOf(" $")>-1?(c=" ",o=o.replace(" $","")):o.indexOf("$ ")>-1?(c=" ",o=o.replace("$ ","")):o=o.replace("$",""),i=v(r._value,o,n,p),e.indexOf("$")===-1)switch(S[$].currency.position){case"postfix":i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,c+t),i=i.join("")):i=i+c+t;break;case"infix":break;case"prefix":i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),u=Math.max(s,f)+1,i.splice(u,0,t+c),i=i.join("")):i=t+c+i;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else a>1?i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,c+t),i=i.join("")):i=i+c+t:i.indexOf("(")>-1||i.indexOf("+")>-1||i.indexOf("-")>-1?(i=i.split(""),u=1,(s>a||l>a||f>a)&&(u=0),i.splice(u,0,t+c),i=i.join("")):i=t+c+i;return i}function m(r,t,e,n){return p(r,t,e,n)}function d(r,t,e){var n,u="",i=100*r._value;return t.indexOf(" %")>-1?(u=" ",t=t.replace(" %","")):t=t.replace("%",""),n=v(i,t,e),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,u+"%"),n=n.join("")):n=n+u+"%",n}function h(r){var t=Math.floor(r._value/60/60),e=Math.floor((r._value-60*t*60)/60),n=Math.round(r._value-60*t*60-60*e);return t+":"+(10>e?"0"+e:e)+":"+(10>n?"0"+n:n)}function E(r){var t=r.split(":"),e=0;return 3===t.length?(e+=60*+t[0]*60,e+=60*+t[1],e+=+t[2]):2===t.length&&(e+=60*+t[0],e+=+t[1]),+e}function g(r,t,e){var n,u,i,o=t[0],a=Math.abs(r);if(a>=e){for(n=1;t.length>n;++n)if(u=Math.pow(e,n),i=Math.pow(e,n+1),a>=u&&i>a){o=t[n],r/=u;break}o===t[0]&&(r/=Math.pow(e,t.length-1),o=t[t.length-1])}return{value:r,suffix:o}}function v(r,t,e,n){var u,i,o,s,f,c,p,m,d,h,E,v,N,b,y,I,w,M=!1,A=!1,R=!1,T="",O=!1,V=!1,D=!1,L=!1,_=!1,P="",U="",F=Math.abs(r),B="",j=!1,k=!1,G="";if(0===r&&null!==C)return C;if(!isFinite(r))return""+r;if(0===t.indexOf("{")){var Y=t.indexOf("}");if(Y===-1)throw Error('Format should also contain a "}"');h=t.slice(1,Y),t=t.slice(Y+1)}else h="";if(t.indexOf("}")===t.length-1){var W=t.indexOf("{");if(W===-1)throw Error('Format should also contain a "{"');E=t.slice(W+1,-1),t=t.slice(0,W+1)}else E="";var H;for(H=t.match(t.indexOf(".")===-1?/([0-9]+).*/:/([0-9]+)\..*/),I=null===H?-1:H[1].length,t.indexOf("-")!==-1&&(j=!0),t.indexOf("(")>-1?(M=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(A=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(m=t.split(".")[0].match(/[0-9]+/g)||["0"],m=parseInt(m[0],10),O=t.indexOf("aK")>=0,V=t.indexOf("aM")>=0,D=t.indexOf("aB")>=0,L=t.indexOf("aT")>=0,_=O||V||D||L,t.indexOf(" a")>-1?(T=" ",t=t.replace(" a","")):t=t.replace("a",""),o=Math.floor(Math.log(F)/Math.LN10)+1,f=o%3,f=0===f?3:f,m&&0!==F&&(s=Math.floor(Math.log(F)/Math.LN10)+1-m,c=3*~~((Math.min(m,o)-f)/3),F/=Math.pow(10,c),t.indexOf(".")===-1&&m>3&&(t+="[.]",b=0===s?0:3*~~(s/3)-s,b=0>b?b+3:b,t+=a(b))),Math.floor(Math.log(Math.abs(r))/Math.LN10)+1!==m&&(F>=Math.pow(10,12)&&!_||L?(T+=S[$].abbreviations.trillion,r/=Math.pow(10,12)):F=Math.pow(10,9)&&!_||D?(T+=S[$].abbreviations.billion,r/=Math.pow(10,9)):F=Math.pow(10,6)&&!_||V?(T+=S[$].abbreviations.million,r/=Math.pow(10,6)):(F=Math.pow(10,3)&&!_||O)&&(T+=S[$].abbreviations.thousand,r/=Math.pow(10,3)))),w=0;x.length>w;++w)if(u=x[w],t.indexOf(u.marker)>-1){t.indexOf(" "+u.marker)>-1&&(P=" "),t=t.replace(P+u.marker,""),i=g(r,u.suffixes,u.scale),r=i.value,P+=i.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(U=" ",t=t.replace(" o","")):t=t.replace("o",""),S[$].ordinal&&(U+=S[$].ordinal(r))),t.indexOf("[.]")>-1&&(R=!0,t=t.replace("[.]",".")),p=(""+r).split(".")[0],d=t.split(".")[1],v=t.indexOf(","),d){if(d.indexOf("*")!==-1?B=l(r,(""+r).split(".")[1].length,e):d.indexOf("[")>-1?(d=d.replace("]",""),d=d.split("["),B=l(r,d[0].length+d[1].length,e,d[1].length)):B=l(r,d.length,e),p=B.split(".")[0],B.split(".")[1].length){B=(n?T+n:S[$].delimiters.decimal)+B.split(".")[1]}else B="";R&&0==+B.slice(1)&&(B="")}else p=l(r,0,e);return p.indexOf("-")>-1&&(p=p.slice(1),k=!0),I>p.length&&(p=a(I-p.length)+p),v>-1&&(p=(""+p).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+S[$].delimiters.thousands)),0===t.indexOf(".")&&(p=""),N=t.indexOf("("),y=t.indexOf("-"),G=y>N?(M&&k?"(":"")+(j&&k||!M&&k?"-":""):(j&&k||!M&&k?"-":"")+(M&&k?"(":""),h+G+(!k&&A&&0!==r?"+":"")+p+B+(U?U:"")+(T&&!n?T:"")+(P?P:"")+(M&&k?")":"")+E}function N(r,t){S[r]=t}function b(r){$=r;var t=S[r].defaults;t&&t.format&&M.defaultFormat(t.format),t&&t.currencyFormat&&M.defaultCurrencyFormat(t.currencyFormat)}function y(){return void 0!==n&&n.browser===undefined&&n.title&&(0===n.title.indexOf("node")||n.title.indexOf("meteor-tool")>0||"grunt"===n.title||"gulp"===n.title)&&!0}function I(r){var t=(""+r).split(".");return 2>t.length?1:Math.pow(10,t[1].length)}function w(){return Array.prototype.slice.call(arguments).reduce(function(r,t){var e=I(r),n=I(t);return e>n?e:n},-Infinity)}var M,A=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],R=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],T={general:{scale:1024,suffixes:R,marker:"bd"},binary:{scale:1024,suffixes:A,marker:"b"},decimal:{scale:1e3,suffixes:R,marker:"d"}},x=[T.general,T.binary,T.decimal],S={},O=S,$="en-US",C=null,V="0,0",D="0$",L=void 0!==r&&r.exports,_={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}};M=function(r){return M.isNumbro(r)?r=r.value():0===r||void 0===r?r=0:+r||(r=M.fn.unformat(r)),new o(+r)},M.version="1.9.3",M.isNumbro=function(r){return r instanceof o},M.setLanguage=function(r,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var e=r,n=r.split("-")[0],u=null;O[e]||(Object.keys(O).forEach(function(r){u||r.split("-")[0]!==n||(u=r)}),e=u||t||"en-US"),b(e)},M.setCulture=function(r,t){var e=r,n=r.split("-")[1],u=null;S[e]||(n&&Object.keys(S).forEach(function(r){u||r.split("-")[1]!==n||(u=r)}),e=u||t||"en-US"),b(e)},M.language=function(r,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!r)return $;if(r&&!t){if(!O[r])throw Error("Unknown language : "+r);b(r)}return!t&&O[r]||N(r,t),M},M.culture=function(r,t){if(!r)return $;if(r&&!t){if(!S[r])throw Error("Unknown culture : "+r);b(r)}return!t&&S[r]||N(r,t),M},M.languageData=function(r){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!r)return O[$];if(!O[r])throw Error("Unknown language : "+r);return O[r]},M.cultureData=function(r){if(!r)return S[$];if(!S[r])throw Error("Unknown culture : "+r);return S[r]},M.culture("en-US",_),M.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),O},M.cultures=function(){return S},M.zeroFormat=function(r){C="string"==typeof r?r:null},M.defaultFormat=function(r){V="string"==typeof r?r:"0.0"},M.defaultCurrencyFormat=function(r){D="string"==typeof r?r:"0$"},M.validate=function(r,t){var e,n,u,i,o,a,s,l;if("string"!=typeof r&&(r+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",r)),r=r.trim(),r=r.replace(/^[+-]?/,""),r.match(/^\d+$/))return!0;if(""===r)return!1;try{s=M.cultureData(t)}catch(f){s=M.cultureData(M.culture())}return u=s.currency.symbol,o=s.abbreviations,e=s.delimiters.decimal,n="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,!(null!==(l=r.match(/^[^\d\.\,]+/))&&(r=r.substr(1),l[0]!==u)||null!==(l=r.match(/[^\d]+$/))&&(r=r.slice(0,-1),l[0]!==o.thousand&&l[0]!==o.million&&l[0]!==o.billion&&l[0]!==o.trillion)||(a=RegExp(n+"{2}"),r.match(/[^\d.,]/g)||(i=r.split(e),i.length>2||(2>i.length?!i[0].match(/^\d+.*\d$/)||i[0].match(a):""===i[0]?i[0].match(a)||!i[1].match(/^\d+$/):1===i[0].length?!i[0].match(/^\d+$/)||i[0].match(a)||!i[1].match(/^\d+$/):!i[0].match(/^\d+.*\d$/)||i[0].match(a)||!i[1].match(/^\d+$/)))))},M.loadLanguagesInNode=function(){console.warn("`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead"),M.loadCulturesInNode()},M.loadCulturesInNode=function(){var r=e(58);for(var t in r)t&&M.culture(t,r[t])},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(r,t){if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof r)throw new TypeError(r+" is not a function");var e,n,u=this.length>>>0,i=!1;for(arguments.length>1&&(n=t,i=!0),e=0;u>e;++e)this.hasOwnProperty(e)&&(i?n=r(n,this[e],e,this):(n=this[e],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return n}),M.fn=o.prototype={clone:function(){return M(this)},format:function(r,t){return f(this,r?r:V,t!==undefined?t:Math.round)},formatCurrency:function(r,t){return p(this,S[$].currency.symbol,r?r:D,t!==undefined?t:Math.round)},formatForeignCurrency:function(r,t,e){return m(this,r,t?t:D,e!==undefined?e:Math.round)},unformat:function(r){if("number"==typeof r)return r;if("string"==typeof r){var t=c(this,r);return isNaN(t)?undefined:t}return undefined},binaryByteUnits:function(){return g(this._value,T.binary.suffixes,T.binary.scale).suffix},byteUnits:function(){return g(this._value,T.general.suffixes,T.general.scale).suffix},decimalByteUnits:function(){return g(this._value,T.decimal.suffixes,T.decimal.scale).suffix},value:function(){return this._value},valueOf:function(){return this._value},set:function(r){return this._value=+r,this},add:function(r){function t(r,t){return r+e*t}var e=w.call(null,this._value,r);return this._value=[this._value,r].reduce(t,0)/e,this},subtract:function(r){function t(r,t){return r-e*t}var e=w.call(null,this._value,r);return this._value=[r].reduce(t,this._value*e)/e,this},multiply:function(r){function t(r,t){var e=w(r,t),n=r*e;return n*=t*e,n/=e*e}return this._value=[this._value,r].reduce(t,1),this},divide:function(r){function t(r,t){var e=w(r,t);return r*e/(t*e)}return this._value=[this._value,r].reduce(t),this},difference:function(r){return Math.abs(M(this._value).subtract(r).value())}},y()&&M.loadCulturesInNode(),L?r.exports=M:("undefined"==typeof ender&&(this.numbro=M),u=[],(i=function(){return M}.apply(t,u))!==undefined&&(r.exports=i))}).call("undefined"==typeof window?this:window)}).call(t,e(15))},function(r,t){function e(){throw Error("setTimeout has not been defined")}function n(){throw Error("clearTimeout has not been defined")}function u(r){if(f===setTimeout)return setTimeout(r,0);if((f===e||!f)&&setTimeout)return f=setTimeout,setTimeout(r,0);try{return f(r,0)}catch(t){try{return f.call(null,r,0)}catch(e){return f.call(this,r,0)}}}function i(r){if(c===clearTimeout)return clearTimeout(r);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(r);try{return c(r)}catch(t){try{return c.call(null,r)}catch(e){return c.call(this,r)}}}function o(){h&&m&&(h=!1,m.length?d=m.concat(d):E=-1,d.length&&a())}function a(){if(!h){var r=u(o);h=!0;for(var t=d.length;t;){for(m=d,d=[];++E1)for(var e=1;arguments.length>e;e++)t[e-1]=arguments[e];d.push(new s(r,t)),1!==d.length||h||u(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(r){throw Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(r){throw Error("process.chdir is not supported")},p.umask=function(){return 0}},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}function u(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function i(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?r:t}function o(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}t.__esModule=!0;var a=e(78),s=n(a),l=e(17),f=n(l),c=e(80),p=e(31),m=e(3),d=e(1),h=n(d),E=e(9);t["default"]=function(r){function t(){u(this,t);var e=i(this,r.call(this));return e.parser=new c.Parser,e.parser.yy={toNumber:m.toNumber,trimEdges:p.trimEdges,invertNumber:m.invertNumber,throwError:function(r){return e._throwError(r)},callVariable:function(r){return e._callVariable(r)},evaluateByOperator:f["default"],callFunction:f["default"],cellValue:function(r){return e._callCellValue(r)},rangeValue:function(r,t){return e._callRangeValue(r,t)}},e.variables=Object.create(null),e.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),e}return o(t,r),t.prototype.parse=function(r){var t=null,e=null;try{t=""===r?"":this.parser.parse(r)}catch(u){var n=(0,h["default"])(u.message);e=n?n:(0,h["default"])(d.ERROR)}return t instanceof Error&&(e=(0,h["default"])(t.message)||(0,h["default"])(d.ERROR),t=null),{error:e,result:t}},t.prototype.setVariable=function(r,t){return this.variables[r]=t,this},t.prototype.getVariable=function(r){return this.variables[r]},t.prototype._callVariable=function(r){var t=this.getVariable(r);if(this.emit("callVariable",r,function(r){void 0!==r&&(t=r)}),void 0===t)throw Error(d.ERROR_NAME);return t},t.prototype._callCellValue=function(r){r=r.toUpperCase();var t=(0,E.extractLabel)(r),e=t[0],n=t[1],u=void 0;return this.emit("callCellValue",{label:r,row:e,column:n},function(r){u=r}),u},t.prototype._callRangeValue=function(r,t){r=r.toUpperCase(),t=t.toUpperCase();var e=(0,E.extractLabel)(r),n=e[0],u=e[1],i=(0,E.extractLabel)(t),o=i[0],a=i[1],s={},l={};n.index>o.index?(s.row=o,l.row=n):(s.row=n,l.row=o),u.index>a.index?(s.column=a,l.column=u):(s.column=u,l.column=a),s.label=(0,E.toLabel)(s.row,s.column),l.label=(0,E.toLabel)(l.row,l.column);var f=[];return this.emit("callRangeValue",s,l,function(){f=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[]}),f},t.prototype._throwError=function(r){if((0,d.isValidStrict)(r))throw Error(r);throw Error(d.ERROR)},t}(s["default"])},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}function u(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(r=r.toUpperCase(),!V[r])throw Error(C.ERROR_NAME);return V[r].apply(V,t)}function i(r,t){Array.isArray(r)||(r=[r.toUpperCase()]),r.forEach(function(r){V[r]=t.isFactory?t(r):t})}t.__esModule=!0,t["default"]=u,t.registerOperation=i;var o=e(18),a=n(o),s=e(19),l=n(s),f=e(20),c=n(f),p=e(21),m=n(p),d=e(22),h=n(d),E=e(24),g=n(E),v=e(23),N=n(v),b=e(26),y=n(b),I=e(25),w=n(I),M=e(27),A=n(M),R=e(28),T=n(R),x=e(29),S=n(x),O=e(30),$=n(O),C=e(1),V=Object.create(null);i(a["default"].SYMBOL,a["default"]),i(l["default"].SYMBOL,l["default"]),i(c["default"].SYMBOL,c["default"]),i(m["default"].SYMBOL,m["default"]),i($["default"].SYMBOL,$["default"]),i(h["default"].SYMBOL,h["default"]),i(g["default"].SYMBOL,g["default"]),i(N["default"].SYMBOL,N["default"]),i(y["default"].SYMBOL,y["default"]),i(w["default"].SYMBOL,w["default"]),i(T["default"].SYMBOL,T["default"]),i(S["default"].SYMBOL,S["default"]),i(A["default"].SYMBOL,A["default"])},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var o=e.reduce(function(r,t){return r+(0,u.toNumber)(t)},(0,u.toNumber)(r));if(isNaN(o))throw Error(i.ERROR_VALUE);return o}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=n;var u=e(3),i=e(1);n.SYMBOL=t.SYMBOL="+"},function(r,t,e){"use strict";function n(){for(var r=arguments.length,t=Array(r),e=0;r>e;e++)t[e]=arguments[e];return t.reduce(function(r,t){return r+""+t},"")}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL="&"},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var o=e.reduce(function(r,t){return r/(0,u.toNumber)(t)},(0,u.toNumber)(r));if(o===Infinity)throw Error(i.ERROR_DIV_ZERO);if(isNaN(o))throw Error(i.ERROR_VALUE);return o}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=n;var u=e(3),i=e(1);n.SYMBOL=t.SYMBOL="/"},function(r,t,e){"use strict";function n(r,t){return r===t}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL="="},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}function u(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t["default"]=r,t}function i(r){return function(){r=r.toUpperCase();var t=r.split("."),e=!1,n=void 0;if(1===t.length)a[t[0]]&&(e=!0,n=a[t[0]].apply(a,arguments));else{for(var u=t.length,i=0,o=a;u>i;)if(o=o[t[i]],i++,!o){o=null;break}o&&(e=!0,n=o.apply(undefined,arguments))}if(!e)throw Error(f.ERROR_NAME);return n}}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=i;var o=e(33),a=u(o),s=e(10),l=n(s),f=e(1),c=t.SYMBOL=l["default"];i.isFactory=!0,i.SYMBOL=c},function(r,t,e){"use strict";function n(r,t){return r>=t}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL=">="},function(r,t,e){"use strict";function n(r,t){return r>t}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL=">"},function(r,t,e){"use strict";function n(r,t){return t>=r}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL="<="},function(r,t,e){"use strict";function n(r,t){return t>r}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL="<"},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var o=e.reduce(function(r,t){return r-(0,u.toNumber)(t)},(0,u.toNumber)(r));if(isNaN(o))throw Error(i.ERROR_VALUE);return o}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=n;var u=e(3),i=e(1);n.SYMBOL=t.SYMBOL="-"},function(r,t,e){"use strict";function n(r){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;t>n;n++)e[n-1]=arguments[n];var o=e.reduce(function(r,t){return r*(0,u.toNumber)(t)},(0,u.toNumber)(r));if(isNaN(o))throw Error(i.ERROR_VALUE);return o}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=n;var u=e(3),i=e(1);n.SYMBOL=t.SYMBOL="*"},function(r,t,e){"use strict";function n(r,t){return r!==t}t.__esModule=!0,t["default"]=n,n.SYMBOL=t.SYMBOL="<>"},function(r,t,e){"use strict";function n(r,t){var e=Math.pow((0,u.toNumber)(r),(0,u.toNumber)(t));if(isNaN(e))throw Error(i.ERROR_VALUE);return e}t.__esModule=!0,t.SYMBOL=undefined,t["default"]=n;var u=e(3),i=e(1);n.SYMBOL=t.SYMBOL="^"},function(r,t,e){"use strict";function n(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return r=r.substring(t,r.length-t)}t.__esModule=!0,t.trimEdges=n},function(r,t,e){function n(r,t){return r.reduce(function(r,e){return t*r+e},0)}function u(r,t,e,n,u){u||(u=-1);var i,o=2/r;if(0===t)return e;if(1===t)return n;for(var a=1;a!=t;++a)i=n*a*o+u*e,e=n,n=i;return n}function i(r,t,e,n,i){return function(o,a){if(0===a)return r(o);if(1===a)return t(o);if(0>a)throw e+": Order ("+a+") must be nonnegative";if(1==n&&0===o)throw e+": Undefined when x == 0";if(2==n&&0>=o)throw e+": Undefined when x <= 0";return u(o,a,r(o),t(o),i)}}var o=Math,a=function(){function r(r){var t,u,f,c=r*r,p=o.abs(r)-.785398164;return 8>o.abs(r)?(u=n(e,c),f=n(i,c),t=u/f):(c=64/c,u=n(a,c),f=n(s,c),t=o.sqrt(l/o.abs(r))*(o.cos(p)*u-o.sin(p)*f*8/o.abs(r))),t}function t(r){var t,e,u,i=r*r,a=o.abs(r)-2.356194491;return 8>Math.abs(r)?(e=r*n(f,i),u=n(c,i),t=e/u):(i=64/i,e=n(p,i),u=n(m,i),t=o.sqrt(l/o.abs(r))*(o.cos(a)*e-o.sin(a)*u*8/o.abs(r)),0>r&&(t=-t)),t}var e=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),i=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),a=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),s=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),l=.636619772,f=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),c=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),p=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),m=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return function(e,n){if(0===(n=Math.round(n)))return r(o.abs(e));if(1===n)return t(o.abs(e));if(0>n)throw"BESSELJ: Order ("+n+") must be nonnegative";if(0===o.abs(e))return 0;var i,a,s,l,f,c,p,m,d=2/o.abs(e);if(o.abs(e)>n)i=u(e,n,r(o.abs(e)),t(o.abs(e)),-1);else{for(s=2*o.floor((n+o.floor(o.sqrt(40*n)))/2),l=0,c=i=f=0,p=1,a=s;a>0;a--)m=a*d*p-c,c=p,p=m,o.abs(p)>1e10&&(p*=1e-10,c*=1e-10,i*=1e-10,f*=1e-10),l&&(f+=p),l=!l,a==n&&(i=c);f=2*f-p,i/=f}return 0>e&&n%2?-i:i}}(),s=function(){function r(r){var t,i,c,p=r*r,m=r-.785398164;return 8>r?(i=n(e,p),c=n(u,p),t=i/c+f*a(r,0)*o.log(r)):(p=64/p,i=n(s,p),c=n(l,p),t=o.sqrt(f/r)*(o.sin(m)*i+o.cos(m)*c*8/r)),t}function t(r){var t,e,u,i=r*r,s=r-2.356194491;return 8>r?(e=r*n(c,i),u=n(p,i),t=e/u+f*(a(r,1)*o.log(r)-1/r)):(i=64/i,e=n(m,i),u=n(d,i),t=o.sqrt(f/r)*(o.sin(s)*e+o.cos(s)*u*8/r)),t}var e=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),u=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),s=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),l=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),f=.636619772,c=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),p=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),m=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),d=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return i(r,t,"BESSELY",1,-1)}(),l=function(){function r(r){return r>3.75?o.exp(o.abs(r))/o.sqrt(o.abs(r))*n(u,3.75/o.abs(r)):n(e,r*r/14.0625)}function t(r){return 3.75>r?r*n(i,r*r/14.0625):(0>r?-1:1)*o.exp(o.abs(r))/o.sqrt(o.abs(r))*n(a,3.75/o.abs(r))}var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),u=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),i=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),a=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();return function s(e,n){if(0===(n=Math.round(n)))return r(e);if(1==n)return t(e);if(0>n)throw"BESSELI Order ("+n+") must be nonnegative";if(0===o.abs(e))return 0;var u,i,a,l,f,c,p=2/o.abs(e);for(a=2*o.round((n+o.round(o.sqrt(40*n)))/2),l=u=0,f=1,i=a;i>0;i--)c=i*p*f+l,l=f,f=c,o.abs(f)>1e10&&(f*=1e-10,l*=1e-10,u*=1e-10),i==n&&(u=l);return u*=s(e,0)/f,0>e&&n%2?-u:u}}(),f=function(){function r(r){return r>2?o.exp(-r)/o.sqrt(r)*n(u,2/r):-o.log(r/2)*l(r,0)+n(e,r*r/4)}function t(r){return r>2?o.exp(-r)/o.sqrt(r)*n(s,2/r):o.log(r/2)*l(r,1)+1/r*n(a,r*r/4)}var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),u=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),a=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),s=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return i(r,t,"BESSELK",2,1)}();t.besselj=a,t.bessely=s,t.besseli=l,t.besselk=f},function(r,t,e){var n=[e(34),e(35),e(11),e(37),e(4),e(8),e(6),e(36),e(7),e(38),e(5),e(12)];for(var u in n){var i=n[u];for(var o in i)t[o]=t[o]||i[o]}},function(r,t,e){function n(r,t){if(t)for(var e in t)r[e]=t[e];return r}var u=e(4),i=e(5),o=e(11),a=e(6);t.BETADIST=i.BETA.DIST,t.BETAINV=i.BETA.INV,t.BINOMDIST=i.BINOM.DIST,t.CEILING=t.ISOCEILING=n(u.CEILING.MATH,u.CEILING),t.CEILINGMATH=u.CEILING.MATH,t.CEILINGPRECISE=u.CEILING.PRECISE,t.CHIDIST=i.CHISQ.DIST,t.CHIDISTRT=i.CHISQ.DIST.RT,t.CHIINV=i.CHISQ.INV,t.CHIINVRT=i.CHISQ.INV.RT,t.CHITEST=i.CHISQ.TEST,t.CONFIDENCE=n(i.CONFIDENCE.NORM,i.CONFIDENCE),t.COVAR=i.COVARIANCE.P,t.COVARIANCEP=i.COVARIANCE.P,t.COVARIANCES=i.COVARIANCE.S,t.CRITBINOM=i.BINOM.INV,t.EXPONDIST=i.EXPON.DIST,t.ERFCPRECISE=o.ERFC.PRECISE,t.ERFPRECISE=o.ERF.PRECISE,t.FDIST=i.F.DIST,t.FDISTRT=i.F.DIST.RT,t.FINVRT=i.F.INV.RT,t.FINV=i.F.INV,t.FLOOR=n(u.FLOOR.MATH,u.FLOOR),t.FLOORMATH=u.FLOOR.MATH,t.FLOORPRECISE=u.FLOOR.PRECISE,t.FTEST=i.F.TEST,t.GAMMADIST=i.GAMMA.DIST,t.GAMMAINV=i.GAMMA.INV,t.GAMMALNPRECISE=i.GAMMALN.PRECISE,t.HYPGEOMDIST=i.HYPGEOM.DIST,t.LOGINV=i.LOGNORM.INV,t.LOGNORMINV=i.LOGNORM.INV,t.LOGNORMDIST=i.LOGNORM.DIST,t.MODE=n(i.MODE.SNGL,i.MODE),t.MODEMULT=i.MODE.MULT,t.MODESNGL=i.MODE.SNGL,t.NEGBINOMDIST=i.NEGBINOM.DIST,t.NETWORKDAYSINTL=a.NETWORKDAYS.INTL,t.NORMDIST=i.NORM.DIST,t.NORMINV=i.NORM.INV,t.NORMSDIST=i.NORM.S.DIST,t.NORMSINV=i.NORM.S.INV,t.PERCENTILE=n(i.PERCENTILE.EXC,i.PERCENTILE),t.PERCENTILEEXC=i.PERCENTILE.EXC,t.PERCENTILEINC=i.PERCENTILE.INC,t.PERCENTRANK=n(i.PERCENTRANK.INC,i.PERCENTRANK),t.PERCENTRANKEXC=i.PERCENTRANK.EXC,t.PERCENTRANKINC=i.PERCENTRANK.INC,t.POISSON=n(i.POISSON.DIST,i.POISSON),t.POISSONDIST=i.POISSON.DIST,t.QUARTILE=n(i.QUARTILE.INC,i.QUARTILE),t.QUARTILEEXC=i.QUARTILE.EXC,t.QUARTILEINC=i.QUARTILE.INC,t.RANK=n(i.RANK.EQ,i.RANK),t.RANKAVG=i.RANK.AVG,t.RANKEQ=i.RANK.EQ,t.SKEWP=i.SKEW.P,t.STDEV=n(i.STDEV.S,i.STDEV),t.STDEVP=i.STDEV.P,t.STDEVS=i.STDEV.S,t.TDIST=i.T.DIST,t.TDISTRT=i.T.DIST.RT,t.TINV=i.T.INV,t.TTEST=i.T.TEST,t.VAR=n(i.VAR.S,i.VAR),t.VARP=i.VAR.P,t.VARS=i.VAR.S,t.WEIBULL=n(i.WEIBULL.DIST,i.WEIBULL),t.WEIBULLDIST=i.WEIBULL.DIST,t.WORKDAYINTL=a.WORKDAY.INTL,t.ZTEST=i.Z.TEST},function(module,exports,__webpack_require__){function compact(r){var t=[];return utils.arrayEach(r,function(r){r&&t.push(r)}),t}function findResultIndex(database,criterias){for(var matches={},i=1;database[0].length>i;++i)matches[i]=!0;var maxCriteriaLength=criterias[0].length;for(i=1;criterias.length>i;++i)criterias[i].length>maxCriteriaLength&&(maxCriteriaLength=criterias[i].length);for(var k=1;database.length>k;++k)for(var l=1;database[k].length>l;++l){for(var currentCriteriaResult=!1,hasMatchingCriteria=!1,j=0;criterias.length>j;++j){var criteria=criterias[j];if(criteria.length>=maxCriteriaLength){var criteriaField=criteria[0];if(database[k][0]===criteriaField){hasMatchingCriteria=!0;for(var p=1;criteria.length>p;++p)currentCriteriaResult=currentCriteriaResult||eval(database[k][l]+criteria[p])}}}hasMatchingCriteria&&(matches[l]=matches[l]&¤tCriteriaResult)}for(var result=[],n=0;database[0].length>n;++n)matches[n]&&result.push(n-1);return result}var error=__webpack_require__(0),stats=__webpack_require__(5),maths=__webpack_require__(4),utils=__webpack_require__(2);exports.FINDFIELD=function(r,t){var e=null;return utils.arrayEach(r,function(r,n){if(r[0]===t)return e=n,!1}),null==e?error.value:e},exports.DAVERAGE=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=0;return utils.arrayEach(n,function(r){i+=u[r]}),0===n.length?error.div0:i/n.length},exports.DCOUNT=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),stats.COUNT(i)},exports.DCOUNTA=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),stats.COUNTA(i)},exports.DGET=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);return 0===n.length?error.value:n.length>1?error.num:u[n[0]]},exports.DMAX=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=u[n[0]];return utils.arrayEach(n,function(r){u[r]>i&&(i=u[r])}),i},exports.DMIN=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=u[n[0]];return utils.arrayEach(n,function(r){i>u[r]&&(i=u[r])}),i},exports.DPRODUCT=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];utils.arrayEach(n,function(r){i.push(u[r])}),i=compact(i);var o=1;return utils.arrayEach(i,function(r){o*=r}),o},exports.DSTDEV=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),i=compact(i),stats.STDEV.S(i)},exports.DSTDEVP=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),i=compact(i),stats.STDEV.P(i)},exports.DSUM=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),maths.SUM(i)},exports.DVAR=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),stats.VAR.S(i)},exports.DVARP=function(r,t,e){if(isNaN(t)&&"string"!=typeof t)return error.value;var n=findResultIndex(r,e),u=[];if("string"==typeof t){u=utils.rest(r[exports.FINDFIELD(r,t)])}else u=utils.rest(r[t]);var i=[];return utils.arrayEach(n,function(r){i.push(u[r])}),stats.VAR.P(i)}},function(r,t,e){function n(r){return r&&r.getTime&&!isNaN(r.getTime())}function u(r){return r instanceof Date?r:new Date(r)}var i=e(0),o=e(6),a=e(2);t.ACCRINT=function(r,t,e,a,s,l,f){return r=u(r),t=u(t),e=u(e),n(r)&&n(t)&&n(e)?a>0&&s>0?[1,2,4].indexOf(l)===-1?i.num:[0,1,2,3,4].indexOf(f)===-1?i.num:e>r?(s=s||0,f=f||0,s*a*o.YEARFRAC(r,e,f)):i.num:i.num:i.value},t.ACCRINTM=function(){throw Error("ACCRINTM is not implemented")},t.AMORDEGRC=function(){throw Error("AMORDEGRC is not implemented")},t.AMORLINC=function(){throw Error("AMORLINC is not implemented")},t.COUPDAYBS=function(){throw Error("COUPDAYBS is not implemented")},t.COUPDAYS=function(){throw Error("COUPDAYS is not implemented")},t.COUPDAYSNC=function(){throw Error("COUPDAYSNC is not implemented")},t.COUPNCD=function(){throw Error("COUPNCD is not implemented")},t.COUPNUM=function(){throw Error("COUPNUM is not implemented")},t.COUPPCD=function(){throw Error("COUPPCD is not implemented")},t.CUMIPMT=function(r,e,n,u,o,s){if(r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return i.value;if(0>=r||0>=e||0>=n)return i.num;if(1>u||1>o||u>o)return i.num;if(0!==s&&1!==s)return i.num;var l=t.PMT(r,e,n,0,s),f=0;1===u&&0===s&&(f=-n,u++);for(var c=u;o>=c;c++)f+=1===s?t.FV(r,c-2,l,n,1)-l:t.FV(r,c-1,l,n,0);return f*=r},t.CUMPRINC=function(r,e,n,u,o,s){if(r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return i.value;if(0>=r||0>=e||0>=n)return i.num;if(1>u||1>o||u>o)return i.num;if(0!==s&&1!==s)return i.num;var l=t.PMT(r,e,n,0,s),f=0;1===u&&(f=0===s?l+n*r:l,u++);for(var c=u;o>=c;c++)f+=s>0?l-(t.FV(r,c-2,l,n,1)-l)*r:l-t.FV(r,c-1,l,n,0)*r;return f},t.DB=function(r,t,e,n,u){if(u=u===undefined?12:u,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u))return i.value;if(0>r||0>t||0>e||0>n)return i.num;if([1,2,3,4,5,6,7,8,9,10,11,12].indexOf(u)===-1)return i.num;if(n>e)return i.num;if(t>=r)return 0;for(var o=(1-Math.pow(t/r,1/e)).toFixed(3),s=r*o*u/12,l=s,f=0,c=n===e?e-1:n,p=2;c>=p;p++)f=(r-l)*o,l+=f;return 1===n?s:n===e?(r-l)*o:f},t.DDB=function(r,t,e,n,u){if(u=u===undefined?2:u,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u))return i.value;if(0>r||0>t||0>e||0>n||0>=u)return i.num;if(n>e)return i.num;if(t>=r)return 0;for(var o=0,s=0,l=1;n>=l;l++)s=Math.min(u/e*(r-o),r-t-o),o+=s;return s},t.DISC=function(){throw Error("DISC is not implemented")},t.DOLLARDE=function(r,t){if(r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t))return i.value;if(0>t)return i.num;if(t>=0&&1>t)return i.div0;t=parseInt(t,10);var e=parseInt(r,10);e+=r%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var n=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return e=Math.round(e*n)/n},t.DOLLARFR=function(r,t){if(r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t))return i.value;if(0>t)return i.num;if(t>=0&&1>t)return i.div0;t=parseInt(t,10);var e=parseInt(r,10);return e+=r%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},t.DURATION=function(){throw Error("DURATION is not implemented")},t.EFFECT=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>=r||1>t?i.num:(t=parseInt(t,10),Math.pow(1+r/t,t)-1)},t.FV=function(r,t,e,n,u){if(n=n||0,u=u||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u))return i.value;var o;if(0===r)o=n+e*t;else{var s=Math.pow(1+r,t);o=1===u?n*s+e*(1+r)*(s-1)/r:n*s+e*(s-1)/r}return-o},t.FVSCHEDULE=function(r,t){if(r=a.parseNumber(r),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(r,t))return i.value;for(var e=t.length,n=r,u=0;e>u;u++)n*=1+t[u];return n},t.INTRATE=function(){throw Error("INTRATE is not implemented")},t.IPMT=function(r,e,n,u,o,s){if(o=o||0,s=s||0,r=a.parseNumber(r),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),o=a.parseNumber(o),s=a.parseNumber(s),a.anyIsError(r,e,n,u,o,s))return i.value;var l=t.PMT(r,n,u,o,s);return(1===e?1===s?0:-u:1===s?t.FV(r,e-2,l,u,1)-l:t.FV(r,e-1,l,u,0))*r},t.IRR=function(r,t){if(t=t||0,r=a.parseNumberArray(a.flatten(r)),t=a.parseNumber(t),a.anyIsError(r,t))return i.value;for(var e=function(r,t,e){for(var n=e+1,u=r[0],i=1;r.length>i;i++)u+=r[i]/Math.pow(n,(t[i]-t[0])/365);return u},n=function(r,t,e){for(var n=e+1,u=0,i=1;r.length>i;i++){var o=(t[i]-t[0])/365;u-=o*r[i]/Math.pow(n,o+1)}return u},u=[],o=!1,s=!1,l=0;r.length>l;l++)u[l]=0===l?0:u[l-1]+365,r[l]>0&&(o=!0),0>r[l]&&(s=!0);if(!o||!s)return i.num;t=t===undefined?.1:t;var f,c,p,m=t,d=1e-10,h=!0;do{p=e(r,u,m),f=m-p/n(r,u,m),c=Math.abs(f-m),m=f,h=c>d&&Math.abs(p)>d}while(h);return m},t.ISPMT=function(r,t,e,n){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,t,e,n)?i.value:n*r*(t/e-1)},t.MDURATION=function(){throw Error("MDURATION is not implemented")},t.MIRR=function(r,e,n){if(r=a.parseNumberArray(a.flatten(r)),e=a.parseNumber(e),n=a.parseNumber(n),a.anyIsError(r,e,n))return i.value;for(var u=r.length,o=[],s=[],l=0;u>l;l++)0>r[l]?o.push(r[l]):s.push(r[l]);var f=-t.NPV(n,s)*Math.pow(1+n,u-1),c=t.NPV(e,o)*(1+e);return Math.pow(f/c,1/(u-1))-1},t.NOMINAL=function(r,t){return r=a.parseNumber(r),t=a.parseNumber(t),a.anyIsError(r,t)?i.value:0>=r||1>t?i.num:(t=parseInt(t,10),(Math.pow(r+1,1/t)-1)*t)},t.NPER=function(r,t,e,n,u){if(u=u===undefined?0:u,n=n===undefined?0:n,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u))return i.value;var o=t*(1+r*u)-n*r,s=e*r+t*(1+r*u);return Math.log(o/s)/Math.log(1+r)},t.NPV=function(){var r=a.parseNumberArray(a.flatten(arguments));if(r instanceof Error)return r;for(var t=r[0],e=0,n=1;r.length>n;n++)e+=r[n]/Math.pow(1+t,n);return e},t.ODDFPRICE=function(){throw Error("ODDFPRICE is not implemented")},t.ODDFYIELD=function(){throw Error("ODDFYIELD is not implemented")},t.ODDLPRICE=function(){throw Error("ODDLPRICE is not implemented")},t.ODDLYIELD=function(){throw Error("ODDLYIELD is not implemented")},t.PDURATION=function(r,t,e){return r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?i.value:r>0?(Math.log(e)-Math.log(t))/Math.log(1+r):i.num},t.PMT=function(r,t,e,n,u){if(n=n||0,u=u||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u))return i.value;var o;if(0===r)o=(e+n)/t;else{var s=Math.pow(1+r,t);o=1===u?(n*r/(s-1)+e*r/(1-1/s))/(1+r):n*r/(s-1)+e*r/(1-1/s)}return-o},t.PPMT=function(r,e,n,u,o,s){return o=o||0,s=s||0,r=a.parseNumber(r),n=a.parseNumber(n),u=a.parseNumber(u),o=a.parseNumber(o),s=a.parseNumber(s),a.anyIsError(r,n,u,o,s)?i.value:t.PMT(r,n,u,o,s)-t.IPMT(r,e,n,u,o,s)},t.PRICE=function(){throw Error("PRICE is not implemented")},t.PRICEDISC=function(){throw Error("PRICEDISC is not implemented")},t.PRICEMAT=function(){throw Error("PRICEMAT is not implemented")},t.PV=function(r,t,e,n,u){return n=n||0,u=u||0,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),a.anyIsError(r,t,e,n,u)?i.value:0===r?-e*t-n:((1-Math.pow(1+r,t))/r*e*(1+r*u)-n)/Math.pow(1+r,t)},t.RATE=function(r,t,e,n,u,o){if(o=o===undefined?.01:o,n=n===undefined?0:n,u=u===undefined?0:u,r=a.parseNumber(r),t=a.parseNumber(t),e=a.parseNumber(e),n=a.parseNumber(n),u=a.parseNumber(u),o=a.parseNumber(o),a.anyIsError(r,t,e,n,u,o))return i.value;var s,l,f,c,p=1e-10,m=50,d=0,h=0,E=0,g=o;for(Math.abs(g)p&&m>E;)g=(f*c-l*d)/(f-l),c=d,d=g,Math.abs(g)n||n>e?i.num:(n=parseInt(n,10),(r-t)*(e-n+1)*2/(e*(e+1)))},t.TBILLEQ=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?i.value:e>0?r>t?i.num:t-r>31536e6?i.num:365*e/(360-e*o.DAYS360(r,t,!1)):i.num},t.TBILLPRICE=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?i.value:e>0?r>t?i.num:t-r>31536e6?i.num:100*(1-e*o.DAYS360(r,t,!1)/360):i.num},t.TBILLYIELD=function(r,t,e){return r=a.parseDate(r),t=a.parseDate(t),e=a.parseNumber(e),a.anyIsError(r,t,e)?i.value:e>0?r>t?i.num:t-r>31536e6?i.num:360*(100-e)/(e*o.DAYS360(r,t,!1)):i.num},t.VDB=function(){throw Error("VDB is not implemented")},t.XNPV=function(r,t,e){if(r=a.parseNumber(r),t=a.parseNumberArray(a.flatten(t)),e=a.parseDateArray(a.flatten(e)),a.anyIsError(r,t,e))return i.value;for(var n=0,u=0;t.length>u;u++)n+=t[u]/Math.pow(1+r,o.DAYS(e[u],e[0])/365);return n},t.YIELD=function(){throw Error("YIELD is not implemented")},t.YIELDDISC=function(){throw Error("YIELDDISC is not implemented")},t.YIELDMAT=function(){throw Error("YIELDMAT is not implemented")}},function(r,t,e){var n=e(0),u=e(2),i=e(7);t.AND=function(){for(var r=u.flatten(arguments),t=!0,e=0;r.length>e;e++)r[e]||(t=!1);return t},t.CHOOSE=function(){if(2>arguments.length)return n.na;var r=arguments[0];return 1>r||r>254?n.value:r+1>arguments.length?n.value:arguments[r]},t.FALSE=function(){return!1},t.IF=function(r,t,e){return r?t:e},t.IFERROR=function(r,t){return i.ISERROR(r)?t:r},t.IFNA=function(r,t){return r===n.na?t:r},t.NOT=function(r){return!r},t.OR=function(){for(var r=u.flatten(arguments),t=!1,e=0;r.length>e;e++)r[e]&&(t=!0);return t},t.TRUE=function(){return!0},t.XOR=function(){for(var r=u.flatten(arguments),t=0,e=0;r.length>e;e++)r[e]&&t++;return!!(1&Math.floor(Math.abs(t)))},t.SWITCH=function(){var r;if(arguments.length>0){var t=arguments[0],e=arguments.length-1,u=Math.floor(e/2),i=!1,o=e%2!=0,a=e%2==0?null:arguments[arguments.length-1];if(u)for(var s=0;u>s;s++)if(t===arguments[2*s+1]){r=arguments[2*s+2],i=!0;break}i||(r=o?a:n.na)}else r=n.value;return r}},function(r,t,e){var n=e(0);t.MATCH=function(r,t,e){if(!r&&!t)return n.na;if(2===arguments.length&&(e=1),!(t instanceof Array))return n.na;if(e!==-1&&0!==e&&1!==e)return n.na;for(var u,i,o=0;t.length>o;o++)if(1===e){if(t[o]===r)return o+1;r>t[o]&&(i?t[o]>i&&(u=o+1,i=t[o]):(u=o+1,i=t[o]))}else if(0===e){if("string"==typeof r){if(r=r.replace(/\?/g,"."),t[o].toLowerCase().match(r.toLowerCase()))return o+1}else if(t[o]===r)return o+1}else if(e===-1){if(t[o]===r)return o+1;t[o]>r&&(i?i>t[o]&&(u=o+1,i=t[o]):(u=o+1,i=t[o]))}return u?u:n.na}},function(r,t){/*! * numbro.js language configuration * language : Czech * locale: Czech Republic @@ -41,25 +37,25 @@ if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=ut * locale: Australia * author : Benedikt Huss : https://github.com/ben305 */ -(function(){"use strict";var t={langLocaleCode:"en-AU",cultureCode:"en-AU",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={langLocaleCode:"en-AU",cultureCode:"en-AU",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : English * locale: United Kingdom of Great Britain and Northern Ireland * author : Dan Ristic : https://github.com/dristic */ -(function(){"use strict";var t={langLocaleCode:"en-GB",cultureCode:"en-GB",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"£",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={langLocaleCode:"en-GB",cultureCode:"en-GB",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"£",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : English * locale: New Zealand * author : Benedikt Huss : https://github.com/ben305 */ -(function(){"use strict";var t={langLocaleCode:"en-NZ",cultureCode:"en-NZ",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={langLocaleCode:"en-NZ",cultureCode:"en-NZ",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : English * locale: South Africa * author : Stewart Scott https://github.com/stewart42 */ -(function(){"use strict";var t={langLocaleCode:"en-ZA",cultureCode:"en-ZA",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"R",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={langLocaleCode:"en-ZA",cultureCode:"en-ZA",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"R",position:"prefix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : Spanish * locale: Argentina @@ -98,7 +94,7 @@ if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=ut * locale: Philippines * author : Michael Abadilla : https://github.com/mjmaix */ -(function(){"use strict";var t={langLocaleCode:"fil-PH",cultureCode:"fil-PH",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1===~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"₱"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={langLocaleCode:"fil-PH",cultureCode:"fil-PH",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var t=r%10;return 1==~~(r%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"₱"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : French * locale: Canada @@ -226,7 +222,7 @@ if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=ut * Erhan Gundogan : https://github.com/erhangundogan, * Burak Yiğit Kaya: https://github.com/BYK */ -(function(){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},e={langLocaleCode:"tr-TR",cultureCode:"tr-TR",delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(r){if(0===r)return"'ıncı";var e=r%10,n=r%100-e,i=100>r?null:100;return t[e]||t[n]||t[i]},currency:{symbol:"₺",position:"postfix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};void 0!==r&&r.exports&&(r.exports=e),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(e.cultureCode,e)}).call("undefined"==typeof window?this:window)},function(r,t){/*! +(function(){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},e={langLocaleCode:"tr-TR",cultureCode:"tr-TR",delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(r){if(0===r)return"'ıncı";var e=r%10,n=r%100-e,u=100>r?null:100;return t[e]||t[n]||t[u]},currency:{symbol:"₺",position:"postfix"},defaults:{currencyFormat:",4 a"},formats:{fourDigits:"4 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};void 0!==r&&r.exports&&(r.exports=e),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(e.cultureCode,e)}).call("undefined"==typeof window?this:window)},function(r,t){/*! * numbro.js language configuration * language : Ukrainian * locale : Ukraine @@ -244,4 +240,4 @@ if("string"==typeof t){var o=exports.FINDFIELD(r,t);i=utils.rest(r[o])}else i=ut * author (numbro.js Version): Randy Wilander : https://github.com/rocketedaway * author (numeral.js Version) : Rich Daley : https://github.com/pedantic-git */ -(function(){"use strict";var t={langLocaleCode:"zh-TW",cultureCode:"zh-TW",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百萬",billion:"十億",trillion:"兆"},ordinal:function(){return"第"},currency:{symbol:"NT$"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){function e(){}e.prototype={on:function(r,t,e){var n=this.e||(this.e={});return(n[r]||(n[r]=[])).push({fn:t,ctx:e}),this},once:function(r,t,e){function n(){i.off(r,n),t.apply(e,arguments)}var i=this;return n._=t,this.on(r,n,e)},emit:function(r){var t=[].slice.call(arguments,1),e=((this.e||(this.e={}))[r]||[]).slice(),n=0,i=e.length;for(n;i>n;n++)e[n].fn.apply(e[n].ctx,t);return this},off:function(r,t){var e=this.e||(this.e={}),n=e[r],i=[];if(n&&t)for(var o=0,u=n.length;u>o;o++)n[o].fn!==t&&n[o].fn._!==t&&i.push(n[o]);return i.length?e[r]=i:delete e[r],this}},r.exports=e},function(r,t){r.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(module,exports,__webpack_require__){(function(module,process){var grammarParser=function(){function Parser(){this.yy={}}var o=function(r,t,e,n){for(e=e||{},n=r.length;n--;e[r[n]]=t);return e},$V0=[1,5],$V1=[1,8],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,12],$V9=[1,13],$Va=[1,17],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,23],$Vg=[1,24],$Vh=[1,25],$Vi=[1,26],$Vj=[1,27],$Vk=[1,28],$Vl=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],$Vm=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],$Vn=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],$Vo=[5,10,11,13,14,15,16,17,29,30],$Vp=[5,10,13,14,15,16,29,30],$Vq=[5,10,11,13,14,15,16,17,18,19,29,30],$Vr=[13,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 2:this.$=yy.callVariable($$[$0][0]);break;case 3:this.$=yy.toNumber($$[$0]);break;case 4:this.$=yy.trimEdges($$[$0]);break;case 5:this.$=yy.evaluateByOperator("&",[$$[$0-2],$$[$0]]);break;case 6:this.$=yy.evaluateByOperator("=",[$$[$0-2],$$[$0]]);break;case 7:this.$=yy.evaluateByOperator("+",[$$[$0-2],$$[$0]]);break;case 8:this.$=$$[$0-1];break;case 9:this.$=yy.evaluateByOperator("<=",[$$[$0-3],$$[$0]]);break;case 10:this.$=yy.evaluateByOperator(">=",[$$[$0-3],$$[$0]]);break;case 11:this.$=yy.evaluateByOperator("<>",[$$[$0-3],$$[$0]]);break;case 12:this.$=yy.evaluateByOperator("NOT",[$$[$0-2],$$[$0]]);break;case 13:this.$=yy.evaluateByOperator(">",[$$[$0-2],$$[$0]]);break;case 14:this.$=yy.evaluateByOperator("<",[$$[$0-2],$$[$0]]);break;case 15:this.$=yy.evaluateByOperator("-",[$$[$0-2],$$[$0]]);break;case 16:this.$=yy.evaluateByOperator("*",[$$[$0-2],$$[$0]]);break;case 17:this.$=yy.evaluateByOperator("/",[$$[$0-2],$$[$0]]);break;case 18:this.$=yy.evaluateByOperator("^",[$$[$0-2],$$[$0]]);break;case 19:var n1=yy.invertNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 20:var n1=yy.toNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 21:this.$=yy.callFunction($$[$0-2]);break;case 22:this.$=yy.callFunction($$[$0-3],$$[$0-1]);break;case 26:case 27:case 28:this.$=yy.cellValue($$[$0]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=yy.rangeValue($$[$0-2],$$[$0]);break;case 38:case 42:this.$=[$$[$0]];break;case 39:var result=[],arr=eval("["+yytext+"]");arr.forEach(function(r){result.push(r)}),this.$=result;break;case 40:case 41:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 43:this.$=Array.isArray($$[$0-2])?$$[$0-2]:[$$[$0-2]],this.$.push($$[$0]);break;case 44:this.$=$$[$0];break;case 45:this.$=1*($$[$0-2]+"."+$$[$0]);break;case 46:this.$=.01*$$[$0-1];break;case 47:this.$=yy.throwError($$[$0])}},table:[{2:11,3:1,4:2,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{1:[3]},{5:[1,18],9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vl,[2,2],{32:[1,29]}),o($Vl,[2,3],{34:[1,30]}),o($Vl,[2,4]),{2:11,4:31,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:32,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:33,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{12:[1,34]},o($Vl,[2,23]),o($Vl,[2,24],{2:35,35:$Va}),o($Vm,[2,42]),o($Vn,[2,44],{32:[1,36]}),o($Vl,[2,26],{27:[1,37]}),o($Vl,[2,27],{27:[1,38]}),o($Vl,[2,28],{27:[1,39]}),o([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:41,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:42,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:45,6:3,7:4,8:$V0,10:[1,43],11:$V1,12:$V2,15:[1,44],17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:47,6:3,7:4,8:$V0,10:[1,46],11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:48,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:49,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:50,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:51,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:52,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{31:[1,53]},o($Vn,[2,46]),{9:$Vb,10:$Vc,11:$Vd,13:[1,54],14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vo,[2,19],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,20],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:57,6:3,7:4,8:$V0,11:$V1,12:$V2,13:[1,55],17:$V3,21:$V4,22:56,23:10,24:$V5,25:$V6,26:$V7,28:[1,58],31:$V8,33:$V9,35:$Va},o($Vl,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},o($Vl,[2,5]),o([5,10,13,29,30],[2,6],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,7],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:69,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:70,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,14],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:71,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,13],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o([5,10,13,16,29,30],[2,12],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,15],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vq,[2,16],{9:$Vb,20:$Vk}),o($Vq,[2,17],{9:$Vb,20:$Vk}),o([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:$Vb}),o($Vm,[2,43]),o($Vl,[2,8]),o($Vl,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},o($Vr,[2,38],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,39]),o($Vn,[2,45]),o($Vl,[2,29]),o($Vl,[2,30]),o($Vl,[2,31]),o($Vl,[2,32]),o($Vl,[2,33]),o($Vl,[2,34]),o($Vl,[2,35]),o($Vl,[2,36]),o($Vl,[2,37]),o($Vp,[2,9],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,11],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,10],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vl,[2,22]),{2:11,4:75,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:76,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vr,[2,40],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,41],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk})],defaultActions:{18:[2,1]},parseError:function(r,t){function e(r,t){this.message=r,this.hash=t}if(!t.recoverable)throw e.prototype=Error,new e(r,t);this.trace(r)},parse:function(r){function t(r){i.length=i.length-2*r,o.length=o.length-r,u.length=u.length-r}function e(r){for(var t=i.length-1,e=0;;){if(""+p in a[r])return e;if(0===r||2>t)return!1;t-=2,r=i[t],++e}}var n=this,i=[0],o=[null],u=[],a=this.table,s="",l=0,f=0,c=0,p=2,m=1,h=u.slice.call(arguments,1),d=Object.create(this.lexer),v={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(v.yy[E]=this.yy[E]);d.setInput(r,v.yy),v.yy.lexer=d,v.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;u.push(g);var N=d.options&&d.options.ranges;this.parseError="function"==typeof v.yy.parseError?v.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,y,I,w,M,A,R,T,x,S=function(){var r;return r=d.lex()||m,"number"!=typeof r&&(r=n.symbols_[r]||r),r},$={};;){if(I=i[i.length-1],this.defaultActions[I]?w=this.defaultActions[I]:(null!==b&&void 0!==b||(b=S()),w=a[I]&&a[I][b]),void 0===w||!w.length||!w[0]){var O,C="";if(c)y!==m&&(O=e(I));else{O=e(I),x=[];for(A in a[I])this.terminals_[A]&&A>p&&x.push("'"+this.terminals_[A]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(b==m?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:x,recoverable:O!==!1})}if(3==c){if(b===m||y===m)throw Error(C||"Parsing halted while starting to recover from another error.");f=d.yyleng,s=d.yytext,l=d.yylineno,g=d.yylloc,b=S()}if(O===!1)throw Error(C||"Parsing halted. No suitable error recovery rule available.");t(O),y=b==p?null:b,b=p,I=i[i.length-1],w=a[I]&&a[I][p],c=3}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch(w[0]){case 1:i.push(b),o.push(d.yytext),u.push(d.yylloc),i.push(w[1]),b=null,y?(b=y,y=null):(f=d.yyleng,s=d.yytext,l=d.yylineno,g=d.yylloc,c>0&&c--);break;case 2:if(R=this.productions_[w[1]][1],$.$=o[o.length-R],$._$={first_line:u[u.length-(R||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(R||1)].first_column,last_column:u[u.length-1].last_column},N&&($._$.range=[u[u.length-(R||1)].range[0],u[u.length-1].range[1]]),M=this.performAction.apply($,[s,f,l,v.yy,w[1],o,u].concat(h)),void 0!==M)return M;R&&(i=i.slice(0,-1*R*2),o=o.slice(0,-1*R),u=u.slice(0,-1*R)),i.push(this.productions_[w[1]][0]),o.push($.$),u.push($._$),T=a[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}},lexer=function(){var r={EOF:1,parseError:function(r,t){if(!this.yy.parser)throw Error(r);this.yy.parser.parseError(r,t)},setInput:function(r,t){return this.yy=t||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var t=r.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var t=r.length,e=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return 20>r.length&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),t=Array(r.length+1).join("-");return r+this.upcomingInput()+"\n"+t+"^"},test_match:function(r,t){var e,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),n=r[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],e=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,t,e,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;i.length>o;o++)if(e=this._input.match(this.rules[i[o]]),e&&(!t||e[0].length>t[0].length)){if(t=e,n=o,this.options.backtrack_lexer){if(r=this.test_match(e,i[o]),r!==!1)return r;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(r=this.test_match(t,i[n]),r!==!1&&r):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r?r:this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),0>r?"INITIAL":this.conditionStack[r]},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(r,t,e,n){switch(e){case 0:break;case 1:return 8;case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:return 26;case 7:return 26;case 8:return 25;case 9:return 21;case 10:return 31;case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}};return r}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();exports.parser=grammarParser,exports.Parser=grammarParser.Parser,exports.parse=function(){return grammarParser.parse.apply(grammarParser,arguments)},void 0!==module&&__webpack_require__.c[__webpack_require__.s]===module&&exports.main(process.argv.slice(1))}).call(exports,__webpack_require__(79)(module),__webpack_require__(15))},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=void 0;var i=e(16),o=n(i),u=e(10),a=n(u),s=e(1),l=n(s),f=e(9);t.SUPPORTED_FORMULAS=a["default"],t.ERROR=s.ERROR,t.ERROR_DIV_ZERO=s.ERROR_DIV_ZERO,t.ERROR_NAME=s.ERROR_NAME,t.ERROR_NOT_AVAILABLE=s.ERROR_NOT_AVAILABLE,t.ERROR_NULL=s.ERROR_NULL,t.ERROR_NUM=s.ERROR_NUM,t.ERROR_REF=s.ERROR_REF,t.ERROR_VALUE=s.ERROR_VALUE,t.Parser=o["default"],t.error=l["default"],t.extractLabel=f.extractLabel,t.toLabel=f.toLabel,t.columnIndexToLabel=f.columnIndexToLabel,t.columnLabelToIndex=f.columnLabelToIndex,t.rowIndexToLabel=f.rowIndexToLabel,t.rowLabelToIndex=f.rowLabelToIndex}])}); \ No newline at end of file +(function(){"use strict";var t={langLocaleCode:"zh-TW",cultureCode:"zh-TW",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百萬",billion:"十億",trillion:"兆"},ordinal:function(){return"第"},currency:{symbol:"NT$"}};void 0!==r&&r.exports&&(r.exports=t),"undefined"!=typeof window&&window.numbro&&window.numbro.culture&&window.numbro.culture(t.cultureCode,t)}).call("undefined"==typeof window?this:window)},function(r,t){function e(){}e.prototype={on:function(r,t,e){var n=this.e||(this.e={});return(n[r]||(n[r]=[])).push({fn:t,ctx:e}),this},once:function(r,t,e){function n(){u.off(r,n),t.apply(e,arguments)}var u=this;return n._=t,this.on(r,n,e)},emit:function(r){var t=[].slice.call(arguments,1),e=((this.e||(this.e={}))[r]||[]).slice(),n=0,u=e.length;for(n;u>n;n++)e[n].fn.apply(e[n].ctx,t);return this},off:function(r,t){var e=this.e||(this.e={}),n=e[r],u=[];if(n&&t)for(var i=0,o=n.length;o>i;i++)n[i].fn!==t&&n[i].fn._!==t&&u.push(n[i]);return u.length?e[r]=u:delete e[r],this}},r.exports=e},function(r,t){r.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(module,exports,__webpack_require__){(function(module,process){var grammarParser=function(){function Parser(){this.yy={}}var o=function(r,t,e,n){for(e=e||{},n=r.length;n--;e[r[n]]=t);return e},$V0=[1,5],$V1=[1,8],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,12],$V9=[1,13],$Va=[1,17],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,23],$Vg=[1,24],$Vh=[1,25],$Vi=[1,26],$Vj=[1,27],$Vk=[1,28],$Vl=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],$Vm=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],$Vn=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],$Vo=[5,10,11,13,14,15,16,17,29,30],$Vp=[5,10,13,14,15,16,29,30],$Vq=[5,10,11,13,14,15,16,17,18,19,29,30],$Vr=[13,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 2:this.$=yy.callVariable($$[$0][0]);break;case 3:this.$=yy.toNumber($$[$0]);break;case 4:this.$=yy.trimEdges($$[$0]);break;case 5:this.$=yy.evaluateByOperator("&",[$$[$0-2],$$[$0]]);break;case 6:this.$=yy.evaluateByOperator("=",[$$[$0-2],$$[$0]]);break;case 7:this.$=yy.evaluateByOperator("+",[$$[$0-2],$$[$0]]);break;case 8:this.$=$$[$0-1];break;case 9:this.$=yy.evaluateByOperator("<=",[$$[$0-3],$$[$0]]);break;case 10:this.$=yy.evaluateByOperator(">=",[$$[$0-3],$$[$0]]);break;case 11:this.$=yy.evaluateByOperator("<>",[$$[$0-3],$$[$0]]);break;case 12:this.$=yy.evaluateByOperator("NOT",[$$[$0-2],$$[$0]]);break;case 13:this.$=yy.evaluateByOperator(">",[$$[$0-2],$$[$0]]);break;case 14:this.$=yy.evaluateByOperator("<",[$$[$0-2],$$[$0]]);break;case 15:this.$=yy.evaluateByOperator("-",[$$[$0-2],$$[$0]]);break;case 16:this.$=yy.evaluateByOperator("*",[$$[$0-2],$$[$0]]);break;case 17:this.$=yy.evaluateByOperator("/",[$$[$0-2],$$[$0]]);break;case 18:this.$=yy.evaluateByOperator("^",[$$[$0-2],$$[$0]]);break;case 19:var n1=yy.invertNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 20:var n1=yy.toNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 21:this.$=yy.callFunction($$[$0-2]);break;case 22:this.$=yy.callFunction($$[$0-3],$$[$0-1]);break;case 26:case 27:case 28:this.$=yy.cellValue($$[$0]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=yy.rangeValue($$[$0-2],$$[$0]);break;case 38:case 42:this.$=[$$[$0]];break;case 39:var result=[],arr=eval("["+yytext+"]");arr.forEach(function(r){result.push(r)}),this.$=result;break;case 40:case 41:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 43:this.$=Array.isArray($$[$0-2])?$$[$0-2]:[$$[$0-2]],this.$.push($$[$0]);break;case 44:this.$=$$[$0];break;case 45:this.$=1*($$[$0-2]+"."+$$[$0]);break;case 46:this.$=.01*$$[$0-1];break;case 47:this.$=yy.throwError($$[$0])}},table:[{2:11,3:1,4:2,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{1:[3]},{5:[1,18],9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vl,[2,2],{32:[1,29]}),o($Vl,[2,3],{34:[1,30]}),o($Vl,[2,4]),{2:11,4:31,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:32,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:33,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{12:[1,34]},o($Vl,[2,23]),o($Vl,[2,24],{2:35,35:$Va}),o($Vm,[2,42]),o($Vn,[2,44],{32:[1,36]}),o($Vl,[2,26],{27:[1,37]}),o($Vl,[2,27],{27:[1,38]}),o($Vl,[2,28],{27:[1,39]}),o([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:41,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:42,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:45,6:3,7:4,8:$V0,10:[1,43],11:$V1,12:$V2,15:[1,44],17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:47,6:3,7:4,8:$V0,10:[1,46],11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:48,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:49,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:50,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:51,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:52,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{31:[1,53]},o($Vn,[2,46]),{9:$Vb,10:$Vc,11:$Vd,13:[1,54],14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vo,[2,19],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,20],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:57,6:3,7:4,8:$V0,11:$V1,12:$V2,13:[1,55],17:$V3,21:$V4,22:56,23:10,24:$V5,25:$V6,26:$V7,28:[1,58],31:$V8,33:$V9,35:$Va},o($Vl,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},o($Vl,[2,5]),o([5,10,13,29,30],[2,6],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,7],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:69,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:70,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,14],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:71,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,13],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o([5,10,13,16,29,30],[2,12],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,15],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vq,[2,16],{9:$Vb,20:$Vk}),o($Vq,[2,17],{9:$Vb,20:$Vk}),o([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:$Vb}),o($Vm,[2,43]),o($Vl,[2,8]),o($Vl,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},o($Vr,[2,38],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,39]),o($Vn,[2,45]),o($Vl,[2,29]),o($Vl,[2,30]),o($Vl,[2,31]),o($Vl,[2,32]),o($Vl,[2,33]),o($Vl,[2,34]),o($Vl,[2,35]),o($Vl,[2,36]),o($Vl,[2,37]),o($Vp,[2,9],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,11],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,10],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vl,[2,22]),{2:11,4:75,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:76,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vr,[2,40],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,41],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk})],defaultActions:{18:[2,1]},parseError:function(r,t){function e(r,t){this.message=r,this.hash=t}if(!t.recoverable)throw e.prototype=Error,new e(r,t);this.trace(r)},parse:function(r){function t(r){u.length=u.length-2*r,i.length=i.length-r,o.length=o.length-r}function e(r){for(var t=u.length-1,e=0;;){if(""+p in a[r])return e;if(0===r||2>t)return!1;t-=2,r=u[t],++e}}var n=this,u=[0],i=[null],o=[],a=this.table,s="",l=0,f=0,c=0,p=2,m=1,d=o.slice.call(arguments,1),h=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);h.setInput(r,E.yy),E.yy.lexer=h,E.yy.parser=this,"undefined"==typeof h.yylloc&&(h.yylloc={});var v=h.yylloc;o.push(v);var N=h.options&&h.options.ranges;this.parseError="function"==typeof E.yy.parseError?E.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,y,I,w,M,A,R,T,x,S=function(){var r;return r=h.lex()||m,"number"!=typeof r&&(r=n.symbols_[r]||r),r},O={};;){if(I=u[u.length-1],this.defaultActions[I]?w=this.defaultActions[I]:(null!==b&&void 0!==b||(b=S()),w=a[I]&&a[I][b]),void 0===w||!w.length||!w[0]){var $,C="";if(c)y!==m&&($=e(I));else{$=e(I),x=[];for(A in a[I])this.terminals_[A]&&A>p&&x.push("'"+this.terminals_[A]+"'");C=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(b==m?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:h.match,token:this.terminals_[b]||b,line:h.yylineno,loc:v,expected:x,recoverable:$!==!1})}if(3==c){if(b===m||y===m)throw Error(C||"Parsing halted while starting to recover from another error.");f=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,b=S()}if($===!1)throw Error(C||"Parsing halted. No suitable error recovery rule available.");t($),y=b==p?null:b,b=p,I=u[u.length-1],w=a[I]&&a[I][p],c=3}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch(w[0]){case 1:u.push(b),i.push(h.yytext),o.push(h.yylloc),u.push(w[1]),b=null,y?(b=y,y=null):(f=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,c>0&&c--);break;case 2:if(R=this.productions_[w[1]][1],O.$=i[i.length-R],O._$={first_line:o[o.length-(R||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(R||1)].first_column,last_column:o[o.length-1].last_column},N&&(O._$.range=[o[o.length-(R||1)].range[0],o[o.length-1].range[1]]),void 0!==(M=this.performAction.apply(O,[s,f,l,E.yy,w[1],i,o].concat(d))))return M;R&&(u=u.slice(0,-1*R*2),i=i.slice(0,-1*R),o=o.slice(0,-1*R)),u.push(this.productions_[w[1]][0]),i.push(O.$),o.push(O._$),T=a[u[u.length-2]][u[u.length-1]],u.push(T);break;case 3:return!0}}return!0}},lexer=function(){return{EOF:1,parseError:function(r,t){if(!this.yy.parser)throw Error(r);this.yy.parser.parseError(r,t)},setInput:function(r,t){return this.yy=t||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var t=r.length,e=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return 20>r.length&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),t=Array(r.length+1).join("-");return r+this.upcomingInput()+"\n"+t+"^"},test_match:function(r,t){var e,n,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),n=r[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],e=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var i in u)this[i]=u[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,t,e,n;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),i=0;u.length>i;i++)if((e=this._input.match(this.rules[u[i]]))&&(!t||e[0].length>t[0].length)){if(t=e,n=i,this.options.backtrack_lexer){if((r=this.test_match(e,u[i]))!==!1)return r;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(r=this.test_match(t,u[n]))!==!1&&r:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r?r:this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),0>r?"INITIAL":this.conditionStack[r]},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(r,t,e,n){switch(e){case 0:break;case 1:return 8;case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:return 26;case 7:return 26;case 8:return 25;case 9:return 21;case 10:return 31;case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}}}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();exports.parser=grammarParser,exports.Parser=grammarParser.Parser,exports.parse=function(){return grammarParser.parse.apply(grammarParser,arguments)},void 0!==module&&__webpack_require__.c[__webpack_require__.s]===module&&exports.main(process.argv.slice(1))}).call(exports,__webpack_require__(79)(module),__webpack_require__(15))},function(r,t,e){"use strict";function n(r){return r&&r.__esModule?r:{"default":r}}t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=undefined;var u=e(16),i=n(u),o=e(10),a=n(o),s=e(1),l=n(s),f=e(9);t.SUPPORTED_FORMULAS=a["default"],t.ERROR=s.ERROR,t.ERROR_DIV_ZERO=s.ERROR_DIV_ZERO,t.ERROR_NAME=s.ERROR_NAME,t.ERROR_NOT_AVAILABLE=s.ERROR_NOT_AVAILABLE,t.ERROR_NULL=s.ERROR_NULL,t.ERROR_NUM=s.ERROR_NUM,t.ERROR_REF=s.ERROR_REF,t.ERROR_VALUE=s.ERROR_VALUE,t.Parser=i["default"],t.error=l["default"],t.extractLabel=f.extractLabel,t.toLabel=f.toLabel,t.columnIndexToLabel=f.columnIndexToLabel,t.columnLabelToIndex=f.columnLabelToIndex,t.rowIndexToLabel=f.rowIndexToLabel,t.rowLabelToIndex=f.rowLabelToIndex}])}); \ No newline at end of file diff --git a/package.json b/package.json index 75239f72..05b24e2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hot-formula-parser", - "version": "2.0.1", + "version": "2.0.2", "description": "Formula parser", "browser": "dist/formula-parser.js", "main": "lib/index.js", @@ -8,7 +8,7 @@ "jsnext:main": "es/index.js", "scripts": { "clean": "rimraf lib dist es coverage", - "lint": "eslint src test && jscs src test", + "lint": "eslint src test", "check": "npm run lint && npm run test", "test": "cross-env BABEL_ENV=commonjs jest", "coverage": "cross-env BABEL_ENV=commonjs jest --coverage", @@ -68,11 +68,12 @@ "babel-register": "^6.16.3", "check-es3-syntax-cli": "^0.1.1", "cross-env": "^3.1.4", - "eslint": "^3.8.1", + "eslint-config-airbnb-base": "^11.1.0", "eslint-plugin-import": "^2.2.0", + "eslint": "^3.8.1", "generate-release": "^0.10.2", "glob": "^7.1.1", - "jest": "^18.1.0", + "jest": "^19.0.2", "jison": "^0.4.17", "jscs": "^3.0.7", "null-loader": "^0.1.1", @@ -88,9 +89,13 @@ "testPathIgnorePatterns": [ "./test/index.js" ], - "testPathDirs": [ + "roots": [ "./test" ], - "testRegex": "(test\\/index\\.js|/test/.*.js)$" + "testRegex": "(test\\/index\\.js|/test/.*.js)$", + "collectCoverageFrom": [ + "**/*.{js}", + "!src/grammar-parser/**" + ] } } diff --git a/src/error.js b/src/error.js index 77e435a5..64e2a2d2 100644 --- a/src/error.js +++ b/src/error.js @@ -25,15 +25,15 @@ const errors = { * @returns {String|null} Returns error id. */ export default function error(type) { - let error; + let result; type = (type + '').replace(/#|!|\?/g, ''); if (errors[type]) { - error = errors[type]; + result = errors[type]; } - return error ? error : null; + return result ? result : null; } /** @@ -45,8 +45,8 @@ export default function error(type) { export function isValidStrict(type) { let valid = false; - for (var i in errors) { - if (errors.hasOwnProperty(i) && errors[i] === type) { + for (const i in errors) { + if (Object.prototype.hasOwnProperty.call(errors, i) && errors[i] === type) { valid = true; break; } diff --git a/src/evaluate-by-operator/evaluate-by-operator.js b/src/evaluate-by-operator/evaluate-by-operator.js index 99e2afaa..a6463f0c 100644 --- a/src/evaluate-by-operator/evaluate-by-operator.js +++ b/src/evaluate-by-operator/evaluate-by-operator.js @@ -1,34 +1,21 @@ -import {default as add} from './operator/add'; -import {default as ampersand} from './operator/ampersand'; -import {default as divide} from './operator/divide'; -import {default as equal} from './operator/equal'; -import {default as formulaFunction} from './operator/formula-function'; -import {default as greaterThan} from './operator/greater-than'; -import {default as greaterThanOrEqual} from './operator/greater-than-or-equal'; -import {default as lessThan} from './operator/less-than'; -import {default as lessThanOrEqual} from './operator/less-than-or-equal'; -import {default as minus} from './operator/minus'; -import {default as multiply} from './operator/multiply'; -import {default as notEqual} from './operator/not-equal'; -import {default as power} from './operator/power'; +/* eslint-disable import/no-named-as-default-member */ +import add from './operator/add'; +import ampersand from './operator/ampersand'; +import divide from './operator/divide'; +import equal from './operator/equal'; +import formulaFunction from './operator/formula-function'; +import greaterThan from './operator/greater-than'; +import greaterThanOrEqual from './operator/greater-than-or-equal'; +import lessThan from './operator/less-than'; +import lessThanOrEqual from './operator/less-than-or-equal'; +import minus from './operator/minus'; +import multiply from './operator/multiply'; +import notEqual from './operator/not-equal'; +import power from './operator/power'; import {ERROR_NAME} from './../error'; const availableOperators = Object.create(null); -registerOperation(add.SYMBOL, add); -registerOperation(ampersand.SYMBOL, ampersand); -registerOperation(divide.SYMBOL, divide); -registerOperation(equal.SYMBOL, equal); -registerOperation(power.SYMBOL, power); -registerOperation(formulaFunction.SYMBOL, formulaFunction); -registerOperation(greaterThan.SYMBOL, greaterThan); -registerOperation(greaterThanOrEqual.SYMBOL, greaterThanOrEqual); -registerOperation(lessThan.SYMBOL, lessThan); -registerOperation(lessThanOrEqual.SYMBOL, lessThanOrEqual); -registerOperation(multiply.SYMBOL, multiply); -registerOperation(notEqual.SYMBOL, notEqual); -registerOperation(minus.SYMBOL, minus); - /** * Evaluate values by operator id.git * @@ -64,3 +51,17 @@ export function registerOperation(symbol, func) { } }); } + +registerOperation(add.SYMBOL, add); +registerOperation(ampersand.SYMBOL, ampersand); +registerOperation(divide.SYMBOL, divide); +registerOperation(equal.SYMBOL, equal); +registerOperation(power.SYMBOL, power); +registerOperation(formulaFunction.SYMBOL, formulaFunction); +registerOperation(greaterThan.SYMBOL, greaterThan); +registerOperation(greaterThanOrEqual.SYMBOL, greaterThanOrEqual); +registerOperation(lessThan.SYMBOL, lessThan); +registerOperation(lessThanOrEqual.SYMBOL, lessThanOrEqual); +registerOperation(multiply.SYMBOL, multiply); +registerOperation(notEqual.SYMBOL, notEqual); +registerOperation(minus.SYMBOL, minus); diff --git a/src/evaluate-by-operator/operator/add.js b/src/evaluate-by-operator/operator/add.js index d5640bb9..f8f1cb59 100644 --- a/src/evaluate-by-operator/operator/add.js +++ b/src/evaluate-by-operator/operator/add.js @@ -11,6 +11,6 @@ export default function func(first, ...rest) { } return result; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/ampersand.js b/src/evaluate-by-operator/operator/ampersand.js index 5b76602a..8d083866 100644 --- a/src/evaluate-by-operator/operator/ampersand.js +++ b/src/evaluate-by-operator/operator/ampersand.js @@ -2,6 +2,6 @@ export const SYMBOL = '&'; export default function func(...params) { return params.reduce((acc, value) => acc + value.toString(), ''); -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/divide.js b/src/evaluate-by-operator/operator/divide.js index 030e1295..1057e98e 100644 --- a/src/evaluate-by-operator/operator/divide.js +++ b/src/evaluate-by-operator/operator/divide.js @@ -14,6 +14,6 @@ export default function func(first, ...rest) { } return result; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/equal.js b/src/evaluate-by-operator/operator/equal.js index 2d0f0d1d..e2e2773c 100644 --- a/src/evaluate-by-operator/operator/equal.js +++ b/src/evaluate-by-operator/operator/equal.js @@ -2,6 +2,6 @@ export const SYMBOL = '='; export default function func(exp1, exp2) { return exp1 === exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/formula-function.js b/src/evaluate-by-operator/operator/formula-function.js index 9b3181cc..93113800 100644 --- a/src/evaluate-by-operator/operator/formula-function.js +++ b/src/evaluate-by-operator/operator/formula-function.js @@ -1,11 +1,11 @@ +import * as formulajs from 'formulajs'; import SUPPORTED_FORMULAS from './../../supported-formulas'; import {ERROR_NAME} from './../../error'; -import * as formulajs from 'formulajs'; export const SYMBOL = SUPPORTED_FORMULAS; export default function func(symbol) { - return function(...params) { + return function __formulaFunction(...params) { symbol = symbol.toUpperCase(); const symbolParts = symbol.split('.'); @@ -43,7 +43,7 @@ export default function func(symbol) { return result; }; -}; +} func.isFactory = true; func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/greater-than-or-equal.js b/src/evaluate-by-operator/operator/greater-than-or-equal.js index a236a817..6cc99679 100644 --- a/src/evaluate-by-operator/operator/greater-than-or-equal.js +++ b/src/evaluate-by-operator/operator/greater-than-or-equal.js @@ -2,6 +2,6 @@ export const SYMBOL = '>='; export default function func(exp1, exp2) { return exp1 >= exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/greater-than.js b/src/evaluate-by-operator/operator/greater-than.js index 7b6af03c..419eeab5 100644 --- a/src/evaluate-by-operator/operator/greater-than.js +++ b/src/evaluate-by-operator/operator/greater-than.js @@ -2,6 +2,6 @@ export const SYMBOL = '>'; export default function func(exp1, exp2) { return exp1 > exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/less-than-or-equal.js b/src/evaluate-by-operator/operator/less-than-or-equal.js index 309a6071..28336fb4 100644 --- a/src/evaluate-by-operator/operator/less-than-or-equal.js +++ b/src/evaluate-by-operator/operator/less-than-or-equal.js @@ -2,6 +2,6 @@ export const SYMBOL = '<='; export default function func(exp1, exp2) { return exp1 <= exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/less-than.js b/src/evaluate-by-operator/operator/less-than.js index bf0f7470..2c134d15 100644 --- a/src/evaluate-by-operator/operator/less-than.js +++ b/src/evaluate-by-operator/operator/less-than.js @@ -2,6 +2,6 @@ export const SYMBOL = '<'; export default function func(exp1, exp2) { return exp1 < exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/minus.js b/src/evaluate-by-operator/operator/minus.js index c08c709b..248520bb 100644 --- a/src/evaluate-by-operator/operator/minus.js +++ b/src/evaluate-by-operator/operator/minus.js @@ -11,6 +11,6 @@ export default function func(first, ...rest) { } return result; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/multiply.js b/src/evaluate-by-operator/operator/multiply.js index af727477..378433c5 100644 --- a/src/evaluate-by-operator/operator/multiply.js +++ b/src/evaluate-by-operator/operator/multiply.js @@ -11,6 +11,6 @@ export default function func(first, ...rest) { } return result; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/not-equal.js b/src/evaluate-by-operator/operator/not-equal.js index 752d5060..1810ad18 100644 --- a/src/evaluate-by-operator/operator/not-equal.js +++ b/src/evaluate-by-operator/operator/not-equal.js @@ -2,6 +2,6 @@ export const SYMBOL = '<>'; export default function func(exp1, exp2) { return exp1 !== exp2; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/evaluate-by-operator/operator/power.js b/src/evaluate-by-operator/operator/power.js index 5609e50e..a7efb217 100644 --- a/src/evaluate-by-operator/operator/power.js +++ b/src/evaluate-by-operator/operator/power.js @@ -11,6 +11,6 @@ export default function func(exp1, exp2) { } return result; -}; +} func.SYMBOL = SYMBOL; diff --git a/src/helper/cell.js b/src/helper/cell.js index 0c2279bf..30be53d6 100644 --- a/src/helper/cell.js +++ b/src/helper/cell.js @@ -1,43 +1,35 @@ -const LABEL_EXTRACT_REGEXP = /^([$])?([A-Za-z]+)([$])?([0-9]+)$/; - /** - * Extract cell coordinates. + * Convert row label to index. * - * @param {String} label Cell coordinates (eq. 'A1', '$B6', '$N$98'). - * @returns {Array} Returns an array of objects. + * @param {String} label Row label (eq. '1', '5') + * @returns {Number} Returns -1 if label is not recognized otherwise proper row index. */ -export function extractLabel(label) { - if (typeof label !== 'string' || !LABEL_EXTRACT_REGEXP.test(label)) { - return []; +export function rowLabelToIndex(label) { + let result = parseInt(label, 10); + + if (isNaN(result)) { + result = -1; + } else { + result = Math.max(result - 1, -1); } - const [, columnAbs, column, rowAbs, row] = label.toUpperCase().match(LABEL_EXTRACT_REGEXP); - return [ - { - index: rowLabelToIndex(row), - label: row, - isAbsolute: rowAbs === '$', - }, - { - index: columnLabelToIndex(column), - label: column, - isAbsolute: columnAbs === '$' - } - ]; + return result; } /** - * Convert row and column indexes into cell label. + * Convert row index to label. * - * @param {Object} row Object with `index` and `isAbsolute` properties. - * @param {Object} column Object with `index` and `isAbsolute` properties. - * @returns {String} Returns cell label. + * @param {Number} row Row index. + * @returns {String} Returns row label (eq. '1', '7'). */ -export function toLabel(row, column) { - const rowLabel = (row.isAbsolute ? '$' : '') + rowIndexToLabel(row.index); - const columnLabel = (column.isAbsolute ? '$' : '') + columnIndexToLabel(column.index); +export function rowIndexToLabel(row) { + let result = ''; - return columnLabel + rowLabel; + if (row >= 0) { + result = `${row + 1}`; + } + + return result; } const COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -74,43 +66,51 @@ export function columnIndexToLabel(column) { let result = ''; while (column >= 0) { - result = String.fromCharCode(column % COLUMN_LABEL_BASE_LENGTH + 97) + result; + result = String.fromCharCode((column % COLUMN_LABEL_BASE_LENGTH) + 97) + result; column = Math.floor(column / COLUMN_LABEL_BASE_LENGTH) - 1; } return result.toUpperCase(); } +const LABEL_EXTRACT_REGEXP = /^([$])?([A-Za-z]+)([$])?([0-9]+)$/; + /** - * Convert row label to index. + * Extract cell coordinates. * - * @param {String} label Row label (eq. '1', '5') - * @returns {Number} Returns -1 if label is not recognized otherwise proper row index. + * @param {String} label Cell coordinates (eq. 'A1', '$B6', '$N$98'). + * @returns {Array} Returns an array of objects. */ -export function rowLabelToIndex(label) { - let result = parseInt(label, 10); - - if (isNaN(result)) { - result = -1; - } else { - result = Math.max(result - 1, -1); +export function extractLabel(label) { + if (typeof label !== 'string' || !LABEL_EXTRACT_REGEXP.test(label)) { + return []; } + const [, columnAbs, column, rowAbs, row] = label.toUpperCase().match(LABEL_EXTRACT_REGEXP); - return result; + return [ + { + index: rowLabelToIndex(row), + label: row, + isAbsolute: rowAbs === '$', + }, + { + index: columnLabelToIndex(column), + label: column, + isAbsolute: columnAbs === '$', + }, + ]; } /** - * Convert row index to label. + * Convert row and column indexes into cell label. * - * @param {Number} row Row index. - * @returns {String} Returns row label (eq. '1', '7'). + * @param {Object} row Object with `index` and `isAbsolute` properties. + * @param {Object} column Object with `index` and `isAbsolute` properties. + * @returns {String} Returns cell label. */ -export function rowIndexToLabel(row) { - let result = ''; - - if (row >= 0) { - result = `${row + 1}`; - } +export function toLabel(row, column) { + const rowLabel = (row.isAbsolute ? '$' : '') + rowIndexToLabel(row.index); + const columnLabel = (column.isAbsolute ? '$' : '') + columnIndexToLabel(column.index); - return result; + return columnLabel + rowLabel; } diff --git a/src/helper/string.js b/src/helper/string.js index 162e50ff..8215cf24 100644 --- a/src/helper/string.js +++ b/src/helper/string.js @@ -1,3 +1,4 @@ +/* eslint-disable import/prefer-default-export */ /** * Trim value by cutting character starting from the beginning and ending at the same time. * diff --git a/src/index.js b/src/index.js index a95c542a..a14de2c0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,6 @@ import Parser from './parser'; import SUPPORTED_FORMULAS from './supported-formulas'; -import { - default as error, +import error, { ERROR, ERROR_DIV_ZERO, ERROR_NAME, @@ -9,7 +8,7 @@ import { ERROR_NULL, ERROR_NUM, ERROR_REF, - ERROR_VALUE + ERROR_VALUE, } from './error'; import { extractLabel, @@ -17,7 +16,7 @@ import { columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, - rowLabelToIndex + rowLabelToIndex, } from './helper/cell'; export { @@ -37,5 +36,5 @@ export { columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, - rowLabelToIndex + rowLabelToIndex, }; diff --git a/src/parser.js b/src/parser.js index a17773b5..3e295c61 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1,9 +1,9 @@ import Emitter from 'tiny-emitter'; import evaluateByOperator from './evaluate-by-operator/evaluate-by-operator'; -import {Parser as GrammarParser} from './grammar-parser/grammar-parser.js'; +import {Parser as GrammarParser} from './grammar-parser/grammar-parser'; import {trimEdges} from './helper/string'; import {toNumber, invertNumber} from './helper/number'; -import {default as errorParser, isValidStrict as isErrorValid, ERROR, ERROR_NAME} from './error'; +import errorParser, {isValidStrict as isErrorValid, ERROR, ERROR_NAME} from './error'; import {extractLabel, toLabel} from './helper/cell'; /** @@ -64,8 +64,8 @@ class Parser extends Emitter { } return { - error: error, - result: result + error, + result, }; } diff --git a/test/index.js b/test/index.js index 7bdf6d93..4afa9963 100644 --- a/test/index.js +++ b/test/index.js @@ -1,7 +1,7 @@ // import jest from 'jest'; function tolerance(precision) { - if (precision == null) { + if (precision === void 0 || precision === null) { precision = 7; } @@ -9,7 +9,7 @@ function tolerance(precision) { } jest.addMatchers({ - toBeMatchCloseTo(util, customEqualityTesters) { + toBeMatchCloseTo() { return { compare(actual, expected, precision) { let pass = false; diff --git a/test/integration/parsing/coordinates.js b/test/integration/parsing/coordinates.js index 1679f248..f591c534 100644 --- a/test/integration/parsing/coordinates.js +++ b/test/integration/parsing/coordinates.js @@ -9,11 +9,11 @@ describe('.parse() coordinates', () => { beforeEach(() => { parser = new Parser(); - parser.on('callCellValue', function(_cellCoord, done) { + parser.on('callCellValue', (_cellCoord, done) => { cellCoord = _cellCoord; done(55); }); - parser.on('callRangeValue', function(_startCellCoord, _endCellCoord, done) { + parser.on('callRangeValue', (_startCellCoord, _endCellCoord, done) => { startCellCoord = _startCellCoord; endCellCoord = _endCellCoord; done([[3, 6, 10]]); diff --git a/test/integration/parsing/error.js b/test/integration/parsing/error.js index f8451320..7f43b6be 100644 --- a/test/integration/parsing/error.js +++ b/test/integration/parsing/error.js @@ -33,6 +33,7 @@ describe('.parse() error', () => { expect(parser.parse('#N/A')).toMatchObject({error: '#N/A', result: null}); expect(parser.parse('#N/A!')).toMatchObject({error: '#ERROR!', result: null}); expect(parser.parse('#N/A?')).toMatchObject({error: '#ERROR!', result: null}); + /* eslint-disable no-useless-escape */ expect(parser.parse('#N\A')).toMatchObject({error: '#ERROR!', result: null}); }); diff --git a/test/integration/parsing/formula/statistical.js b/test/integration/parsing/formula/statistical.js index 08308125..ae2dc7e1 100644 --- a/test/integration/parsing/formula/statistical.js +++ b/test/integration/parsing/formula/statistical.js @@ -361,17 +361,20 @@ describe('.parse() statistical formulas', () => { parser.setVariable('bar', [11, 12, 13, 14, 15, 16]); parser.setVariable('baz', [11, 12, 13, 14, 15, 16, 17, 18, 19]); - expect(parser.parse('GROWTH(foo, bar, baz)')).toMatchObject({error: null, result: [ - 32618.20377353843, - 47729.422614746654, - 69841.30085621699, - 102197.07337883323, - 149542.4867400496, - 218821.8762146044, - 320196.71836349065, - 468536.05418408196, - 685597.3889812973 - ]}); + expect(parser.parse('GROWTH(foo, bar, baz)')).toMatchObject({ + error: null, + result: [ + 32618.20377353843, + 47729.422614746654, + 69841.30085621699, + 102197.07337883323, + 149542.4867400496, + 218821.8762146044, + 320196.71836349065, + 468536.05418408196, + 685597.3889812973, + ], + }); }); it('HARMEAN', () => { diff --git a/test/integration/parsing/general.js b/test/integration/parsing/general.js index 733ba005..facfe533 100644 --- a/test/integration/parsing/general.js +++ b/test/integration/parsing/general.js @@ -38,6 +38,6 @@ describe('.parse() general', () => { }); it('should not parse array type data', () => { - expect(parser.parse(function() {})).toMatchObject({error: '#ERROR!', result: null}); + expect(parser.parse(() => {})).toMatchObject({error: '#ERROR!', result: null}); }); }); diff --git a/test/unit/error.js b/test/unit/error.js index 79bd9542..e87132a9 100644 --- a/test/unit/error.js +++ b/test/unit/error.js @@ -1,4 +1,4 @@ -import {default as error, isValidStrict} from '../../src/error'; +import error, {isValidStrict} from '../../src/error'; describe('.error()', () => { it('should return null for unrecognized error types', () => { diff --git a/test/unit/evaluate-by-operator/evaluate-by-operator.js b/test/unit/evaluate-by-operator/evaluate-by-operator.js index 5dc6fd50..59dce819 100644 --- a/test/unit/evaluate-by-operator/evaluate-by-operator.js +++ b/test/unit/evaluate-by-operator/evaluate-by-operator.js @@ -1,10 +1,8 @@ -import {default as evaluateByOperator, registerOperation} from '../../../src/evaluate-by-operator/evaluate-by-operator'; +import evaluateByOperator, {registerOperation} from '../../../src/evaluate-by-operator/evaluate-by-operator'; describe('.registerOperation()', () => { it('should register new operator and evaluate it', () => { - registerOperation('foo', function(a, b) { - return a + b; - }); + registerOperation('foo', (a, b) => a + b); expect(evaluateByOperator('foo', [2, 8.8])).toBe(10.8); expect(evaluateByOperator('foo', ['2', '8.8'])).toBe('28.8'); @@ -13,88 +11,88 @@ describe('.registerOperation()', () => { describe('.evaluateByOperator()', () => { it('should throw exception when operator do not exist', () => { - expect(function() { + expect(() => { evaluateByOperator('bar', [2, 8.8]); }).toThrow('NAME'); - expect(function() { + expect(() => { evaluateByOperator('baz'); }).toThrow('NAME'); }); it('should not to throw exception for `add` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('+', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `ampersand` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('&', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `divide` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('/', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `equal` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('=', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `formula function` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('SUM', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `greater than` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('>', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `greater than or equal` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('>=', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `less than` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('<', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `less than or equal` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('<=', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `minus` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('-', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `multiply` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('*', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `not equal` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('<>', [2, 8.8]); }).not.toThrow(); }); it('should not to throw exception for `power` operator', () => { - expect(function() { + expect(() => { evaluateByOperator('^', [2, 2]); }).not.toThrow(); }); diff --git a/test/unit/evaluate-by-operator/operator/add.js b/test/unit/evaluate-by-operator/operator/add.js index b31c1b79..88fcc05d 100644 --- a/test/unit/evaluate-by-operator/operator/add.js +++ b/test/unit/evaluate-by-operator/operator/add.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/add'; describe('add operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/ampersand.js b/test/unit/evaluate-by-operator/operator/ampersand.js index 94300948..7a4d5e81 100644 --- a/test/unit/evaluate-by-operator/operator/ampersand.js +++ b/test/unit/evaluate-by-operator/operator/ampersand.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/ampersand'; describe('ampersand operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/divide.js b/test/unit/evaluate-by-operator/operator/divide.js index e54bf96d..a12d3913 100644 --- a/test/unit/evaluate-by-operator/operator/divide.js +++ b/test/unit/evaluate-by-operator/operator/divide.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/divide'; describe('divide operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/equal.js b/test/unit/evaluate-by-operator/operator/equal.js index 99318374..8c4a1158 100644 --- a/test/unit/evaluate-by-operator/operator/equal.js +++ b/test/unit/evaluate-by-operator/operator/equal.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/equal'; describe('equal operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/formula-function.js b/test/unit/evaluate-by-operator/operator/formula-function.js index 13db24fc..ce8ee09e 100644 --- a/test/unit/evaluate-by-operator/operator/formula-function.js +++ b/test/unit/evaluate-by-operator/operator/formula-function.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import SUPPORTED_FORMULAS from '../../../../src/supported-formulas'; import func from '../../../../src/evaluate-by-operator/operator/formula-function'; diff --git a/test/unit/evaluate-by-operator/operator/greater-than-or-equal.js b/test/unit/evaluate-by-operator/operator/greater-than-or-equal.js index 2710c0d7..ae0138b2 100644 --- a/test/unit/evaluate-by-operator/operator/greater-than-or-equal.js +++ b/test/unit/evaluate-by-operator/operator/greater-than-or-equal.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/greater-than-or-equal'; describe('greater than or equal operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/greater-than.js b/test/unit/evaluate-by-operator/operator/greater-than.js index 9006741f..18c8d38a 100644 --- a/test/unit/evaluate-by-operator/operator/greater-than.js +++ b/test/unit/evaluate-by-operator/operator/greater-than.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/greater-than'; describe('greater than operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/less-than-or-equal.js b/test/unit/evaluate-by-operator/operator/less-than-or-equal.js index 9c1005ec..540c9008 100644 --- a/test/unit/evaluate-by-operator/operator/less-than-or-equal.js +++ b/test/unit/evaluate-by-operator/operator/less-than-or-equal.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/less-than-or-equal'; describe('less than or equal operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/less-than.js b/test/unit/evaluate-by-operator/operator/less-than.js index 3a7e1fea..834c7ed4 100644 --- a/test/unit/evaluate-by-operator/operator/less-than.js +++ b/test/unit/evaluate-by-operator/operator/less-than.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/less-than'; describe('less than operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/minus.js b/test/unit/evaluate-by-operator/operator/minus.js index 3d673ba6..b31067b5 100644 --- a/test/unit/evaluate-by-operator/operator/minus.js +++ b/test/unit/evaluate-by-operator/operator/minus.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/minus'; describe('minus operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/multiply.js b/test/unit/evaluate-by-operator/operator/multiply.js index b0542883..329af1b7 100644 --- a/test/unit/evaluate-by-operator/operator/multiply.js +++ b/test/unit/evaluate-by-operator/operator/multiply.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/multiply'; describe('multiply operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/non-equal.js b/test/unit/evaluate-by-operator/operator/non-equal.js index 70d0ec22..7ff085e1 100644 --- a/test/unit/evaluate-by-operator/operator/non-equal.js +++ b/test/unit/evaluate-by-operator/operator/non-equal.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/not-equal'; describe('not equal operator', () => { diff --git a/test/unit/evaluate-by-operator/operator/power.js b/test/unit/evaluate-by-operator/operator/power.js index 54ca60ea..91360610 100644 --- a/test/unit/evaluate-by-operator/operator/power.js +++ b/test/unit/evaluate-by-operator/operator/power.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/power'; describe('power operator', () => { diff --git a/test/unit/helper/cell.js b/test/unit/helper/cell.js index bd9c8c3b..0c91eaa3 100644 --- a/test/unit/helper/cell.js +++ b/test/unit/helper/cell.js @@ -1,4 +1,11 @@ -import {extractLabel, toLabel, columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, rowLabelToIndex} from '../../../src/helper/cell'; +import { + extractLabel, + toLabel, + columnIndexToLabel, + columnLabelToIndex, + rowIndexToLabel, + rowLabelToIndex, +} from '../../../src/helper/cell'; describe('.extractLabel()', () => { it('should correctly extract coordinates', () => { @@ -12,7 +19,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: false, - } + }, ]); expect(extractLabel('a1')).toMatchObject([ { @@ -24,7 +31,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: false, - } + }, ]); expect(extractLabel('A$1')).toMatchObject([ { @@ -36,7 +43,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: false, - } + }, ]); expect(extractLabel('a$1')).toMatchObject([ { @@ -48,7 +55,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: false, - } + }, ]); expect(extractLabel('$A1')).toMatchObject([ { @@ -60,7 +67,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: true, - } + }, ]); expect(extractLabel('$A$1')).toMatchObject([ { @@ -72,7 +79,7 @@ describe('.extractLabel()', () => { index: 0, label: 'A', isAbsolute: true, - } + }, ]); expect(extractLabel('$AG199')).toMatchObject([ { @@ -84,7 +91,7 @@ describe('.extractLabel()', () => { index: 32, label: 'AG', isAbsolute: true, - } + }, ]); expect(extractLabel('$Ag199')).toMatchObject([ { @@ -96,7 +103,7 @@ describe('.extractLabel()', () => { index: 32, label: 'AG', isAbsolute: true, - } + }, ]); expect(extractLabel('$$AG199')).toMatchObject([]); expect(extractLabel('AG$$199')).toMatchObject([]); diff --git a/test/unit/parser.js b/test/unit/parser.js index 5d068554..2b7773b0 100644 --- a/test/unit/parser.js +++ b/test/unit/parser.js @@ -135,7 +135,7 @@ describe('Parser', () => { }); it('should return variable when it was set', () => { - parser.getVariable = jest.fn((name) => name === 'bar' ? 'foo' : 'baz'); + parser.getVariable = jest.fn((name) => (name === 'bar' ? 'foo' : 'baz')); expect(parser._callVariable('bar')).toBe('foo'); expect(parser._callVariable('barrr')).toBe('baz'); @@ -172,7 +172,7 @@ describe('Parser', () => { } else if (row.index === 3 && column.index === 7 && column.isAbsolute) { value = true; } else if (row.index === 4 && row.isAbsolute && column.index === 7 && column.isAbsolute) { - value = .9; + value = 0.9; } done(value); @@ -208,7 +208,7 @@ describe('Parser', () => { value = [[true, false], [true, true]]; } else if (row1.index === 4 && row1.isAbsolute && column1.index === 7 && column1.isAbsolute) { - value = .9; + value = 0.9; } done(value); diff --git a/yarn.lock b/yarn.lock index b1e46f9c..4b294dc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,12 +15,12 @@ abab@^1.0.3: resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" acorn-dynamic-import@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.1.tgz#23f671eb6e650dab277fef477c321b1178a8cca2" + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" dependencies: acorn "^4.0.3" @@ -40,7 +40,7 @@ acorn@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" -acorn@^3.0.4, acorn@^3.1.0: +acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" @@ -52,9 +52,9 @@ ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv@^4.7.0: - version "4.11.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.2.tgz#f166c3c11cbc6cb9dcc102a5bcfe5b72c95287e6" +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -83,9 +83,11 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansicolors@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" +ansi-styles@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.0.0.tgz#5404e93a544c4fec7f048262977bebfe3155e0c1" + dependencies: + color-convert "^1.0.0" anymatch@^1.3.0: version "1.3.0" @@ -175,15 +177,15 @@ assert@^1.1.1: dependencies: util "0.10.3" -ast-types@0.9.5: - version "0.9.5" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.5.tgz#1a660a09945dbceb1f9c9cbb715002617424e04a" +ast-types@0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9" async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" -async@0.2.x, async@~0.2.6, async@~0.2.9: +async@0.2.x, async@~0.2.9: version "0.2.10" resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" @@ -192,8 +194,8 @@ async@^1.4.0, async@^1.4.2: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.2, async@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + version "2.1.5" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" dependencies: lodash "^4.14.0" @@ -210,12 +212,12 @@ aws4@^1.2.1: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" babel-cli@^6.3.15: - version "6.22.2" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.22.2.tgz#3f814c8acf52759082b8fedd9627f938936ab559" + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.0.tgz#a05ffd210dca0c288a26d5319c5ac8669a265ad0" dependencies: - babel-core "^6.22.1" - babel-polyfill "^6.22.0" - babel-register "^6.22.0" + babel-core "^6.24.0" + babel-polyfill "^6.23.0" + babel-register "^6.24.0" babel-runtime "^6.22.0" commander "^2.8.1" convert-source-map "^1.1.0" @@ -238,19 +240,19 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: esutils "^2.0.2" js-tokens "^3.0.0" -babel-core@^6.0.0, babel-core@^6.17.0, babel-core@^6.22.0, babel-core@^6.22.1: - version "6.22.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648" +babel-core@^6.0.0, babel-core@^6.17.0, babel-core@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.0.tgz#8f36a0a77f5c155aed6f920b844d23ba56742a02" dependencies: babel-code-frame "^6.22.0" - babel-generator "^6.22.0" - babel-helpers "^6.22.0" - babel-messages "^6.22.0" - babel-register "^6.22.0" + babel-generator "^6.24.0" + babel-helpers "^6.23.0" + babel-messages "^6.23.0" + babel-register "^6.24.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.1" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" babylon "^6.11.0" convert-source-map "^1.1.0" debug "^2.1.1" @@ -272,17 +274,18 @@ babel-eslint@^7.0.0: babylon "^6.13.0" lodash.pickby "^4.6.0" -babel-generator@^6.18.0, babel-generator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" +babel-generator@^6.18.0, babel-generator@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.0.tgz#eba270a8cc4ce6e09a61be43465d7c62c1f87c56" dependencies: - babel-messages "^6.22.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.2.0" source-map "^0.5.0" + trim-right "^1.0.1" babel-helper-call-delegate@^6.22.0: version "6.22.0" @@ -293,24 +296,24 @@ babel-helper-call-delegate@^6.22.0: babel-traverse "^6.22.0" babel-types "^6.22.0" -babel-helper-define-map@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.22.0.tgz#9544e9502b2d6dfe7d00ff60e82bd5a7a89e95b7" +babel-helper-define-map@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz#1444f960c9691d69a2ced6a205315f8fd00804e7" dependencies: - babel-helper-function-name "^6.22.0" + babel-helper-function-name "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" lodash "^4.2.0" -babel-helper-function-name@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz#51f1bdc4bb89b15f57a9b249f33d742816dcbefc" +babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" dependencies: babel-helper-get-function-arity "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-helper-get-function-arity@^6.22.0: version "6.22.0" @@ -326,12 +329,12 @@ babel-helper-hoist-variables@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" -babel-helper-optimise-call-expression@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.22.0.tgz#f8d5d4b40a6e2605a6a7f9d537b581bea3756d15" +babel-helper-optimise-call-expression@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz#f3ee7eed355b4282138b33d02b78369e470622f5" dependencies: babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" babel-helper-regex@^6.22.0: version "6.22.0" @@ -341,44 +344,44 @@ babel-helper-regex@^6.22.0: babel-types "^6.22.0" lodash "^4.2.0" -babel-helper-replace-supers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.22.0.tgz#1fcee2270657548908c34db16bcc345f9850cf42" +babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" dependencies: - babel-helper-optimise-call-expression "^6.22.0" - babel-messages "^6.22.0" + babel-helper-optimise-call-expression "^6.23.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" -babel-helpers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.22.0.tgz#d275f55f2252b8101bff07bc0c556deda657392c" +babel-helpers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.23.0.tgz#4f8f2e092d0b6a8808a4bde79c27f1e2ecf0d992" dependencies: babel-runtime "^6.22.0" - babel-template "^6.22.0" + babel-template "^6.23.0" -babel-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-18.0.0.tgz#17ebba8cb3285c906d859e8707e4e79795fb65e3" +babel-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-19.0.0.tgz#59323ced99a3a84d359da219ca881074ffc6ce3f" dependencies: babel-core "^6.0.0" - babel-plugin-istanbul "^3.0.0" - babel-preset-jest "^18.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^19.0.0" babel-loader@^6.2.5: - version "6.2.10" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" + version "6.4.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.4.0.tgz#e98c239662a22533b9e7a49594ef216d7635ea28" dependencies: find-cache-dir "^0.1.1" - loader-utils "^0.2.11" + loader-utils "^0.2.16" mkdirp "^0.5.1" object-assign "^4.0.1" -babel-messages@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: babel-runtime "^6.22.0" @@ -388,18 +391,17 @@ babel-plugin-check-es2015-constants@^6.3.13: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.1.2.tgz#11d5abde18425ec24b5d648c7e0b5d25cd354a22" +babel-plugin-istanbul@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.0.0.tgz#36bde8fbef4837e5ff0366531a2beabd7b1ffa10" dependencies: - find-up "^1.1.2" + find-up "^2.1.0" istanbul-lib-instrument "^1.4.2" - object-assign "^4.1.0" - test-exclude "^3.3.0" + test-exclude "^4.0.0" -babel-plugin-jest-hoist@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" +babel-plugin-jest-hoist@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz#4ae2a04ea612a6e73651f3fde52c178991304bea" babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" @@ -418,28 +420,28 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoping@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.22.0.tgz#00d6e3a0bebdcfe7536b9d653b44a9141e63e47e" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" dependencies: babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" lodash "^4.2.0" babel-plugin-transform-es2015-classes@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz#54d44998fd823d9dca15292324161c331c1b6f14" - dependencies: - babel-helper-define-map "^6.22.0" - babel-helper-function-name "^6.22.0" - babel-helper-optimise-call-expression "^6.22.0" - babel-helper-replace-supers "^6.22.0" - babel-messages "^6.22.0" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz#49b53f326202a2fd1b3bbaa5e2edd8a4f78643c1" + dependencies: + babel-helper-define-map "^6.23.0" + babel-helper-function-name "^6.23.0" + babel-helper-optimise-call-expression "^6.23.0" + babel-helper-replace-supers "^6.23.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-computed-properties@^6.3.13: version "6.22.0" @@ -449,14 +451,14 @@ babel-plugin-transform-es2015-computed-properties@^6.3.13: babel-template "^6.22.0" babel-plugin-transform-es2015-destructuring@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.22.0.tgz#8e0af2f885a0b2cf999d47c4c1dd23ce88cfa4c6" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-for-of@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.22.0.tgz#180467ad63aeea592a1caeee4bf1c8b3e2616265" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" @@ -475,13 +477,13 @@ babel-plugin-transform-es2015-literals@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-es2015-modules-commonjs@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz#6ca04e22b8e214fb50169730657e7a07dc941145" + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f" dependencies: babel-plugin-transform-strict-mode "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-object-super@^6.3.13: version "6.22.0" @@ -491,15 +493,15 @@ babel-plugin-transform-es2015-object-super@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-es2015-parameters@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.22.0.tgz#57076069232019094f27da8c68bb7162fe208dbb" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" dependencies: babel-helper-call-delegate "^6.22.0" babel-helper-get-function-arity "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-shorthand-properties@^6.3.13: version "6.22.0" @@ -549,8 +551,8 @@ babel-plugin-transform-es3-property-literals@^6.5.0: babel-runtime "^6.22.0" babel-plugin-transform-object-rest-spread@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" babel-runtime "^6.22.0" @@ -562,25 +564,25 @@ babel-plugin-transform-strict-mode@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" -babel-polyfill@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.22.0.tgz#1ac99ebdcc6ba4db1e2618c387b2084a82154a3b" +babel-polyfill@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" dependencies: babel-runtime "^6.22.0" core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e" +babel-preset-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz#22d67201d02324a195811288eb38294bb3cac396" dependencies: - babel-plugin-jest-hoist "^18.0.0" + babel-plugin-jest-hoist "^19.0.0" -babel-register@^6.16.3, babel-register@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" +babel-register@^6.16.3, babel-register@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.0.tgz#5e89f8463ba9970356d02eb07dabe3308b080cfd" dependencies: - babel-core "^6.22.0" + babel-core "^6.24.0" babel-runtime "^6.22.0" core-js "^2.4.0" home-or-tmp "^2.0.0" @@ -589,39 +591,39 @@ babel-register@^6.16.3, babel-register@^6.22.0: source-map-support "^0.4.2" babel-runtime@^6.22.0, babel-runtime@^6.9.2: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.16.0, babel-template@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" +babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" dependencies: babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: - version "6.22.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" +babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: babel-code-frame "^6.22.0" - babel-messages "^6.22.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" babylon "^6.15.0" debug "^2.2.0" globals "^9.0.0" invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" +babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.22.0, babel-types@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" dependencies: babel-runtime "^6.22.0" esutils "^2.0.2" @@ -629,8 +631,8 @@ babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.22.0: to-fast-properties "^1.0.1" babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.8.1: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" + version "6.16.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" balanced-match@^0.4.1: version "0.4.2" @@ -671,8 +673,8 @@ block-stream@*: inherits "~2.0.0" bluebird@^3.1.2, bluebird@^3.4.6: - version "3.4.7" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.6" @@ -700,8 +702,8 @@ braces@^1.8.2: repeat-element "^1.1.2" brorand@^1.0.1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.0.7.tgz#6677fa5e4901bdbf9c9ec2a748e28dca407a9bfc" + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" browser-resolve@^1.11.2: version "1.11.2" @@ -766,6 +768,12 @@ bser@1.0.2: dependencies: node-int64 "^0.4.0" +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -812,16 +820,9 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -cardinal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" - dependencies: - ansicolors "~0.2.1" - redeyed "~1.0.0" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" center-align@^0.1.1: version "0.1.3" @@ -899,19 +900,12 @@ cli-cursor@^1.0.1: dependencies: restore-cursor "^1.0.1" -cli-table@^0.3.1, cli-table@~0.3.1: +cli-table@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" dependencies: colors "1.0.3" -cli-usage@^0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" - dependencies: - marked "^0.3.6" - marked-terminal "^1.6.2" - cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" @@ -940,6 +934,16 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + colors@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" @@ -958,7 +962,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.5.0, commander@^2.8.1, commander@^2.9.0, commander@~2.9.0: +commander@^2.5.0, commander@^2.8.1, commander@~2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -1023,8 +1027,8 @@ content-type-parser@^1.0.1: resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" convert-source-map@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + version "1.4.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" core-js@^2.4.0: version "2.4.1" @@ -1058,16 +1062,18 @@ create-hmac@^1.1.0, create-hmac@^1.1.2: inherits "^2.0.1" cross-env@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.1.4.tgz#56e8bca96f17908a6eb1bc2012ca126f92842130" + version "3.2.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.3.tgz#a43a0799b8ec422d0279b829ce8d7cf2da6b17ac" dependencies: - cross-spawn "^3.0.1" + cross-spawn "^5.1.0" + is-windows "^1.0.0" -cross-spawn@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" +cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: lru-cache "^4.0.1" + shebang-command "^1.2.0" which "^1.2.9" cryptiles@2.x.x: @@ -1136,8 +1142,8 @@ debug@2.2.0, debug@~2.2.0: ms "0.7.1" debug@^2.1.1, debug@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + version "2.6.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.2.tgz#dfa96a861ee9b8c2f29349b3bcc41aa599a71e0f" dependencies: ms "0.7.2" @@ -1201,10 +1207,10 @@ detect-indent@^4.0.0: repeating "^2.0.0" detective@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.3.2.tgz#77697e2e7947ac3fe7c8e26a6d6f115235afa91c" + version "4.5.0" + resolved "https://registry.yarnpkg.com/detective/-/detective-4.5.0.tgz#6e5a8c6b26e6c7a254b1c6b6d7490d98ec91edd1" dependencies: - acorn "^3.1.0" + acorn "^4.0.3" defined "^1.0.0" diff@^3.0.0, diff@^3.0.1: @@ -1269,13 +1275,16 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" elliptic@^6.0.0: - version "6.3.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" dependencies: bn.js "^4.4.0" brorand "^1.0.1" hash.js "^1.0.0" + hmac-drbg "^1.0.0" inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" emojis-list@^2.0.0: version "2.1.0" @@ -1305,8 +1314,8 @@ entities@~1.1.1: prr "~0.0.0" error-ex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" @@ -1404,6 +1413,10 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-config-airbnb-base@^11.1.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.1.tgz#61e9e89e4eb89f474f6913ac817be9fbb59063e0" + eslint-import-resolver-node@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" @@ -1435,8 +1448,8 @@ eslint-plugin-import@^2.2.0: pkg-up "^1.0.0" eslint@^3.8.1: - version "3.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.15.0.tgz#bdcc6a6c5ffe08160e7b93c066695362a91e30f2" + version "3.17.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" @@ -1496,10 +1509,6 @@ esprima@^3.1.1, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" -esprima@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" - esrecurse@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" @@ -1608,12 +1617,18 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" -fb-watchman@^1.8.0, fb-watchman@^1.9.0: +fb-watchman@^1.8.0: version "1.9.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" dependencies: bser "1.0.2" +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -1657,13 +1672,19 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" -find-up@^1.0.0, find-up@^1.1.2: +find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + flat-cache@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" @@ -1673,15 +1694,15 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -for-in@^0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" for-own@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: - for-in "^0.1.5" + for-in "^1.0.1" forever-agent@~0.6.1: version "0.6.1" @@ -1712,8 +1733,8 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" fsevents@^1.0.0: - version "1.0.17" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.17.tgz#8537f3f12272678765b4fd6528c0f1f66f8f4558" + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" dependencies: nan "^2.3.0" node-pre-gyp "^0.6.29" @@ -1727,8 +1748,8 @@ fstream-ignore@~1.0.5: minimatch "^3.0.0" fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -1822,8 +1843,8 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.1: path-is-absolute "^1.0.0" globals@^9.0.0, globals@^9.14.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + version "9.16.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" globby@^5.0.0: version "5.0.0" @@ -1844,7 +1865,7 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -growly@^1.2.0: +growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -1858,14 +1879,16 @@ handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" + ajv "^4.9.1" + har-schema "^1.0.5" has-ansi@^2.0.0: version "2.0.0" @@ -1887,7 +1910,7 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" -hash.js@^1.0.0: +hash.js@^1.0.0, hash.js@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" dependencies: @@ -1902,6 +1925,14 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +hmac-drbg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.0.tgz#3db471f45aae4a994a0688322171f51b8b91bee5" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" @@ -1962,8 +1993,8 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" ignore@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.2.tgz#1c51e1ef53bab6ddc15db4d9ac4ec139eceb3410" + version "3.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.4.tgz#4055e03596729a8fabe45a43c100ad5ed815c4e8" imurmurhash@^0.1.4: version "0.1.4" @@ -2062,8 +2093,8 @@ is-binary-path@^1.0.0: binary-extensions "^1.0.0" is-buffer@^1.0.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" is-builtin-module@^1.0.0: version "1.0.0" @@ -2117,9 +2148,9 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" +is-my-json-valid@^2.10.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" @@ -2178,6 +2209,10 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.0.tgz#c61d61020c3ebe99261b781bd3d1622395f547f8" + is@~0.2.6: version "0.2.7" resolved "https://registry.yarnpkg.com/is/-/is-0.2.7.tgz#3b34a2c48f359972f35042849193ae7264b63562" @@ -2272,13 +2307,13 @@ jStat@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/jStat/-/jStat-1.5.3.tgz#470edc41f9ba93f99f8dfb4e665d7de6d7e47623" -jest-changed-files@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" +jest-changed-files@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824" -jest-cli@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.1.0.tgz#5ead36ecad420817c2c9baa2aa7574f63257b3d6" +jest-cli@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-19.0.2.tgz#cc3620b62acac5f2d93a548cb6ef697d4ec85443" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" @@ -2288,171 +2323,191 @@ jest-cli@^18.1.0: istanbul-api "^1.1.0-alpha.1" istanbul-lib-coverage "^1.0.0" istanbul-lib-instrument "^1.1.1" - jest-changed-files "^17.0.2" - jest-config "^18.1.0" - jest-environment-jsdom "^18.1.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" - jest-jasmine2 "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-resolve-dependencies "^18.1.0" - jest-runtime "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" - node-notifier "^4.6.1" - sane "~1.4.1" - strip-ansi "^3.0.1" + jest-changed-files "^19.0.2" + jest-config "^19.0.2" + jest-environment-jsdom "^19.0.2" + jest-haste-map "^19.0.0" + jest-jasmine2 "^19.0.2" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve-dependencies "^19.0.0" + jest-runtime "^19.0.2" + jest-snapshot "^19.0.2" + jest-util "^19.0.2" + micromatch "^2.3.11" + node-notifier "^5.0.1" + slash "^1.0.0" + string-length "^1.0.1" throat "^3.0.0" which "^1.1.1" worker-farm "^1.3.1" yargs "^6.3.0" -jest-config@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.1.0.tgz#6111740a6d48aab86ff5a9e6ab0b98bd993b6ff4" +jest-config@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-19.0.2.tgz#1b9bd2db0ddd16df61c2b10a54009e1768da6411" dependencies: chalk "^1.1.1" - jest-environment-jsdom "^18.1.0" - jest-environment-node "^18.1.0" - jest-jasmine2 "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" - -jest-diff@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.1.0.tgz#4ff79e74dd988c139195b365dc65d87f606f4803" + jest-environment-jsdom "^19.0.2" + jest-environment-node "^19.0.2" + jest-jasmine2 "^19.0.2" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-validate "^19.0.2" + pretty-format "^19.0.0" + +jest-diff@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c" dependencies: chalk "^1.1.3" diff "^3.0.0" - jest-matcher-utils "^18.1.0" - pretty-format "^18.1.0" + jest-matcher-utils "^19.0.0" + pretty-format "^19.0.0" -jest-environment-jsdom@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.1.0.tgz#18b42f0c4ea2bae9f36cab3639b1e8f8c384e24e" +jest-environment-jsdom@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz#ceda859c4a4b94ab35e4de7dab54b926f293e4a3" dependencies: - jest-mock "^18.0.0" - jest-util "^18.1.0" - jsdom "^9.9.1" + jest-mock "^19.0.0" + jest-util "^19.0.2" + jsdom "^9.11.0" -jest-environment-node@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.1.0.tgz#4d6797572c8dda99acf5fae696eb62945547c779" +jest-environment-node@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-19.0.2.tgz#6e84079db87ed21d0c05e1f9669f207b116fe99b" dependencies: - jest-mock "^18.0.0" - jest-util "^18.1.0" + jest-mock "^19.0.0" + jest-util "^19.0.2" -jest-file-exists@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" +jest-file-exists@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" -jest-haste-map@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.1.0.tgz#06839c74b770a40c1a106968851df8d281c08375" +jest-haste-map@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-19.0.0.tgz#adde00b62b1fe04432a104b3254fc5004514b55e" dependencies: - fb-watchman "^1.9.0" + fb-watchman "^2.0.0" graceful-fs "^4.1.6" micromatch "^2.3.11" - sane "~1.4.1" + sane "~1.5.0" worker-farm "^1.3.1" -jest-jasmine2@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.1.0.tgz#094e104c2c189708766c77263bb2aecb5860a80b" +jest-jasmine2@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz#167991ac825981fb1a800af126e83afcca832c73" dependencies: graceful-fs "^4.1.6" - jest-matcher-utils "^18.1.0" - jest-matchers "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" + jest-matcher-utils "^19.0.0" + jest-matchers "^19.0.0" + jest-message-util "^19.0.0" + jest-snapshot "^19.0.2" -jest-matcher-utils@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.1.0.tgz#1ac4651955ee2a60cef1e7fcc98cdfd773c0f932" +jest-matcher-utils@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" dependencies: chalk "^1.1.3" - pretty-format "^18.1.0" + pretty-format "^19.0.0" -jest-matchers@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.1.0.tgz#0341484bf87a1fd0bac0a4d2c899e2b77a3f1ead" +jest-matchers@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-19.0.0.tgz#c74ecc6ebfec06f384767ba4d6fa4a42d6755754" dependencies: - jest-diff "^18.1.0" - jest-matcher-utils "^18.1.0" - jest-util "^18.1.0" - pretty-format "^18.1.0" + jest-diff "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + +jest-message-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-19.0.0.tgz#721796b89c0e4d761606f9ba8cb828a3b6246416" + dependencies: + chalk "^1.1.1" + micromatch "^2.3.11" + +jest-mock@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-19.0.0.tgz#67038641e9607ab2ce08ec4a8cb83aabbc899d01" -jest-mock@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" +jest-regex-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-19.0.0.tgz#b7754587112aede1456510bb1f6afe74ef598691" -jest-resolve-dependencies@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.1.0.tgz#8134fb5caf59c9ed842fe0152ab01c52711f1bbb" +jest-resolve-dependencies@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz#a741ad1fa094140e64ecf2642a504f834ece22ee" dependencies: - jest-file-exists "^17.0.0" - jest-resolve "^18.1.0" + jest-file-exists "^19.0.0" -jest-resolve@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.1.0.tgz#6800accb536658c906cd5e29de412b1ab9ac249b" +jest-resolve@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-19.0.2.tgz#5793575de4f07aec32f7d7ff0c6c181963eefb3c" dependencies: browser-resolve "^1.11.2" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" + jest-haste-map "^19.0.0" resolve "^1.2.0" -jest-runtime@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.1.0.tgz#3abfd687175b21fc3b85a2b8064399e997859922" +jest-runtime@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-19.0.2.tgz#d9a43e72de416d27d196fd9c7940d98fe6685407" dependencies: babel-core "^6.0.0" - babel-jest "^18.0.0" - babel-plugin-istanbul "^3.0.0" + babel-jest "^19.0.0" + babel-plugin-istanbul "^4.0.0" chalk "^1.1.3" graceful-fs "^4.1.6" - jest-config "^18.1.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" + jest-config "^19.0.2" + jest-file-exists "^19.0.0" + jest-haste-map "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-util "^19.0.2" + json-stable-stringify "^1.0.1" micromatch "^2.3.11" + strip-bom "3.0.0" yargs "^6.3.0" -jest-snapshot@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.1.0.tgz#55b96d2ee639c9bce76f87f2a3fd40b71c7a5916" +jest-snapshot@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-19.0.2.tgz#9c1b216214f7187c38bfd5c70b1efab16b0ff50b" dependencies: - jest-diff "^18.1.0" - jest-file-exists "^17.0.0" - jest-matcher-utils "^18.1.0" - jest-util "^18.1.0" + chalk "^1.1.3" + jest-diff "^19.0.0" + jest-file-exists "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-util "^19.0.2" natural-compare "^1.4.0" - pretty-format "^18.1.0" + pretty-format "^19.0.0" -jest-util@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.1.0.tgz#3a99c32114ab17f84be094382527006e6d4bfc6a" +jest-util@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-19.0.2.tgz#e0a0232a2ab9e6b2b53668bdb3534c2b5977ed41" dependencies: chalk "^1.1.1" - diff "^3.0.0" graceful-fs "^4.1.6" - jest-file-exists "^17.0.0" - jest-mock "^18.0.0" + jest-file-exists "^19.0.0" + jest-message-util "^19.0.0" + jest-mock "^19.0.0" + jest-validate "^19.0.2" + leven "^2.0.0" mkdirp "^0.5.1" -jest@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-18.1.0.tgz#bcebf1e203dee5c2ad2091c805300a343d9e6c7d" +jest-validate@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.2.tgz#dc534df5f1278d5b63df32b14241d4dbf7244c0c" + dependencies: + chalk "^1.1.1" + jest-matcher-utils "^19.0.0" + leven "^2.0.0" + pretty-format "^19.0.0" + +jest@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-19.0.2.tgz#b794faaf8ff461e7388f28beef559a54f20b2c10" dependencies: - jest-cli "^18.1.0" + jest-cli "^19.0.2" jison-lex@0.3.x: version "0.3.4" @@ -2485,8 +2540,8 @@ js-tokens@^3.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" js-yaml@^3.5.1, js-yaml@^3.7.0: - version "3.8.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" + version "3.8.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" dependencies: argparse "^1.0.7" esprima "^3.1.1" @@ -2500,8 +2555,8 @@ js-yaml@~3.4.0: inherit "^2.2.2" jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jscs-jsdoc@^2.0.0: version "2.0.0" @@ -2551,9 +2606,9 @@ jsdoctypeparser@~1.2.0: dependencies: lodash "^3.7.0" -jsdom@^9.9.1: - version "9.10.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.10.0.tgz#72d04d9fd5f1164d016dc350ef889af6d0d1a25a" +jsdom@^9.11.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" dependencies: abab "^1.0.3" acorn "^4.0.4" @@ -2570,7 +2625,7 @@ jsdom@^9.9.1: sax "^1.2.1" symbol-tree "^3.2.1" tough-cookie "^2.3.2" - webidl-conversions "^3.0.1" + webidl-conversions "^4.0.0" whatwg-encoding "^1.0.1" whatwg-url "^4.3.0" xml-name-validator "^2.0.1" @@ -2661,6 +2716,10 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +leven@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -2686,67 +2745,21 @@ loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" -loader-utils@^0.2.11, loader-utils@^0.2.16: - version "0.2.16" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" dependencies: big.js "^3.1.3" emojis-list "^2.0.0" json5 "^0.5.0" object-assign "^4.0.1" -lodash._arraycopy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" - -lodash._arrayeach@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._baseclone@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" - dependencies: - lodash._arraycopy "^3.0.0" - lodash._arrayeach "^3.0.0" - lodash._baseassign "^3.0.0" - lodash._basefor "^3.0.0" - lodash.isarray "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basefor@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" - -lodash._bindcallback@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.clonedeep@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" dependencies: - lodash._baseclone "^3.0.0" - lodash._bindcallback "^3.0.0" + p-locate "^2.0.0" + path-exists "^3.0.0" lodash.cond@^4.3.0: version "4.5.2" @@ -2756,22 +2769,6 @@ lodash.flatten@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" @@ -2807,20 +2804,6 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -marked-terminal@^1.6.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" - dependencies: - cardinal "^1.0.0" - chalk "^1.1.3" - cli-table "^0.3.1" - lodash.assign "^4.2.0" - node-emoji "^1.4.1" - -marked@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -2871,6 +2854,10 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -2923,12 +2910,6 @@ ncp@0.4.x: version "0.4.2" resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.4.2.tgz#abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574" -node-emoji@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.5.1.tgz#fd918e412769bf8c448051238233840b2aff16a1" - dependencies: - string.prototype.codepointat "^0.2.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -2961,17 +2942,14 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" -node-notifier@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" +node-notifier@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.0.2.tgz#4438449fe69e321f941cef943986b0797032701b" dependencies: - cli-usage "^0.1.1" - growly "^1.2.0" - lodash.clonedeep "^3.0.0" - minimist "^1.1.1" - semver "^5.1.0" + growly "^1.3.0" + semver "^5.3.0" shellwords "^0.1.0" - which "^1.0.5" + which "^1.2.12" node-pre-gyp@^0.6.29: version "0.6.33" @@ -3014,8 +2992,8 @@ nopt@~3.0.6: abbrev "1" normalize-package-data@^2.3.2: - version "2.3.5" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + version "2.3.6" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -3146,6 +3124,16 @@ output-file-sync@^1.1.0: mkdirp "^0.5.1" object-assign "^4.1.0" +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" @@ -3189,6 +3177,10 @@ path-exists@^2.0.0: dependencies: pinkie-promise "^2.0.0" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -3219,6 +3211,10 @@ pbkdf2@^3.0.3: dependencies: create-hmac "^1.1.2" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -3265,11 +3261,11 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -pretty-format@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.1.0.tgz#fb65a86f7a7f9194963eee91865c1bcf1039e284" +pretty-format@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" dependencies: - ansi-styles "^2.2.1" + ansi-styles "^3.0.0" private@^0.1.6, private@~0.1.5: version "0.1.7" @@ -3327,9 +3323,9 @@ q@^1.1.2: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" querystring-es3@^0.2.0: version "0.2.1" @@ -3351,13 +3347,13 @@ randombytes@^2.0.0, randombytes@^2.0.1: resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" rc@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + version "1.1.7" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea" dependencies: deep-extend "~0.4.0" ini "~1.3.0" minimist "^1.2.0" - strip-json-comments "~1.0.4" + strip-json-comments "~2.0.1" read-pkg-up@^1.0.1: version "1.0.1" @@ -3390,8 +3386,8 @@ readable-stream@1.1: string_decoder "~0.10.x" "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + version "2.2.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.3.tgz#9cf49463985df016c8ae8813097a9293a9b33729" dependencies: buffer-shims "^1.0.0" core-util-is "~1.0.0" @@ -3431,10 +3427,10 @@ readline2@^1.0.1: mute-stream "0.0.5" recast@^0.11.17: - version "0.11.21" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.21.tgz#4e83081c6359ecb2e526d14f4138879333f20ac9" + version "0.11.23" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3" dependencies: - ast-types "0.9.5" + ast-types "0.9.6" esprima "~3.1.0" private "~0.1.5" source-map "~0.5.0" @@ -3445,19 +3441,13 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -redeyed@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" - dependencies: - esprima "~3.0.0" - regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" regenerator-runtime@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" + version "0.10.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" regex-cache@^0.4.2: version "0.4.3" @@ -3499,17 +3489,17 @@ repeating@^2.0.0: is-finite "^1.0.0" request@^2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" - caseless "~0.11.0" + caseless "~0.12.0" combined-stream "~1.0.5" extend "~3.0.0" forever-agent "~0.6.1" form-data "~2.1.1" - har-validator "~2.0.6" + har-validator "~4.2.1" hawk "~3.1.3" http-signature "~1.1.0" is-typedarray "~1.0.0" @@ -3517,10 +3507,12 @@ request@^2.79.0: json-stringify-safe "~5.0.1" mime-types "~2.1.7" oauth-sign "~0.8.1" - qs "~6.3.0" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" stringstream "~0.0.4" tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" + tunnel-agent "^0.6.0" uuid "^3.0.0" require-directory@^2.1.1: @@ -3551,8 +3543,10 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" resolve@^1.1.6, resolve@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" + version "1.3.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" + dependencies: + path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" @@ -3571,9 +3565,9 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" +rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.4.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" @@ -3581,6 +3575,12 @@ rimraf@~2.2.6: version "2.2.8" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" +rimraf@~2.5.1, rimraf@~2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + ripemd160@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" @@ -3611,10 +3611,15 @@ rx@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" -sane@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +sane@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.5.0.tgz#a4adeae764d048621ecb27d5f9ecf513101939f3" dependencies: + anymatch "^1.3.0" exec-sh "^0.2.0" fb-watchman "^1.8.0" minimatch "^3.0.2" @@ -3626,7 +3631,7 @@ sax@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -3648,9 +3653,19 @@ sha.js@^2.3.6: dependencies: inherits "^2.0.1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + shelljs@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -3736,8 +3751,8 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" + version "1.11.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -3771,6 +3786,12 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3786,10 +3807,6 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" -string.prototype.codepointat@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" - string_decoder@^0.10.25, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -3804,17 +3821,17 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-json-comments@~1.0.2, strip-json-comments@~1.0.4: +strip-json-comments@~1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" @@ -3833,8 +3850,8 @@ supports-color@^3.1.0, supports-color@^3.1.2: has-flag "^1.0.0" symbol-tree@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb" + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" table@^3.7.8: version "3.8.3" @@ -3879,9 +3896,9 @@ temp@^0.8.3: os-tmpdir "^1.0.0" rimraf "~2.2.6" -test-exclude@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-3.3.0.tgz#7a17ca1239988c98367b0621456dbb7d4bc38977" +test-exclude@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.0.0.tgz#0ddc0100b8ae7e88b34eb4fd98a907e961991900" dependencies: arrify "^1.0.1" micromatch "^2.3.11" @@ -3947,6 +3964,10 @@ tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" @@ -3955,9 +3976,11 @@ tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" @@ -3974,10 +3997,9 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@^2.6, uglify-js@^2.7.5: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" + version "2.8.12" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.12.tgz#8a50f5d482243650b7108f6080aa3a6afe2a6c55" dependencies: - async "~0.2.6" source-map "~0.5.1" uglify-to-browserify "~1.0.0" yargs "~3.10.0" @@ -4085,8 +4107,8 @@ vow-queue@^0.4.1: vow "~0.4.0" vow@^0.4.7, vow@~0.4.0, vow@~0.4.8: - version "0.4.13" - resolved "https://registry.yarnpkg.com/vow/-/vow-0.4.13.tgz#e7c14f1bd9c8be0e7359a4597fe2d1ef6d1a7e88" + version "0.4.15" + resolved "https://registry.yarnpkg.com/vow/-/vow-0.4.15.tgz#0579163aff6ba0ae05c456b2c0e4ca6373f111b3" walker@~1.0.5: version "1.0.7" @@ -4099,20 +4121,24 @@ watch@~0.10.0: resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" watchpack@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.2.0.tgz#15d4620f1e7471f13fcb551d5c030d2c3eb42dbb" + version "1.3.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" dependencies: async "^2.1.2" chokidar "^1.4.3" graceful-fs "^4.1.2" -webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: +webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" +webidl-conversions@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" + webpack-sources@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.4.tgz#ccc2c817e08e5fa393239412690bb481821393cd" + version "0.1.5" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750" dependencies: source-list-map "~0.1.7" source-map "~0.5.3" @@ -4149,8 +4175,8 @@ whatwg-encoding@^1.0.1: iconv-lite "0.4.13" whatwg-url@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.3.0.tgz#92aaee21f4f2a642074357d70ef8500a7cbb171a" + version "4.5.1" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.5.1.tgz#ba634f630ff0778212c52ea9055d2d061380b1bb" dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" @@ -4159,7 +4185,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.0.5, which@^1.1.1, which@^1.2.9: +which@^1.1.1, which@^1.2.12, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -4238,8 +4264,8 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" yallist@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + version "2.1.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.0.tgz#3a0f3b45f42cb60f822c92f69ade2bb88beb1ae0" yargs-parser@^4.2.0: version "4.2.1"