# Path: natsort/compat/fastnumbers.py
# def is_supported_fastnumbers(fastnumbers_version: str) -> bool:
# 
# Path: natsort/compat/locale.py
# def dumb_sort() -> bool:
# def get_icu_locale() -> str:
# def get_strxfrm() -> TrxfmFunc:
# def get_thousands_sep() -> str:
# def get_decimal_point() -> str:
# def dumb_sort() -> bool:
# def get_strxfrm() -> TrxfmFunc:
# def get_thousands_sep() -> str:
# def get_decimal_point() -> str:
# 
# Path: natsort/ns_enum.py
# class ns(enum.IntEnum):  # noqa: N801
#     FLOAT = F = 1 << next(_counter)
#     SIGNED = S = 1 << next(_counter)
#     NOEXP = N = 1 << next(_counter)
#     PATH = P = 1 << next(_counter)
#     LOCALEALPHA = LA = 1 << next(_counter)
#     LOCALENUM = LN = 1 << next(_counter)
#     IGNORECASE = IC = 1 << next(_counter)
#     LOWERCASEFIRST = LF = 1 << next(_counter)
#     GROUPLETTERS = G = 1 << next(_counter)
#     UNGROUPLETTERS = CAPITALFIRST = C = UG = 1 << next(_counter)
#     NANLAST = NL = 1 << next(_counter)
#     COMPATIBILITYNORMALIZE = CN = 1 << next(_counter)
#     NUMAFTER = NA = 1 << next(_counter)
#     DEFAULT = 0
#     INT = I = 0  # noqa: E741
#     UNSIGNED = U = 0
#     REAL = R = FLOAT | SIGNED
#     LOCALE = L = LOCALEALPHA | LOCALENUM
# NS_DUMB = 1 << 31
# 
# Path: natsort/unicode_numbers.py



import re
from functools import partial, reduce
from itertools import chain as ichain
from operator import methodcaller
from pathlib import PurePath
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Match,
    Optional,
    Pattern,
    Tuple,
    Union,
    cast,
    overload,
)
from unicodedata import normalize
from natsort.compat.fastnumbers import fast_float, fast_int
from natsort.compat.locale import (
    StrOrBytes,
    get_decimal_point,
    get_strxfrm,
    get_thousands_sep,
)
from natsort.ns_enum import NSType, NS_DUMB, ns
from natsort.unicode_numbers import digits_no_decimals, numeric_no_decimals
    if alg & ns.IGNORECASE:
        function_chain.append(methodcaller("casefold"))

    if alg & ns.LOCALENUM:
        # Create a regular expression that will remove thousands separators.
        strip_thousands = r"""
            (?<=[0-9]{{1}})  # At least 1 number
            (?<![0-9]{{4}})  # No more than 3 numbers
            {nodecimal}      # Cannot follow decimal
            {thou}           # The thousands separator
            (?=[0-9]{{3}}    # Three numbers must follow
             ([^0-9]|$)      # But a non-number after that
            )
        """
        nodecimal = r""
        if alg & ns.FLOAT:
            # Make a regular expression component that will ensure no
            # separators are removed after a decimal point.
            d = re.escape(get_decimal_point())
            nodecimal += r"(?<!" + d + r"[0-9])"
            nodecimal += r"(?<!" + d + r"[0-9]{2})"
            nodecimal += r"(?<!" + d + r"[0-9]{3})"
        strip_thousands = strip_thousands.format(
            thou=re.escape(get_thousands_sep()), nodecimal=nodecimal
        )
        strip_thousands_re = re.compile(strip_thousands, flags=re.VERBOSE)
        function_chain.append(partial(strip_thousands_re.sub, ""))

        # Create a regular expression that will change the decimal point to
        # a period if not already a period.

# Path: natsort/compat/fastnumbers.py
# def is_supported_fastnumbers(fastnumbers_version: str) -> bool:
# 
# Path: natsort/compat/locale.py
# def dumb_sort() -> bool:
# def get_icu_locale() -> str:
# def get_strxfrm() -> TrxfmFunc:
# def get_thousands_sep() -> str:
# def get_decimal_point() -> str:
# def dumb_sort() -> bool:
# def get_strxfrm() -> TrxfmFunc:
# def get_thousands_sep() -> str:
# def get_decimal_point() -> str:
# 
# Path: natsort/ns_enum.py
# class ns(enum.IntEnum):  # noqa: N801
#     FLOAT = F = 1 << next(_counter)
#     SIGNED = S = 1 << next(_counter)
#     NOEXP = N = 1 << next(_counter)
#     PATH = P = 1 << next(_counter)
#     LOCALEALPHA = LA = 1 << next(_counter)
#     LOCALENUM = LN = 1 << next(_counter)
#     IGNORECASE = IC = 1 << next(_counter)
#     LOWERCASEFIRST = LF = 1 << next(_counter)
#     GROUPLETTERS = G = 1 << next(_counter)
#     UNGROUPLETTERS = CAPITALFIRST = C = UG = 1 << next(_counter)
#     NANLAST = NL = 1 << next(_counter)
#     COMPATIBILITYNORMALIZE = CN = 1 << next(_counter)
#     NUMAFTER = NA = 1 << next(_counter)
#     DEFAULT = 0
#     INT = I = 0  # noqa: E741
#     UNSIGNED = U = 0
#     REAL = R = FLOAT | SIGNED
#     LOCALE = L = LOCALEALPHA | LOCALENUM
# NS_DUMB = 1 << 31
# 
# Path: natsort/unicode_numbers.py



# Path: natsort/utils.py
import re
from functools import partial, reduce
from itertools import chain as ichain
from operator import methodcaller
from pathlib import PurePath
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Match,
    Optional,
    Pattern,
    Tuple,
    Union,
    cast,
    overload,
)
from unicodedata import normalize
from natsort.compat.fastnumbers import fast_float, fast_int
from natsort.compat.locale import (
    StrOrBytes,
    get_decimal_point,
    get_strxfrm,
    get_thousands_sep,
)
from natsort.ns_enum import NSType, NS_DUMB, ns
from natsort.unicode_numbers import digits_no_decimals, numeric_no_decimals

    if alg & ns.IGNORECASE:
        function_chain.append(methodcaller("casefold"))

    if alg & ns.LOCALENUM:
        # Create a regular expression that will remove thousands separators.
        strip_thousands = r"""
            (?<=[0-9]{{1}})  # At least 1 number
            (?<![0-9]{{4}})  # No more than 3 numbers
            {nodecimal}      # Cannot follow decimal
            {thou}           # The thousands separator
            (?=[0-9]{{3}}    # Three numbers must follow
             ([^0-9]|$)      # But a non-number after that
            )
        """
        nodecimal = r""
        if alg & ns.FLOAT:
            # Make a regular expression component that will ensure no
            # separators are removed after a decimal point.
            d = re.escape(get_decimal_point())
            nodecimal += r"(?<!" + d + r"[0-9])"
            nodecimal += r"(?<!" + d + r"[0-9]{2})"
            nodecimal += r"(?<!" + d + r"[0-9]{3})"
        strip_thousands = strip_thousands.format(
            thou=re.escape(get_thousands_sep()), nodecimal=nodecimal
        )
        strip_thousands_re = re.compile(strip_thousands, flags=re.VERBOSE)
        function_chain.append(partial(strip_thousands_re.sub, ""))

        # Create a regular expression that will change the decimal point to
        # a period if not already a period.

        decimal = get_decimal_point()