{"version":3,"sources":["../../../src/internals/helpers/number.ts"],"names":["safeSum","numbers","R","sum","filter","isNonNullish","ensureRange","value","options","Math","max","min","Infinity"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAASA,WAAWC,OAAsC,EAAA;AAC/D,EAAA,OAAOC,aAAEC,GAAIF,CAAAA,OAAAA,EAASG,MAAOF,CAAAA,YAAAA,CAAEG,YAAY,CAAK,IAAA;AAAC,IAAA;AAAE,GAAA,CAAA;AACrD;AAFgBL,MAAAA,CAAAA,OAAAA,EAAAA,SAAAA,CAAAA;AAIT,SAASM,WAAAA,CAAYC,OAAeC,OAAuC,EAAA;AAChF,EAAOC,OAAAA,IAAAA,CAAKC,GAAIF,CAAAA,OAAAA,CAAQG,GAAO,IAAA,CAAA,QAAA,EAAWF,IAAKE,CAAAA,GAAAA,CAAIJ,KAAOC,EAAAA,OAAAA,CAAQE,GAAOE,IAAAA,QAAAA,CAAAA,CAAAA;AAC3E;AAFgBN,MAAAA,CAAAA,WAAAA,EAAAA,aAAAA,CAAAA","file":"number.cjs","sourcesContent":["/**\n * Copyright 2025 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as R from \"remeda\";\n\nexport function safeSum(...numbers: (number | undefined | null)[]): number {\n  return R.sum(numbers?.filter(R.isNonNullish) || [0]);\n}\n\nexport function ensureRange(value: number, options: { min?: number; max?: number }): number {\n  return Math.max(options.min ?? -Infinity, Math.min(value, options.max ?? Infinity));\n}\n"]}