403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/babel/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/babel/__pycache__/plural.cpython-39.opt-2.pyc
a


�4d�Z�	@sFUddlmZddlZddlZddlmZmZddlmZm	Z	m
Z
erRddlmZdZ
dZdd	d
�dd�ZGd
d�d�Zddd�dd�Zddd�dd�Zddd�dd�Zdddd�dd�Zdddd�dd�Zd d d d!�d"d#�ZGd$d%�d%e�Zhd&�Zde�d'ej�fd(e�d)d*�e��d+��fd,e�d-�fd.e�d/�fd0e�d1ej�fgZd2ed3<dd4d5�d6d7�Zddd4dd8d9d:�d;d<�Z ded4dd8d=�d>d?�Z!d@dAdB�dCdD�Z"ddEdF�dGdH�Z#ddIdJ�dKdL�Z$dMdNdO�dPdQ�Z%GdRdS�dS�Z&dTdU�Z'dVdW�Z(dXdY�Z)GdZd[�d[�Z*Gd\d]�d]e*�Z+Gd^d_�d_e*�Z,Gd`da�dae,�Z-Gdbdc�dce*�Z.dS)f�)�annotationsN)�Iterable�Mapping)�
TYPE_CHECKING�Any�Callable)�Literal)ZzeroZoneZtwo�few�many�otherr�float | decimal.DecimalzMtuple[decimal.Decimal | int, int, int, int, int, int, Literal[0], Literal[0]])�source�returncCs�t|�}t|�}t|t�r6||kr(|}nt�t|��}t|tj�r�|��}|j}|dkrf|j	|d�nd}d�
dd�|D��}|�d�}t|�}t|�}	t|p�d�}
t|p�d�}nd}}	}
}d}}
||||	|
|||
fS)Nr��css|]}t|�VqdS�N��str)�.0�drr�0/usr/lib/python3.9/site-packages/babel/plural.py�	<genexpr>G�z#extract_operands.<locals>.<genexpr>�0)
�abs�int�
isinstance�float�decimalZDecimalrZas_tupleZexponent�digits�join�rstrip�len)r
�n�iZ	dec_tupleZexpZfraction_digitsZtrailingZno_trailing�v�w�f�t�c�errr�extract_operandss&

r+c@s�eZdZdZddd�dd�Zdd�d	d
�Zeddd�dd
��Zedd�dd��Z	edd�dd��Z
dd�dd�Zddd�dd�Zddd�dd�Z
dS)�
PluralRule)�abstract�_funcz-Mapping[str, str] | Iterable[tuple[str, str]]�None)�rulesrcCs�t|t�r|��}t�}g|_t|�D]`\}}|tvrFtd|����n||vr^td|�d���|�|�t	|�j
}|r&|j�||f�q&dS)Nzunknown tag ztag z defined twice)rr�items�setr-�sorted�_plural_tags�
ValueError�add�_Parser�ast�append)�selfr0�found�key�exprr8rrr�__init__js


zPluralRule.__init__r)rcs6|j�d��fdd�tD��}dt|�j�d|�d�S)N�, cs&g|]}|�vr|�d�|���qS)z: r�r�tag�r0rr�
<listcomp>�rz'PluralRule.__repr__.<locals>.<listcomp>�<� �>)r0r r4�type�__name__)r:�argsrrBr�__repr__�szPluralRule.__repr__�:Mapping[str, str] | Iterable[tuple[str, str]] | PluralRulecCst|t�r|S||�Sr)rr,)�clsr0rrr�parse�s
zPluralRule.parsezMapping[str, str]cst�j��fdd�|jD�S)Ncsi|]\}}|�|��qSrr)rrAr8��_compilerr�
<dictcomp>�rz$PluralRule.rules.<locals>.<dictcomp>)�_UnicodeCompiler�compiler-�r:rrNrr0�szPluralRule.ruleszfrozenset[str]cCstdd�|jD��S)Ncss|]}|dVqdS)rNr)rr$rrrr�rz"PluralRule.tags.<locals>.<genexpr>)�	frozensetr-rSrrr�tags�szPluralRule.tagszlist[tuple[str, Any]]cCs|jSr�r-rSrrr�__getstate__�szPluralRule.__getstate__)r-rcCs
||_dSrrV)r:r-rrr�__setstate__�szPluralRule.__setstate__r)r#rcCst|d�st|�|_|�|�S)Nr.)�hasattr�	to_pythonr.)r:r#rrr�__call__�s

zPluralRule.__call__N)rH�
__module__�__qualname__�	__slots__r>rJ�classmethodrM�propertyr0rUrWrXr[rrrrr,Ss
r,rKr)�rulercCsVt�j}dg}t�|�jD]"\}}|�||��d|�d��q|�dt�d�|�S)Nz(function(n) { return � ? � : z%r; })r)�_JavaScriptCompilerrRr,rMr-r9�
_fallback_tagr )raZto_js�resultrAr8rrr�
to_javascript�srgz(Callable[[float | decimal.Decimal], str]cCs�ttttd�}t�j}ddg}t�|�jD]&\}}|�	d||��dt
|����q*|�	dt���td�|�dd	�}t
||�|d
S)N)�INZWITHINZMODr+zdef evaluate(n):z- n, i, v, w, f, t, c, e = extract_operands(n)z if (z
): return z return �
z<rule>�execZevaluate)�
in_range_list�within_range_list�cldr_modulor+�_PythonCompilerrRr,rMr-r9rrer �eval)ra�	namespaceZto_python_funcrfrAr8�coderrrrZ�s�� 
rZcs�t�|�}|jthB�t�j}�fdd�tD�j}dt���d�g}|j	D]&\}}|�
||��d||��d��qJ|�
|t��d��d�|�S)	Ncsg|]}|�vr|�qSrrr@�Z	used_tagsrrrC�rzto_gettext.<locals>.<listcomp>z	nplurals=z
; plural=(rbrcz);r)r,rMrUre�_GettextCompilerrRr4�indexr"r-r9r )rarOZ
_get_indexrfrAr8rrrr�
to_gettext�s

 ruz+Iterable[Iterable[float | decimal.Decimal]]�bool)�num�
range_listrcCs|t|�kot||�Sr)rrl�rwrxrrrrksrkcst�fdd�|D��S)Nc3s"|]\}}�|ko�|kVqdSrr)rZmin_Zmax_�rwrrr+rz$within_range_list.<locals>.<genexpr>)�anyryrrzrrlsrlr)�a�brcCs@d}|dkr|d9}d}|dkr(|d9}||}|r<|d9}|S)Nr����r)r|r}�reverse�rvrrrrm.srmc@seZdZdS)�	RuleErrorN)rHr\r]rrrrr�Esr�>r&r)r#r$r'r(r%r*z\s+�wordz"\b(and|or|is|(?:with)?in|not|mod|[rz])\b�valuez\d+�symbolz%|,|!=|=�ellipsisz\.{2,3}|\u2026z(list[tuple[str | None, re.Pattern[str]]]�_RULESzlist[tuple[str, str]])�srcCs�|�d�d}g}d}t|�}||kr|tD]>\}}|�||�}|dur*|��}|rd|�||��f�qq*td||��q|ddd�S)N�@rz5malformed CLDR pluralization rule.  Got unexpected %rr~)�splitr"r��match�endr9�groupr�)r�rf�posr��tokrar�rrr�
tokenize_rule]s �r�z
str | Nonezlist[tuple[str, str]] | bool)�tokens�type_r�rcCs,|o*|dd|ko*|dup*|dd|kS)Nr~rrr�r�r�r�rrr�test_next_tokenps�r�r�cCst|||�r|��SdSr)r��popr�rrr�
skip_tokenysr�rz#tuple[Literal['value'], tuple[int]])r�rcCs
d|ffS)Nr�r)r�rrr�
value_node~sr�ztuple[str, tuple[()]])�namercCs|dfS)Nrr)r�rrr�
ident_node�sr�zItuple[Literal['range_list'], Iterable[Iterable[float | decimal.Decimal]]])rxrcCsd|fS)Nrxr)rxrrr�range_list_node�sr�ztuple[Any, ...]z-tuple[Literal['not'], tuple[tuple[Any, ...]]])r�rcCs
d|ffS)N�notr)r�rrr�negate�sr�c@s^eZdZdd�Zddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�ZdS)r7cCsFt|�|_|jsd|_dS|��|_|jrBtd|jdd����dS)NzExpected end of rule, got r~r)r�r�r8�	conditionr�)r:�stringrrrr>�s

z_Parser.__init__NcCsnt|j||�}|dur|S|dur6t|dur0|p2|�}|jsLtd|�d���td|�d|jdd����dS)Nz	expected z but end of rule reachedz	 but got r~r)r�r��reprr�)r:r�r�Zterm�tokenrrr�expect�sz_Parser.expectcCs,|��}t|jdd�r(d||��ff}q|S)Nr��or)�
and_conditionr�r��r:�oprrrr��sz_Parser.conditioncCs,|��}t|jdd�r(d||��ff}q|S)Nr��and)�relationr�r�r�rrrr��sz_Parser.and_conditioncCs�|��}t|jdd�r8t|jdd�r(dp*d||��ffSt|jdd�}d}t|jdd�r^d}n$t|jdd�s�|rxtd��|�|�Sd|||��ff}|r�t|�S|S)	Nr��isr�Zisnot�inZwithinz#Cannot negate operator based rules.r�)r=r�r�r�r��newfangled_relationrxr�)r:�left�negated�methodr�rrrr��s
�
z_Parser.relationcCsRt|jdd�rd}nt|jdd�r(d}ntd��dd||��ff}|rNt|�S|S)	Nr��=Fz!=Tz'Expected "=" or "!=" or legacy relationr�r�)r�r�r�rxr�)r:r�r�r�rrrr��sz_Parser.newfangled_relationcCs,|��}t|jd�r ||��fS||fSdS)Nr�)r�r�r�)r:r�rrr�range_or_value�sz_Parser.range_or_valuecCs0|��g}t|jdd�r(|�|���q
t|�S)Nr��,)r�r�r�r9r�)r:rxrrrrx�s
z_Parser.range_listcCs|t|jd�}|dus |dtvr(td��|d}t|jdd�rRd|df|��ffSt|jdd�rtd|df|��ffSt|�S)Nr�rzExpected identifier variable�modrr��%)r�r��_VARSr�r�r�)r:r�r�rrrr=�sz_Parser.exprcCstt|�d�d��S)Nr�r)r�rr�rSrrrr�sz
_Parser.value)NN)
rHr\r]r>r�r�r�r�r�r�rxr=r�rrrrr7�s"


r7cs�fdd�S)Ncs�|�|�|�|�fSr�rR)r:r��right�Ztmplrr�<lambda>rz"_binary_compiler.<locals>.<lambda>rr�rr�r�_binary_compiler
sr�cs�fdd�S)Ncs�|�|�Srr�)r:�xr�rrr�rz!_unary_compiler.<locals>.<lambda>rr�rr�r�_unary_compilersr�cCsdS)Nrr�r�rrrr�rr�c@s�eZdZdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd	d�Z	d
d�Z
dd�Zdd�Ze
d
�Ze
d�Zed�Ze
d�Ze
d�Ze
d�Zdd�ZdS)�	_CompilercCs|\}}t|d|���|�S)NZcompile_)�getattr)r:�argr�rIrrrrRsz_Compiler.compilecCsdS)Nr#rr�rrrr� rz_Compiler.<lambda>cCsdS)Nr$rr�rrrr�!rcCsdS)Nr%rr�rrrr�"rcCsdS)Nr&rr�rrrr�#rcCsdS)Nr'rr�rrrr�$rcCsdS)Nr(rr�rrrr�%rcCsdS)Nr)rr�rrrr�&rcCsdS)Nr*rr�rrrr�'rcCst|�Srr)r�r%rrrr�(rz
(%s && %s)z
(%s || %s)z(!%s)z
(%s %% %s)z
(%s == %s)z
(%s != %s)cCs
t��dSr)�NotImplementedError)r:r�r=rxrrr�compile_relation0sz_Compiler.compile_relationN)rHr\r]rR�	compile_n�	compile_i�	compile_v�	compile_w�	compile_f�	compile_tZ	compile_cZ	compile_eZ
compile_valuer��compile_and�
compile_orr��compile_not�compile_mod�
compile_is�
compile_isnotr�rrrrr�s"r�c@s4eZdZed�Zed�Zed�Zed�Zdd�Z	dS)rnz(%s and %s)z
(%s or %s)z(not %s)zMOD(%s, %s)cs<d��fdd�|dD��}|���d��|��d|�d�S)Nr�cs.g|]&\}}d��|��d��|��d��qS)�(r?�)r�)rr|r}rSrrrC=rz4_PythonCompiler.compile_relation.<locals>.<listcomp>rr�z, [z]))r �upperrR)r:r�r=rx�rangesrrSrr�<sz _PythonCompiler.compile_relationN)
rHr\r]r�r�r�r�r�r�r�rrrrrn4s
rnc@s*eZdZejZeZeZeZ	eZ
dd�ZdS)rscCs�g}|�|�}|dD]l}|d|dkrN|�d|�d|�|d��d��qt|j|�\}}|�d|�d|�d|�d|�d�	�qdd	�|��d�S)
Nrrr�z == r�z >= � && z <= z || )rRr9�mapr )r:r�r=rxr��item�min�maxrrrr�Js
$&z!_GettextCompiler.compile_relationN)rHr\r]r�r�r��compile_zeror�r�r�r�r�rrrrrsAsrsc@s,eZdZdd�ZeZeZeZeZdd�Z	dS)rdcCsdS)NzparseInt(n, 10)rr�rrrr�[rz_JavaScriptCompiler.<lambda>cCs>t�||||�}|dkr:|�|�}d|�d|�d|�d�}|S)Nr�z
(parseInt(z	, 10) == r�r�)rsr�rR)r:r�r=rxrqrrrr�as�
z$_JavaScriptCompiler.compile_relationN)
rHr\r]r�r�r�r�r�r�r�rrrrrdVsrdc@sFeZdZed�Zed�Zed�Zed�Zed�Zdd�Z	dd	d
�Z
dS)
rQz%s is %sz%s is not %sz	%s and %sz%s or %sz	%s mod %scCs|j|dddi�S)Nrr�T)r�)r:r�rrrr�wsz_UnicodeCompiler.compile_notFc	Cs�g}|dD]R}|d|dkr6|�|�|d��q|�|�|d��d|�|d����q|�|��|rrdnd�d|�dd�|���S)Nrrz..z notrrEr�)r9rRr )r:r�r=rxr�r�r�rrrr�zs*z!_UnicodeCompiler.compile_relationN)F)rHr\r]r�r�r�r�r�r�r�r�rrrrrQjsrQ)N)N)/Z
__future__rr�re�collections.abcrr�typingrrrZtyping_extensionsrr4rer+r,rgrZrurkrlrm�	Exceptionr�r�rR�UNICODEr r��__annotations__r�r�r�r�r�r�r�r7r�r�r�r�rnrsrdrQrrrr�<module>sT	;](�	�	z


Youez - 2016 - github.com/yon3zu
LinuXploit