static _addGroupSeparators(inputValue, settings, isFocused, currentRawValue, forcedRawValue = null) {
        //TODO Test if `inputValue` === '', and return '' directly if that's the case,
        //XXX Note; this function is static since we need to pass a `settings` object when calling the static `AutoNumeric.format()` method
        let isValueNegative;
        if (!AutoNumericHelper.isNull(forcedRawValue)) {
            // Prefer directly testing if the raw value is negative in order for the test to be more performant than manipulating the formatted value
            isValueNegative = forcedRawValue < 0;
        } else {
            isValueNegative = AutoNumericHelper.isNegative(inputValue, settings.negativeSignCharacter) || AutoNumericHelper.isNegativeWithBrackets(inputValue, settings.firstBracket, settings.lastBracket); // Test if the value is negative before removing the negative sign
        }

        inputValue = this._stripAllNonNumberCharactersExceptCustomDecimalChar(inputValue, settings, false, isFocused);

        if (this._isElementValueEmptyOrOnlyTheNegativeSign(inputValue, settings)) {
            return this._orderValueCurrencySymbolAndSuffixText(inputValue, settings, true);
        }

        const isZeroOrHasNoValue = AutoNumericHelper.isZeroOrHasNoValue(inputValue);

        // Temporarily remove the negative sign if present
        if (isValueNegative) {
            inputValue = inputValue.replace('-', ''); // At this point the `inputValue` has been normalized with a 'normal' negative sign `'-'` //TODO Check that comment validity, since `_stripAllNonNumberCharactersExceptCustomDecimalChar` *does not* convert the negative sign
        }

        // Splits the string at the decimal string
        let [integerPart, decimalPart] = inputValue.split(settings.decimalCharacter);
        if (settings.decimalCharacterAlternative && AutoNumericHelper.isUndefined(decimalPart)) {
            [integerPart, decimalPart] = inputValue.split(settings.decimalCharacterAlternative);
        }

        if (settings.digitGroupSeparator !== '') {
            settings.digitalGroupSpacing = settings.digitalGroupSpacing.toString();
            let digitalGroup;
            switch (settings.digitalGroupSpacing) {
                case AutoNumeric.options.digitalGroupSpacing.twoThree:
                    digitalGroup = /(\d)((\d)(\d{2}?)+)$/;
                    break;
                case AutoNumeric.options.digitalGroupSpacing.twoScaled:
                    digitalGroup = /(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;
                    break;
                case AutoNumeric.options.digitalGroupSpacing.two:
                case AutoNumeric.options.digitalGroupSpacing.three:
                case AutoNumeric.options.digitalGroupSpacing.four:
                default :
                    digitalGroup = new RegExp(`(\\d)((\\d{${settings.digitalGroupSpacing}}?)+)$`);
            }

            // Re-inserts the thousand separator via a regular expression
            while (digitalGroup.test(integerPart)) {
                integerPart = integerPart.replace(digitalGroup, `$1${settings.digitGroupSeparator}$2`);
            }
        }

        // Find out how many decimal places should be kept, depending on the object state (isFocused)
        let decimalPlacesToRoundTo;
        if (isFocused) {
            decimalPlacesToRoundTo = settings.decimalPlacesShownOnFocus;
        } else {
            decimalPlacesToRoundTo = settings.decimalPlacesShownOnBlur;
        }

        if (decimalPlacesToRoundTo !== 0 && !AutoNumericHelper.isUndefined(decimalPart)) {
            if (decimalPart.length > decimalPlacesToRoundTo) {
                // Trim the excessive number of decimal places
                decimalPart = decimalPart.substring(0, decimalPlacesToRoundTo);
            }

            // Joins the whole number with the decimal value
            inputValue = `${integerPart}${settings.decimalCharacter}${decimalPart}`;
        } else {
            // Otherwise if it's an integer
            inputValue = integerPart;
        }

        // Add back the negative/positive sign and the currency symbol, at the right positions
        inputValue = AutoNumeric._mergeCurrencySignNegativePositiveSignAndValue(inputValue, settings, isValueNegative, isZeroOrHasNoValue); //TODO this function is called again in `_toggleNegativeBracket` if the brackets are removed; let's DRY this

        if (AutoNumericHelper.isNull(forcedRawValue)) {
            // If the raw value is not forced, use the default one from the settings object
            forcedRawValue = currentRawValue;
        }

        // Toggle the negative sign and brackets
        if (settings.negativeBracketsTypeOnBlur !== null && (forcedRawValue < 0 || AutoNumericHelper.isNegativeStrict(inputValue, settings.negativeSignCharacter))) {
            inputValue = this._toggleNegativeBracket(inputValue, settings, isFocused);
        }

        let result;
        if (settings.suffixText) {
            result = `${inputValue}${settings.suffixText}`;
        } else {
            result = inputValue;
        }

        return result;
    }
Modify the input value by adding the group separators, as defined in the settings, and the negative brackets if needed.

@param {string} inputValue The formatted value (i.e. with the `decimalCharacter` defined in the settings, not the raw value)
@param {object} settings
@param {boolean} isFocused
@param {number|string|null} currentRawValue The object current raw value (`this.rawValue`)
@param {number|string|null} forcedRawValue If this is set, then this rawValue is used instead of the one passed through the `settings` object. This is useful is some very specific cases where we need to set the raw value *after* settings the formatted value, using the `_addGroupSeparators()` method.
@returns {*}