Ë
    êÿæi´	  ã                   ó´   — d Z dgZddlmZmZmZmZ dddœdedee   d	ed
ee   dee   defd„Z	dedee   d	edeeef   fd„Z
dddœded
ee   dee   defd„Zy)aË  Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2

The functions declared in this module should cover the different
use cases needed to generate a string representation of a file size
using several different units. Since there are many standards regarding
file size units, three different functions have been implemented.

See Also:
    * `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_

Údecimalé    )ÚIterableÚListÚOptionalÚTupleé   Ú ©Ú	precisionÚ	separatorÚsizeÚsuffixesÚbaser   r   Úreturnc                óš   — | dk(  ry| |k  r| d›d�S t        |d«      D ]  \  }}||z  }| |k  sŒ n dj                  || z  z  ||¬«      S )Nr   z1 byteÚ,z bytesé   z{:,.{precision}f}{separator}{}r
   )Ú	enumerateÚformat)r   r   r   r   r   ÚiÚsuffixÚunits           úb/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/rich/filesize.pyÚ_to_strr      s{   € ð ˆq‚yØØ	�ŠØ�q�˜Ð Ð ä˜x¨Ö+‰	ˆˆ6Ø�Q‰wˆØ�$‹;Ùð ,ð ,×2Ñ2Ø	�‰�tÑ	ØØØð	 3ó ð ó    c                 óT   — t        |«      D ]  \  }}||z  }| ||z  k  sŒ ||fS  fS )z*Pick a suffix and base for the given size.)r   )r   r   r   r   r   r   s         r   Úpick_unit_and_suffixr   +   sC   € ä˜xÖ(‰	ˆˆ6Ø�Q‰wˆØ�$˜‘+ÓØØ�ˆ<Ðð	 )ð �ˆ<Ðr   c                ó"   — t        | dd||¬«      S )a3  Convert a filesize in to a string (powers of 1000, SI prefixes).

    In this convention, ``1000 B = 1 kB``.

    This is typically the format used to advertise the storage
    capacity of USB flash drives and the like (*256 MB* meaning
    actually a storage capacity of more than *256 000 000 B*),
    or used by **Mac OS X** since v10.6 to report file sizes.

    Arguments:
        int (size): A file size.
        int (precision): The number of decimal places to include (default = 1).
        str (separator): The string to separate the value from the units (default = " ").

    Returns:
        `str`: A string containing a abbreviated file size and units.

    Example:
        >>> filesize.decimal(30000)
        '30.0 kB'
        >>> filesize.decimal(30000, precision=2, separator="")
        '30.00kB'

    )ÚkBÚMBÚGBÚTBÚPBÚEBÚZBÚYBiè  r
   )r   )r   r   r   s      r   r   r   4   s    € ô< ØØ8ØØØôð r   N)Ú__doc__Ú__all__Útypingr   r   r   r   ÚintÚstrr   r   r   © r   r   Ú<module>r-      sÓ   ðñ
ð ˆ+€ç 2Ó 2ð  !Ø"òØ
ðà�s‰mðð ðð
 ˜‰}ðð ˜‰}ðð 	óð2˜sð ¨d°3©ið ¸sð ÀuÈSÐRUÈXÁó ð  !Ø"ò	$Ø
ð$ð ˜‰}ð$ð ˜‰}ð	$ð
 	ô$r   