// Module ID: 13495 // Function ID: 13496 // Name: __exportStarResult21 // Dependencies: [13481, 13479, 13496, 13497, 13498] // Module 13495 (__exportStarResult21) const require = arg1; const dependencyMap = arg6; arg5.FormatNumericToString = function FormatNumericToString(roundingType, timesResult) { let formattedString; let roundedNumber; if (timesResult.isZero()) { if (timesResult.isNegative()) { let ZERO = require(13481) /* TEN */.ZERO; let str2 = "negative"; let tmp5Result = dependencyMap; let tmp5 = require; } roundingType = roundingType.roundingType; const result = tmp5(13496).GetUnsignedRoundingMode(roundingType.roundingMode, tmp9); if ("significantDigits" === roundingType) { let ToRawPrecisionResult = tmp5(13497).ToRawPrecision(ZERO, roundingType.minimumSignificantDigits, roundingType.maximumSignificantDigits, result); } else if ("fractionDigits" === roundingType) { ToRawPrecisionResult = tmp5(13498).ToRawFixed(ZERO, roundingType.minimumFractionDigits, roundingType.maximumFractionDigits, roundingType.roundingIncrement, result); } else { const ToRawPrecisionResult1 = tmp5(13497).ToRawPrecision(ZERO, roundingType.minimumSignificantDigits, roundingType.maximumSignificantDigits, result); let ToRawFixedResult = tmp5(13498).ToRawFixed(ZERO, roundingType.minimumFractionDigits, roundingType.maximumFractionDigits, roundingType.roundingIncrement, result); if ("morePrecision" === roundingType.roundingType) { if (ToRawPrecisionResult1.roundingMagnitude <= ToRawFixedResult.roundingMagnitude) { ToRawFixedResult = ToRawPrecisionResult1; } ToRawPrecisionResult = ToRawFixedResult; } else { tmp5(13479).invariant("lessPrecision" === roundingType.roundingType, "Invalid roundingType"); ToRawPrecisionResult = ToRawPrecisionResult1; if (ToRawPrecisionResult1.roundingMagnitude <= ToRawFixedResult.roundingMagnitude) { ToRawPrecisionResult = ToRawFixedResult; } } } ({ roundedNumber, formattedString } = ToRawPrecisionResult); let substr = formattedString; if ("stripIfInteger" === roundingType.trailingZeroDisplay) { substr = formattedString; if (roundedNumber.isInteger()) { const index = formattedString.indexOf("."); substr = formattedString; if (index > -1) { substr = formattedString.slice(0, index); } } } const integerDigitsCount = ToRawPrecisionResult.integerDigitsCount; const minimumIntegerDigits = roundingType.minimumIntegerDigits; let sum = substr; if (integerDigitsCount < minimumIntegerDigits) { sum = tmp5(13479).repeat("0", minimumIntegerDigits - integerDigitsCount) + substr; } if ("negative" !== str2) { const obj = { roundedNumber: null, formattedString: null }; obj[0] = roundedNumber; obj[1] = sum; return obj; } else if (roundedNumber.isZero()) { tmp5Result = tmp5(13481); let NEGATIVE_ZERO = tmp5Result.NEGATIVE_ZERO; } else { NEGATIVE_ZERO = roundedNumber.negated(); } } require(13479) /* getMultiInternalSlots */.invariant(timesResult.isFinite(), "NumberFormatDigitInternalSlots value is not finite"); let str = "positive"; if (timesResult.lessThan(0)) { str = "negative"; } ZERO = timesResult; str2 = str; tmp5Result = tmp2; tmp5 = tmp; if ("negative" === str) { ZERO = timesResult.negated(); str2 = str; tmp5Result = tmp2; tmp5 = tmp; } };