{
  "version": 3,
  "sources": ["../../../../../src/functions/math/average/average.ts"],
  "sourcesContent": [
    "import {\n  type FunctionDefinition,\n  type FunctionEvaluationResult,\n} from \"../../../core/types.mjs\";\nimport { performAverage } from \"./average-utils.mjs\";\nimport { createArgumentIterator } from \"../../function-utils.mjs\";\n\n/**\n * AVERAGE function - Calculates the arithmetic mean of all numbers in the arguments\n *\n * Usage: AVERAGE(value1, [value2], ...)\n *\n * Examples:\n *   AVERAGE(1, 2, 3) - returns 2\n *   AVERAGE(A1:A10) - averages all numbers in the range A1:A10\n *   AVERAGE(A1:A5, B1:B5) - averages all numbers in both ranges\n *\n * Note:\n * - Only numeric values are included in the calculation\n * - Text, logical values, and empty cells are ignored in ranges\n * - Direct text/logical arguments cause errors\n * - Returns #DIV/0! if no numeric values are found\n */\nexport const AVERAGE: FunctionDefinition = {\n  name: \"AVERAGE\",\n  evaluate: function (node, context): FunctionEvaluationResult {\n    // Create iterator over all argument values\n    const argumentValues = createArgumentIterator(\n      this,\n      node,\n      context,\n      \"col-major\"\n    );\n\n    if (argumentValues.type !== \"values\") {\n      return argumentValues;\n    }\n\n    // Use shared averaging utility (now with unified error propagation)\n    return performAverage(argumentValues.values, context);\n  },\n};\n"
  ],
  "mappings": ";AAIA;AACA;AAkBO,IAAM,UAA8B;AAAA,EACzC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,iBAAiB,uBACrB,MACA,MACA,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,UAAU;AAAA,MACpC,OAAO;AAAA,IACT;AAAA,IAGA,OAAO,eAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
  "debugId": "FDDD603A734F5DDA64756E2164756E21",
  "names": []
}