"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "docs", {
  enumerable: true,
  get: function get() {
    return _embeddedDocs.embeddedDocs;
  }
});
exports.reviver = exports.rationalize = exports.derivative = exports.simplify = exports.chain = exports.help = exports.Chain = exports.Help = exports.parser = exports.Parser = exports.evaluate = exports.compile = exports.parse = exports.FunctionNode = exports.SymbolNode = exports.RelationalNode = exports.RangeNode = exports.ParenthesisNode = exports.OperatorNode = exports.ObjectNode = exports.IndexNode = exports.FunctionAssignmentNode = exports.ConstantNode = exports.ConditionalNode = exports.BlockNode = exports.AssignmentNode = exports.ArrayNode = exports.AccessorNode = exports.Node = void 0;

var _number = require("../plain/number");

var _version = require("../version");

var _apply = require("../expression/transform/apply.transform");

var _filter = require("../expression/transform/filter.transform");

var _forEach = require("../expression/transform/forEach.transform");

var _map = require("../expression/transform/map.transform");

var _max = require("../expression/transform/max.transform");

var _mean = require("../expression/transform/mean.transform");

var _min = require("../expression/transform/min.transform");

var _range = require("../expression/transform/range.transform");

var _subset = require("../expression/transform/subset.transform");

var _sum = require("../expression/transform/sum.transform");

var _std = require("../expression/transform/std.transform");

var _variance = require("../expression/transform/variance.transform");

var _Node = require("../expression/node/Node");

var _AccessorNode = require("../expression/node/AccessorNode");

var _ArrayNode = require("../expression/node/ArrayNode");

var _AssignmentNode = require("../expression/node/AssignmentNode");

var _BlockNode = require("../expression/node/BlockNode");

var _ConditionalNode = require("../expression/node/ConditionalNode");

var _ConstantNode = require("../expression/node/ConstantNode");

var _FunctionAssignmentNode = require("../expression/node/FunctionAssignmentNode");

var _IndexNode = require("../expression/node/IndexNode");

var _ObjectNode = require("../expression/node/ObjectNode");

var _OperatorNode = require("../expression/node/OperatorNode");

var _ParenthesisNode = require("../expression/node/ParenthesisNode");

var _RangeNode = require("../expression/node/RangeNode");

var _RelationalNode = require("../expression/node/RelationalNode");

var _SymbolNode = require("../expression/node/SymbolNode");

var _FunctionNode = require("../expression/node/FunctionNode");

var _parse = require("../expression/parse");

var _compile = require("../expression/function/compile");

var _evaluate = require("../expression/function/evaluate");

var _Parser = require("../expression/Parser");

var _parser = require("../expression/function/parser");

var _Help = require("../expression/Help");

var _Chain = require("../type/chain/Chain");

var _help = require("../expression/function/help");

var _chain = require("../type/chain/function/chain");

var _simplify = require("../function/algebra/simplify");

var _derivative = require("../function/algebra/derivative");

var _rationalize = require("../function/algebra/rationalize");

var _reviver = require("../json/reviver");

var _functionsNumber = require("./functionsNumber");

var _embeddedDocs = require("../expression/embeddedDocs/embeddedDocs");

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var math = {}; // NOT pure!

var mathWithTransform = {}; // NOT pure!
// expression (4)

var Node =
/* #__PURE__ */
(0, _Node.createNode)({
  mathWithTransform: mathWithTransform
});
exports.Node = Node;
var AccessorNode =
/* #__PURE__ */
(0, _AccessorNode.createAccessorNode)({
  subset: _functionsNumber.subset,
  Node: Node
}); // FIXME: subset is heavy-weight

exports.AccessorNode = AccessorNode;
var ArrayNode =
/* #__PURE__ */
(0, _ArrayNode.createArrayNode)({
  Node: Node
});
exports.ArrayNode = ArrayNode;
var AssignmentNode =
/* #__PURE__ */
(0, _AssignmentNode.createAssignmentNode)({
  subset: _functionsNumber.subset,
  matrix: _functionsNumber.matrix,
  Node: Node
}); // FIXME: subset is heavy-weight

exports.AssignmentNode = AssignmentNode;
var BlockNode =
/* #__PURE__ */
(0, _BlockNode.createBlockNode)({
  ResultSet: _functionsNumber.ResultSet,
  Node: Node
});
exports.BlockNode = BlockNode;
var ConditionalNode =
/* #__PURE__ */
(0, _ConditionalNode.createConditionalNode)({
  Node: Node
});
exports.ConditionalNode = ConditionalNode;
var ConstantNode =
/* #__PURE__ */
(0, _ConstantNode.createConstantNode)({
  Node: Node
});
exports.ConstantNode = ConstantNode;
var FunctionAssignmentNode =
/* #__PURE__ */
(0, _FunctionAssignmentNode.createFunctionAssignmentNode)({
  typed: _functionsNumber.typed,
  Node: Node
});
exports.FunctionAssignmentNode = FunctionAssignmentNode;
var IndexNode =
/* #__PURE__ */
(0, _IndexNode.createIndexNode)({
  Range: _functionsNumber.Range,
  Node: Node
});
exports.IndexNode = IndexNode;
var ObjectNode =
/* #__PURE__ */
(0, _ObjectNode.createObjectNode)({
  Node: Node
});
exports.ObjectNode = ObjectNode;
var OperatorNode =
/* #__PURE__ */
(0, _OperatorNode.createOperatorNode)({
  Node: Node
});
exports.OperatorNode = OperatorNode;
var ParenthesisNode =
/* #__PURE__ */
(0, _ParenthesisNode.createParenthesisNode)({
  Node: Node
});
exports.ParenthesisNode = ParenthesisNode;
var RangeNode =
/* #__PURE__ */
(0, _RangeNode.createRangeNode)({
  Node: Node
});
exports.RangeNode = RangeNode;
var RelationalNode =
/* #__PURE__ */
(0, _RelationalNode.createRelationalNode)({
  Node: Node
});
exports.RelationalNode = RelationalNode;
var SymbolNode =
/* #__PURE__ */
(0, _SymbolNode.createSymbolNode)({
  math: math,
  Node: Node
});
exports.SymbolNode = SymbolNode;
var FunctionNode =
/* #__PURE__ */
(0, _FunctionNode.createFunctionNode)({
  math: math,
  Node: Node,
  SymbolNode: SymbolNode
});
exports.FunctionNode = FunctionNode;
var parse =
/* #__PURE__ */
(0, _parse.createParse)({
  typed: _functionsNumber.typed,
  config: _functionsNumber.config,
  numeric: _functionsNumber.numeric,
  AccessorNode: AccessorNode,
  ArrayNode: ArrayNode,
  AssignmentNode: AssignmentNode,
  BlockNode: BlockNode,
  ConditionalNode: ConditionalNode,
  ConstantNode: ConstantNode,
  FunctionAssignmentNode: FunctionAssignmentNode,
  FunctionNode: FunctionNode,
  IndexNode: IndexNode,
  ObjectNode: ObjectNode,
  OperatorNode: OperatorNode,
  ParenthesisNode: ParenthesisNode,
  RangeNode: RangeNode,
  RelationalNode: RelationalNode,
  SymbolNode: SymbolNode
});
exports.parse = parse;
var compile =
/* #__PURE__ */
(0, _compile.createCompile)({
  typed: _functionsNumber.typed,
  parse: parse
});
exports.compile = compile;
var evaluate =
/* #__PURE__ */
(0, _evaluate.createEvaluate)({
  typed: _functionsNumber.typed,
  parse: parse
});
exports.evaluate = evaluate;
var Parser =
/* #__PURE__ */
(0, _Parser.createParserClass)({
  parse: parse
}); // create (4)

exports.Parser = Parser;
var parser =
/* #__PURE__ */
(0, _parser.createParser)({
  math: math,
  typed: _functionsNumber.typed,
  Parser: Parser
}); // class (4)

exports.parser = parser;
var Help =
/* #__PURE__ */
(0, _Help.createHelpClass)({
  parse: parse
});
exports.Help = Help;
var Chain =
/* #__PURE__ */
(0, _Chain.createChainClass)({
  math: math
}); // type (4)

exports.Chain = Chain;
var help =
/* #__PURE__ */
(0, _help.createHelp)({
  math: math,
  typed: _functionsNumber.typed,
  Help: Help
});
exports.help = help;
var chain =
/* #__PURE__ */
(0, _chain.createChain)({
  typed: _functionsNumber.typed,
  Chain: Chain
}); // algebra (4)

exports.chain = chain;
var simplify =
/* #__PURE__ */
(0, _simplify.createSimplify)({
  config: _functionsNumber.config,
  typed: _functionsNumber.typed,
  parse: parse,
  add: _functionsNumber.add,
  subtract: _functionsNumber.subtract,
  multiply: _functionsNumber.multiply,
  divide: _functionsNumber.divide,
  pow: _functionsNumber.pow,
  isZero: _functionsNumber.isZero,
  equal: _functionsNumber.equal,
  math: math,
  ConstantNode: ConstantNode,
  FunctionNode: FunctionNode,
  OperatorNode: OperatorNode,
  ParenthesisNode: ParenthesisNode,
  SymbolNode: SymbolNode
});
exports.simplify = simplify;
var derivative =
/* #__PURE__ */
(0, _derivative.createDerivative)({
  config: _functionsNumber.config,
  typed: _functionsNumber.typed,
  parse: parse,
  simplify: simplify,
  equal: _functionsNumber.equal,
  isZero: _functionsNumber.isZero,
  numeric: _functionsNumber.numeric,
  ConstantNode: ConstantNode,
  FunctionNode: FunctionNode,
  OperatorNode: OperatorNode,
  ParenthesisNode: ParenthesisNode,
  SymbolNode: SymbolNode
});
exports.derivative = derivative;
var rationalize =
/* #__PURE__ */
(0, _rationalize.createRationalize)({
  config: _functionsNumber.config,
  typed: _functionsNumber.typed,
  simplify: simplify,
  parse: parse,
  add: _functionsNumber.add,
  subtract: _functionsNumber.subtract,
  multiply: _functionsNumber.multiply,
  divide: _functionsNumber.divide,
  pow: _functionsNumber.pow,
  isZero: _functionsNumber.isZero,
  equal: _functionsNumber.equal,
  math: math,
  ConstantNode: ConstantNode,
  FunctionNode: FunctionNode,
  OperatorNode: OperatorNode,
  ParenthesisNode: ParenthesisNode,
  SymbolNode: SymbolNode
}); // ----------------------------------------------------------------------------
// json

exports.rationalize = rationalize;
var reviver =
/* #__PURE__ */
(0, _reviver.createReviver)({
  classes: {
    // BigNumber,
    Chain: Chain,
    // Complex,
    // Fraction,
    // Matrix,
    // DenseMatrix,
    // SparseMatrix,
    // Spa,
    // FibonacciHeap,
    // ImmutableDenseMatrix,
    // Index,
    Range: _functionsNumber.Range,
    // ResultSet,
    // Unit,
    Help: Help
  },
  AccessorNode: AccessorNode,
  ArrayNode: ArrayNode,
  AssignmentNode: AssignmentNode,
  BlockNode: BlockNode,
  ConditionalNode: ConditionalNode,
  ConstantNode: ConstantNode,
  FunctionAssignmentNode: FunctionAssignmentNode,
  FunctionNode: FunctionNode,
  IndexNode: IndexNode,
  ObjectNode: ObjectNode,
  OperatorNode: OperatorNode,
  ParenthesisNode: ParenthesisNode,
  RangeNode: RangeNode,
  RelationalNode: RelationalNode,
  SymbolNode: SymbolNode
});
exports.reviver = reviver;

_extends(math, {
  Infinity: _functionsNumber._Infinity,
  LN10: _functionsNumber.LN10,
  LN2: _functionsNumber.LN2,
  LOG10E: _functionsNumber.LOG10E,
  LOG2E: _functionsNumber.LOG2E,
  NaN: _functionsNumber._NaN,
  SQRT2: _functionsNumber.SQRT2,
  SQRT1_2: _functionsNumber.SQRT1_2,
  abs: _functionsNumber.abs,
  acos: _functionsNumber.acos,
  acosh: _functionsNumber.acosh,
  acot: _functionsNumber.acot,
  acoth: _functionsNumber.acoth,
  acsc: _functionsNumber.acsc,
  acsch: _functionsNumber.acsch,
  add: _functionsNumber.add,
  addScalar: _functionsNumber.addScalar,
  and: _functionsNumber.and,
  // arg,
  asec: _functionsNumber.asec,
  asech: _functionsNumber.asech,
  asin: _functionsNumber.asin,
  asinh: _functionsNumber.asinh,
  atan: _functionsNumber.atan,
  atan2: _functionsNumber.atan2,
  atanh: _functionsNumber.atanh,
  // atomicMass,
  // avogadro,
  bellNumbers: _functionsNumber.bellNumbers,
  // bignumber,
  bitAnd: _functionsNumber.bitAnd,
  bitNot: _functionsNumber.bitNot,
  bitOr: _functionsNumber.bitOr,
  bitXor: _functionsNumber.bitXor,
  // bohrMagneton,
  // bohrRadius,
  // boltzmann,
  "boolean": _functionsNumber["boolean"],
  catalan: _functionsNumber.catalan,
  cbrt: _functionsNumber.cbrt,
  ceil: _functionsNumber.ceil,
  // classicalElectronRadius,
  clone: _functionsNumber.clone,
  combinations: _functionsNumber.combinations,
  compare: _functionsNumber.compare,
  compareNatural: _functionsNumber.compareNatural,
  compareText: _functionsNumber.compareText,
  // complex,
  composition: _functionsNumber.composition,
  // concat,
  // conductanceQuantum,
  config: _functionsNumber.config,
  // conj,
  cos: _functionsNumber.cos,
  cosh: _functionsNumber.cosh,
  cot: _functionsNumber.cot,
  coth: _functionsNumber.coth,
  // coulomb,
  // createUnit,
  // cross,
  csc: _functionsNumber.csc,
  csch: _functionsNumber.csch,
  // ctranspose,
  cube: _functionsNumber.cube,
  deepEqual: _functionsNumber.deepEqual,
  // det,
  // deuteronMass,
  // diag,
  // distance,
  divide: _functionsNumber.divide,
  divideScalar: _functionsNumber.divideScalar,
  // dot,
  // dotDivide,
  // dotMultiply,
  // dotPow,
  e: _number.e,
  // efimovFactor,
  // electricConstant,
  // electronMass,
  // elementaryCharge,
  equal: _functionsNumber.equal,
  equalScalar: _functionsNumber.equalScalar,
  equalText: _functionsNumber.equalText,
  erf: _functionsNumber.erf,
  exp: _functionsNumber.exp,
  // expm,
  expm1: _functionsNumber.expm1,
  // eye,
  factorial: _functionsNumber.factorial,
  "false": _functionsNumber._false,
  // faraday,
  // fermiCoupling,
  filter: _functionsNumber.filter,
  // fineStructure,
  // firstRadiation,
  fix: _functionsNumber.fix,
  // flatten,
  floor: _functionsNumber.floor,
  forEach: _functionsNumber.forEach,
  format: _functionsNumber.format,
  // fraction,
  gamma: _functionsNumber.gamma,
  // gasConstant,
  gcd: _functionsNumber.gcd,
  // getMatrixDataType,
  // gravitationConstant,
  // gravity,
  // hartreeEnergy,
  hypot: _functionsNumber.hypot,
  // i,
  // identity,
  // im,
  // index,
  // intersect,
  // inv,
  // inverseConductanceQuantum,
  isInteger: _functionsNumber.isInteger,
  isNaN: _functionsNumber.isNaN,
  isNegative: _functionsNumber.isNegative,
  isNumeric: _functionsNumber.isNumeric,
  hasNumericValue: _functionsNumber.hasNumericValue,
  isPositive: _functionsNumber.isPositive,
  isPrime: _functionsNumber.isPrime,
  isZero: _functionsNumber.isZero,
  // kldivergence,
  // klitzing,
  // kron,
  larger: _functionsNumber.larger,
  largerEq: _functionsNumber.largerEq,
  lcm: _functionsNumber.lcm,
  leftShift: _functionsNumber.leftShift,
  log: _functionsNumber.log,
  log10: _functionsNumber.log10,
  log1p: _functionsNumber.log1p,
  log2: _functionsNumber.log2,
  // loschmidt,
  // lsolve,
  // lup,
  // lusolve,
  mad: _functionsNumber.mad,
  // magneticConstant,
  // magneticFluxQuantum,
  // map,
  matrix: _functionsNumber.matrix,
  // FIXME: remove matrix here (subset.transform dependency)
  max: _functionsNumber.max,
  mean: _functionsNumber.mean,
  median: _functionsNumber.median,
  min: _functionsNumber.min,
  mod: _functionsNumber.mod,
  mode: _functionsNumber.mode,
  // molarMass,
  // molarMassC12,
  // molarPlanckConstant,
  // molarVolume,
  multinomial: _functionsNumber.multinomial,
  multiply: _functionsNumber.multiply,
  multiplyScalar: _functionsNumber.multiplyScalar,
  // neutronMass,
  norm: _functionsNumber.norm,
  not: _functionsNumber.not,
  nthRoot: _functionsNumber.nthRoot,
  // nthRoots,
  // nuclearMagneton,
  "null": _functionsNumber._null,
  number: _functionsNumber.number,
  numeric: _functionsNumber.numeric,
  // ones,
  or: _functionsNumber.or,
  partitionSelect: _functionsNumber.partitionSelect,
  permutations: _functionsNumber.permutations,
  phi: _number.phi,
  pi: _number.pi,
  pickRandom: _functionsNumber.pickRandom,
  // planckCharge,
  // planckConstant,
  // planckLength,
  // planckMass,
  // planckTemperature,
  // planckTime,
  pow: _functionsNumber.pow,
  print: _functionsNumber.print,
  prod: _functionsNumber.prod,
  // protonMass,
  // qr,
  quantileSeq: _functionsNumber.quantileSeq,
  // quantumOfCirculation,
  random: _functionsNumber.random,
  randomInt: _functionsNumber.randomInt,
  range: _functionsNumber.range,
  // re,
  // reducedPlanckConstant,
  // reshape,
  // resize,
  rightArithShift: _functionsNumber.rightArithShift,
  rightLogShift: _functionsNumber.rightLogShift,
  round: _functionsNumber.round,
  // rydberg,
  // sackurTetrode,
  sec: _functionsNumber.sec,
  sech: _functionsNumber.sech,
  // secondRadiation,
  // setCartesian,
  // setDifference,
  // setDistinct,
  // setIntersect,
  // setIsSubset,
  // setMultiplicity,
  // setPowerset,
  // setSize,
  // setSymDifference,
  // setUnion,
  sign: _functionsNumber.sign,
  sin: _functionsNumber.sin,
  sinh: _functionsNumber.sinh,
  // size,
  // slu,
  smaller: _functionsNumber.smaller,
  smallerEq: _functionsNumber.smallerEq,
  // sort,
  // sparse,
  // speedOfLight,
  // splitUnit,
  sqrt: _functionsNumber.sqrt,
  // sqrtm,
  square: _functionsNumber.square,
  // squeeze,
  std: _functionsNumber.std,
  // stefanBoltzmann,
  stirlingS2: _functionsNumber.stirlingS2,
  string: _functionsNumber.string,
  subset: _functionsNumber.subset,
  subtract: _functionsNumber.subtract,
  sum: _functionsNumber.sum,
  tan: _functionsNumber.tan,
  tanh: _functionsNumber.tanh,
  tau: _number.tau,
  // thomsonCrossSection,
  // to,
  // trace,
  // transpose,
  "true": _functionsNumber._true,
  typeOf: _functionsNumber.typeOf,
  typed: _functionsNumber.typed,
  unaryMinus: _functionsNumber.unaryMinus,
  unaryPlus: _functionsNumber.unaryPlus,
  unequal: _functionsNumber.unequal,
  // unit,
  // usolve,
  // vacuumImpedance,
  variance: _functionsNumber.variance,
  version: _version.version,
  // weakMixingAngle,
  // wienDisplacement,
  xgcd: _functionsNumber.xgcd,
  xor: _functionsNumber.xor,
  // zeros,
  'var': _functionsNumber.variance,
  'typeof': _functionsNumber.typeOf,
  PI: _number.pi,
  E: _number.e,
  help: help,
  parse: parse,
  parser: parser,
  compile: compile,
  evaluate: evaluate,
  eval: evaluate,
  chain: chain,
  simplify: simplify,
  derivative: derivative,
  rationalize: rationalize,
  reviver: reviver
});

_extends(mathWithTransform, math, {
  apply:
  /* #__PURE__ */
  (0, _apply.createApplyTransform)({
    typed: _functionsNumber.typed,
    isInteger: _functionsNumber.isInteger
  }),
  // concat: /* #__PURE__ */ createConcatTransform({ typed, matrix, isInteger }),
  filter:
  /* #__PURE__ */
  (0, _filter.createFilterTransform)({
    typed: _functionsNumber.typed
  }),
  forEach:
  /* #__PURE__ */
  (0, _forEach.createForEachTransform)({
    typed: _functionsNumber.typed
  }),
  // index: /* #__PURE__ */ createIndexTransform({ Index }),
  map:
  /* #__PURE__ */
  (0, _map.createMapTransform)({
    typed: _functionsNumber.typed
  }),
  max:
  /* #__PURE__ */
  (0, _max.createMaxTransform)({
    typed: _functionsNumber.typed,
    larger: _functionsNumber.larger
  }),
  mean:
  /* #__PURE__ */
  (0, _mean.createMeanTransform)({
    typed: _functionsNumber.typed,
    add: _functionsNumber.add,
    divide: _functionsNumber.divide
  }),
  min:
  /* #__PURE__ */
  (0, _min.createMinTransform)({
    typed: _functionsNumber.typed,
    smaller: _functionsNumber.smaller
  }),
  range:
  /* #__PURE__ */
  (0, _range.createRangeTransform)({
    typed: _functionsNumber.typed,
    config: _functionsNumber.config,
    smaller: _functionsNumber.smaller,
    smallerEq: _functionsNumber.smallerEq,
    larger: _functionsNumber.larger,
    largerEq: _functionsNumber.largerEq
  }),
  subset:
  /* #__PURE__ */
  (0, _subset.createSubsetTransform)({
    typed: _functionsNumber.typed,
    matrix: _functionsNumber.matrix
  }),
  sum:
  /* #__PURE__ */
  (0, _sum.createSumTransform)({
    typed: _functionsNumber.typed,
    config: _functionsNumber.config,
    add: _functionsNumber.add
  }),
  std:
  /* #__PURE__ */
  (0, _std.createStdTransform)({
    typed: _functionsNumber.typed,
    sqrt: _functionsNumber.sqrt,
    variance: _functionsNumber.variance
  }),
  variance:
  /* #__PURE__ */
  (0, _variance.createVarianceTransform)({
    typed: _functionsNumber.typed,
    add: _functionsNumber.add,
    subtract: _functionsNumber.subtract,
    multiply: _functionsNumber.multiply,
    divide: _functionsNumber.divide,
    apply: _functionsNumber.apply,
    isNaN: _functionsNumber.isNaN
  })
});

Chain.createProxy(math);