U
    [e&                  D   @   s   d Z ddlmZmZ ddlmZ edZddddddd	ddd
dddddddddddddddddddddddddddddddddddddddddddddd
ddddddddddddCZdZG dd de	Z
efddZdS )z
    babel.messages.plurals
    ~~~~~~~~~~~~~~~~~~~~~~

    Plural form definitions.

    :copyright: (c) 2013-2019 by the Babel Team.
    :license: BSD, see LICENSE for more details.
    )default_localeLocale)
itemgetterLC_CTYPE)   z(n != 1))   z[(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=0 && n%100<=2 ? 4 : 5))   zR(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2))   0)r   a&  (n==1 ? 0 : n%10==1 && n%100!=11 && n%100!=71 && n%100!=91 ? 1 : n%10==2 && n%100!=12 && n%100!=72 && n%100!=92 ? 2 : (n%10==3 || n%10==4 || n%10==9) && n%100!=13 && n%100!=14 && n%100!=19 && n%100!=73 && n%100!=74 && n%100!=79 && n%100!=93 && n%100!=94 && n%100!=99 ? 3 : n%1000000==0 ? 4 : 5))r   z%((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2))   z/(n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 0))r   z(n > 1))r   z@(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4))r   z(n%10==1 && n%100!=11 ? 0 : 1))r   zG(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2))r   z+(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2))   zS(n==1 ? 0 : n==0 || ( n%100=>1 && n%100<=10) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3))r   zB(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2))r   z8(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2))r   z<(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3))CafarbebgZbnZbobrbscacsZcvcydadeZdzeleneoeseteufafifrZfurgaglZhahehihrhuhyisitjakaZkgkmkoZkuloltlvmtnbnlnnnopaplptpt_BRroruskslsrstsvthtrukvevixhzhc                   @   sL   e Zd ZdZdZeedddZeedddZedd	 d
dZ	dd Z
dS )_PluralTuplez A tuple with plural information. r   z.
    The number of plurals used by the locale.)docr	   z.
    The plural expression used by the locale.c                 C   s   d|  S )Nznplurals=%s; plural=%s;rI   )xrI   rI   X/var/www/html/services/stratfitenv/lib/python3.8/site-packages/babel/messages/plurals.py<lambda>       z_PluralTuple.<lambda>z9
    The plural expression used by the catalog or locale.c                 C   s   | j S )N)plural_forms)selfrI   rI   rL   __str__   s    z_PluralTuple.__str__N)__name__
__module____qualname____doc__	__slots__propertyr   Znum_pluralsZplural_exprrO   rQ   rI   rI   rI   rL   rH      s   rH   c                 C   s`   t | } ztt|  }W n< tk
rV   zt| j }W n tk
rP   t}Y nX Y nX t|S )a  A tuple with the information catalogs need to perform proper
    pluralization.  The first item of the tuple is the number of plural
    forms, the second the plural expression.

    >>> get_plural(locale='en')
    (2, '(n != 1)')
    >>> get_plural(locale='ga')
    (5, '(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4)')

    The object returned is a special tuple with additional members:

    >>> tup = get_plural("ja")
    >>> tup.num_plurals
    1
    >>> tup.plural_expr
    '0'
    >>> tup.plural_forms
    'nplurals=1; plural=0;'

    Converting the tuple into a string prints the plural forms for a
    gettext catalog:

    >>> str(tup)
    'nplurals=1; plural=0;'
    )r   parsePLURALSstrKeyErrorlanguageDEFAULT_PLURALrH   )localetuprI   rI   rL   
get_plural   s    
r`   N)rU   Z
babel.corer   r   operatorr   r   rY   r]   tuplerH   r`   rI   rI   rI   rL   <module>   s   

  8