text: ["^ ","~:resource-id",["~:shadow.build.npm/resource","node_modules/mathjs/lib/cjs/expression/transform/filter.transform.js"],"~:js","shadow$provide.module$node_modules$mathjs$lib$cjs$expression$transform$filter_transform=function(global,require,module,exports){function _filter(x,callback){var args=(0,_function.maxArgumentCount)(callback);return(0,_array.filter)(x,function(value,index,array){return 1===args?callback(value):2===args?callback(value,[index+1]):callback(value,[index+1],array)})}Object.defineProperty(exports,\"__esModule\",{value:!0});exports.createFilterTransform=void 0;var _is=require(\"module$node_modules$mathjs$lib$cjs$utils$is\"),\n_array=require(\"module$node_modules$mathjs$lib$cjs$utils$array\"),_function=require(\"module$node_modules$mathjs$lib$cjs$utils$function\"),_compileInlineExpression=require(\"module$node_modules$mathjs$lib$cjs$expression$transform$utils$compileInlineExpression\");global=require(\"module$node_modules$mathjs$lib$cjs$utils$factory\");global=(0,global.factory)(\"filter\",[\"typed\"],function(_ref){function filterTransform(args,math,scope){var x,callback;args[0]&&(x=args[0].compile().evaluate(scope));args[1]&&(callback=\n(0,_is.isSymbolNode)(args[1])||(0,_is.isFunctionAssignmentNode)(args[1])?args[1].compile().evaluate(scope):(0,_compileInlineExpression.compileInlineExpression)(args[1],math,scope));return filter(x,callback)}_ref=_ref.typed;filterTransform.rawArgs=!0;var filter=_ref(\"filter\",{\"Array, function\":_filter,\"Matrix, function\":function(x,test){return x.create(_filter(x.toArray(),test))},\"Array, RegExp\":_array.filterRegExp,\"Matrix, RegExp\":function(x,test){return x.create((0,_array.filterRegExp)(x.toArray(),\ntest))}});return filterTransform},{isTransformFunction:!0});exports.createFilterTransform=global}","~:source","shadow$provide[\"module$node_modules$mathjs$lib$cjs$expression$transform$filter_transform\"] = function(global,require,module,exports) {\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.createFilterTransform = void 0;\n\nvar _is = require(\"../../utils/is.js\");\n\nvar _array = require(\"../../utils/array.js\");\n\nvar _function = require(\"../../utils/function.js\");\n\nvar _compileInlineExpression = require(\"./utils/compileInlineExpression.js\");\n\nvar _factory = require(\"../../utils/factory.js\");\n\nvar name = 'filter';\nvar dependencies = ['typed'];\nvar createFilterTransform = /* #__PURE__ */(0, _factory.factory)(name, dependencies, function (_ref) {\n  var typed = _ref.typed;\n\n  /**\n   * Attach a transform function to math.filter\n   * Adds a property transform containing the transform function.\n   *\n   * This transform adds support for equations as test function for math.filter,\n   * so you can do something like 'filter([3, -2, 5], x > 0)'.\n   */\n  function filterTransform(args, math, scope) {\n    var x, callback;\n\n    if (args[0]) {\n      x = args[0].compile().evaluate(scope);\n    }\n\n    if (args[1]) {\n      if ((0, _is.isSymbolNode)(args[1]) || (0, _is.isFunctionAssignmentNode)(args[1])) {\n        // a function pointer, like filter([3, -2, 5], myTestFunction)\n        callback = args[1].compile().evaluate(scope);\n      } else {\n        // an expression like filter([3, -2, 5], x > 0)\n        callback = (0, _compileInlineExpression.compileInlineExpression)(args[1], math, scope);\n      }\n    }\n\n    return filter(x, callback);\n  }\n\n  filterTransform.rawArgs = true; // one based version of function filter\n\n  var filter = typed('filter', {\n    'Array, function': _filter,\n    'Matrix, function': function MatrixFunction(x, test) {\n      return x.create(_filter(x.toArray(), test));\n    },\n    'Array, RegExp': _array.filterRegExp,\n    'Matrix, RegExp': function MatrixRegExp(x, test) {\n      return x.create((0, _array.filterRegExp)(x.toArray(), test));\n    }\n  });\n  return filterTransform;\n}, {\n  isTransformFunction: true\n});\n/**\n * Filter values in a callback given a callback function\n *\n * !!! Passes a one-based index !!!\n *\n * @param {Array} x\n * @param {Function} callback\n * @return {Array} Returns the filtered array\n * @private\n */\n\nexports.createFilterTransform = createFilterTransform;\n\nfunction _filter(x, callback) {\n  // figure out what number of arguments the callback function expects\n  var args = (0, _function.maxArgumentCount)(callback);\n  return (0, _array.filter)(x, function (value, index, array) {\n    // invoke the callback function with the right number of arguments\n    if (args === 1) {\n      return callback(value);\n    } else if (args === 2) {\n      return callback(value, [index + 1]);\n    } else {\n      // 3 or -1\n      return callback(value, [index + 1], array);\n    }\n  });\n}\n};","~:removed-requires",["~#set",[]],"~:actual-requires",["^5",["~$shadow.js","~$module$node_modules$mathjs$lib$cjs$utils$is","~$module$node_modules$mathjs$lib$cjs$utils$array","~$module$node_modules$mathjs$lib$cjs$utils$factory","~$module$node_modules$mathjs$lib$cjs$expression$transform$utils$compileInlineExpression","~$module$node_modules$mathjs$lib$cjs$utils$function"]],"~:properties",["^5",["rawArgs","__esModule","isTransformFunction","value","createFilterTransform"]],"~:compiled-at",1619135262576,"~:source-map-json","{\n\"version\":3,\n\"file\":\"module$node_modules$mathjs$lib$cjs$expression$transform$filter_transform.js\",\n\"lineCount\":4,\n\"mappings\":\"AAAAA,cAAA,CAAA,wEAAA,CAA6F,QAAQ,CAACC,MAAD,CAAQC,OAAR,CAAgBC,MAAhB,CAAuBC,OAAvB,CAAgC,CA+ErIC,QAASA,QAAO,CAACC,CAAD,CAAIC,QAAJ,CAAc,CAE5B,IAAIC,KAAO,CAAC,CAAA,CAAGC,SAAUC,CAAAA,gBAAd,EAAgCH,QAAhC,CACX,OAAO,CAAC,CAAA,CAAGI,MAAOC,CAAAA,MAAX,EAAmBN,CAAnB,CAAsB,QAAS,CAACO,KAAD,CAAQC,KAAR,CAAeC,KAAf,CAAsB,CAE1D,MAAa,EAAb,GAAIP,IAAJ,CACSD,QAAA,CAASM,KAAT,CADT,CAEoB,CAAb,GAAIL,IAAJ,CACED,QAAA,CAASM,KAAT,CAAgB,CAACC,KAAD,CAAS,CAAT,CAAhB,CADF,CAIEP,QAAA,CAASM,KAAT,CAAgB,CAACC,KAAD,CAAS,CAAT,CAAhB,CAA6BC,KAA7B,CARiD,CAArD,CAHqB,CA5E9BC,MAAOC,CAAAA,cAAP,CAAsBb,OAAtB,CAA+B,YAA/B,CAA6C,CAC3CS,MAAO,CAAA,CADoC,CAA7C,CAGAT,QAAQc,CAAAA,qBAAR,CAAgC,IAAK,EAErC,KAAIC,IAAMjB,OAAA,CAAQ,6CAAR,CAAV;AAEIS,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ACnD,MAAO/B,EAAEgC,CAAAA,MAAF,CAASjC,OAAA,CAAQC,CAAEiC,CAAAA,OAAF,EAAR,CAAqBF,IAArB,CAAT,CAD4C,CAF1B,CAK3B,gBAAiB1B,MAAO6B,CAAAA,YALG,CAM3B,iBAAkBC,QAAqB,CAACnC,CAAD,CAAI+B,IAAJ,CAAU,CAC/C,MAAO/B,EAAEgC,CAAAA,MAAF,CAAS,CAAC,CAAA,CAAG3B,MAAO6B,CAAAA,YAAX,EAAyBlC,CAAEiC,CAAAA,OAAF,EAAzB;AAAsCF,IAAtC,CAAT,CADwC,CANtB,CAAhB,CAUb,OAAOX,gBA1C4F,CAA1D,CA2CxC,CACDgB,oBAAqB,CAAA,CADpB,CA3CwC,CAyD3CtC,QAAQc,CAAAA,qBAAR,CAAgCA,MA7EqG;\",\n\"sources\":[\"node_modules/mathjs/lib/cjs/expression/transform/filter.transform.js\"],\n\"sourcesContent\":[\"shadow$provide[\\\"module$node_modules$mathjs$lib$cjs$expression$transform$filter_transform\\\"] = function(global,require,module,exports) {\\n\\\"use strict\\\";\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.createFilterTransform = void 0;\\n\\nvar _is = require(\\\"../../utils/is.js\\\");\\n\\nvar _array = require(\\\"../../utils/array.js\\\");\\n\\nvar _function = require(\\\"../../utils/function.js\\\");\\n\\nvar _compileInlineExpression = require(\\\"./utils/compileInlineExpression.js\\\");\\n\\nvar _factory = require(\\\"../../utils/factory.js\\\");\\n\\nvar name = 'filter';\\nvar dependencies = ['typed'];\\nvar createFilterTransform = /* #__PURE__ */(0, _factory.factory)(name, dependencies, function (_ref) {\\n  var typed = _ref.typed;\\n\\n  /**\\n   * Attach a transform function to math.filter\\n   * Adds a property transform containing the transform function.\\n   *\\n   * This transform adds support for equations as test function for math.filter,\\n   * so you can do something like 'filter([3, -2, 5], x > 0)'.\\n   */\\n  function filterTransform(args, math, scope) {\\n    var x, callback;\\n\\n    if (args[0]) {\\n      x = args[0].compile().evaluate(scope);\\n    }\\n\\n    if (args[1]) {\\n      if ((0, _is.isSymbolNode)(args[1]) || (0, _is.isFunctionAssignmentNode)(args[1])) {\\n        // a function pointer, like filter([3, -2, 5], myTestFunction)\\n        callback = args[1].compile().evaluate(scope);\\n      } else {\\n        // an expression like filter([3, -2, 5], x > 0)\\n        callback = (0, _compileInlineExpression.compileInlineExpression)(args[1], math, scope);\\n      }\\n    }\\n\\n    return filter(x, callback);\\n  }\\n\\n  filterTransform.rawArgs = true; // one based version of function filter\\n\\n  var filter = typed('filter', {\\n    'Array, function': _filter,\\n    'Matrix, function': function MatrixFunction(x, test) {\\n      return x.create(_filter(x.toArray(), test));\\n    },\\n    'Array, RegExp': _array.filterRegExp,\\n    'Matrix, RegExp': function MatrixRegExp(x, test) {\\n      return x.create((0, _array.filterRegExp)(x.toArray(), test));\\n    }\\n  });\\n  return filterTransform;\\n}, {\\n  isTransformFunction: true\\n});\\n/**\\n * Filter values in a callback given a callback function\\n *\\n * !!! Passes a one-based index !!!\\n *\\n * @param {Array} x\\n * @param {Function} callback\\n * @return {Array} Returns the filtered array\\n * @private\\n */\\n\\nexports.createFilterTransform = createFilterTransform;\\n\\nfunction _filter(x, callback) {\\n  // figure out what number of arguments the callback function expects\\n  var args = (0, _function.maxArgumentCount)(callback);\\n  return (0, _array.filter)(x, function (value, index, array) {\\n    // invoke the callback function with the right number of arguments\\n    if (args === 1) {\\n      return callback(value);\\n    } else if (args === 2) {\\n      return callback(value, [index + 1]);\\n    } else {\\n      // 3 or -1\\n      return callback(value, [index + 1], array);\\n    }\\n  });\\n}\\n};\"],\n\"names\":[\"shadow$provide\",\"global\",\"require\",\"module\",\"exports\",\"_filter\",\"x\",\"callback\",\"args\",\"_function\",\"maxArgumentCount\",\"_array\",\"filter\",\"value\",\"index\",\"array\",\"Object\",\"defineProperty\",\"createFilterTransform\",\"_is\",\"_compileInlineExpression\",\"_factory\",\"factory\",\"name\",\"dependencies\",\"_ref\",\"filterTransform\",\"math\",\"scope\",\"compile\",\"evaluate\",\"isSymbolNode\",\"isFunctionAssignmentNode\",\"compileInlineExpression\",\"typed\",\"rawArgs\",\"MatrixFunction\",\"test\",\"create\",\"toArray\",\"filterRegExp\",\"MatrixRegExp\",\"isTransformFunction\"]\n}\n"]