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__/util.cpython-39.pyc
a


�4d�@s`dZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZmZe�Zed�Zdd	d
�dd�Ze�d
ej�Zddd�dd�Ze�d�Zd,dddd�dd�Zdddd�dd�ZGdd�dej�Zd-ddddd"d#�d$d%�Zej Z!Gd&d'�d'ej"�Z#ej$Z$ej%Z%ej&Z&ej'Z'ej(Z(ej)Z)ej*Z*d(d(d)�d*d+�Z+dS).z�
    babel.util
    ~~~~~~~~~~

    Various utility classes and functions.

    :copyright: (c) 2013-2023 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�)�annotationsN)�	Generator�Iterable)�IO�Any�TypeVar)�dates�	localtime�_TzIterable[_T]zGenerator[_T, None, None])�iterable�returnccs0t�}t|�D]}||vr|V|�|�qdS)a�Yield all items in an iterable collection that are distinct.

    Unlike when using sets for a similar effect, the original ordering of the
    items in the collection is preserved by this function.

    >>> print(list(distinct([1, 2, 1, 3, 4, 4])))
    [1, 2, 3, 4]
    >>> print(list(distinct('foobar')))
    ['f', 'o', 'b', 'a', 'r']

    :param iterable: the iterable collection providing the data
    N)�set�iter�add)r�seen�item�r�./usr/lib/python3.9/site-packages/babel/util.py�distincts

rs([ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)z	IO[bytes]�
str | None)�fprc
Cs$|��}|�d��z�|��}|�tj�}|r@|ttj�d�}t�|�}|s�zddl	}|�
|�d��Wntt
tfy�Yn0|��}t�|�}|r�|r�|�d��d�}|dkr�t
d|�d���W|�|�dS|r�|�d��d�W|�|�SW|�|�dSW|�|�n|�|�0dS)a/Deduce the encoding of a source file from magic comment.

    It does this in the same way as the `Python interpreter`__

    .. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations

    The ``fp`` argument should be a seekable file object.

    (From Jeff Dairiki)
    rN�latin-1�zutf-8zencoding problem: z	 with BOM)�tell�seek�readline�
startswith�codecs�BOM_UTF8�len�PYTHON_MAGIC_COMMENT_re�match�ast�parse�decode�ImportError�SyntaxError�UnicodeEncodeError�group)r�posZline1Zhas_bom�mr"Zline2Zmagic_comment_encodingrrr�parse_encoding5s@



�
�
�r+z'from\s+__future__\s+import\s+\(*(.+)\)*r�str�int)r�encodingrc
	Cs�ddl}|��}|�d�d}z�|���|�}t�dd|�}t�dd|�}t�dd|�}t�|�D]B}d	d
�|�	d��
d�D�}|D]}t||d�}	|	r�||	jO}q�qbW|�|�n|�|�0|S)
zRParse the compiler flags by :mod:`__future__` from the given Python
    code.
    rNzimport\s*\([\r\n]+zimport (z,\s*[\r\n]+z, z\\\s*[\r\n]+� cSsg|]}|���d��qS)z())�strip)�.0�xrrr�
<listcomp>�z&parse_future_flags.<locals>.<listcomp>r�,)
�
__future__rr�readr$�re�sub�PYTHON_FUTURE_IMPORT_re�finditerr(�split�getattrZ
compiler_flag)
rr.r6r)�flags�bodyr*�names�nameZfeaturerrr�parse_future_flagsis"
rB�bool)�pattern�filenamercCs�ddddddd�}|�d�r0dg}|d	d
�}n"|�d�rNdg}|dd
�}ng}tt�d
|��D]4\}}|dr�|�||�qb|rb|�t�|��qbt�d�|��d�|�t	j
d��}|d
uS)a�Extended pathname pattern matching.

    This function is similar to what is provided by the ``fnmatch`` module in
    the Python standard library, but:

     * can match complete (relative or absolute) path names, and not just file
       names, and
     * also supports a convenience pattern ("**") to match files at any
       directory level.

    Examples:

    >>> pathmatch('**.py', 'bar.py')
    True
    >>> pathmatch('**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('**.py', 'templates/index.html')
    False

    >>> pathmatch('./foo/**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('./foo/**.py', 'bar/baz.py')
    False

    >>> pathmatch('^foo/**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('^foo/**.py', 'bar/baz.py')
    False

    >>> pathmatch('**/templates/*.html', 'templates/index.html')
    True
    >>> pathmatch('**/templates/*.html', 'templates/foo/bar.html')
    False

    :param pattern: the glob pattern
    :param filename: the path name of the file to match against
    z[^/]z[^/]/z[^/]+z[^/]+/z	(?:.+/)*?z(?:.+/)*?[^/]+)�?z?/�*z*/z**/z**�^rNz./�z	([?*]+/?)��$�/)r�	enumerater8r<�append�escaper!�join�replace�os�sep)rDrEZsymbols�buf�idx�partr!rrr�	pathmatch�s*'�	

"rWc@seZdZe�d�ZdS)�TextWrapperz((\s+|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))N)�__name__�
__module__�__qualname__r8�compileZ
wordsep_rerrrrrX�s�rX�FrJz	list[str])�text�width�initial_indent�subsequent_indentrcCst|||dd�}|�|�S)a�Simple wrapper around the ``textwrap.wrap`` function in the standard
    library. This version does not wrap lines on hyphens in words.

    :param text: the text to wrap
    :param width: the maximum line width
    :param initial_indent: string that will be prepended to the first line of
                           wrapped output
    :param subsequent_indent: string that will be prepended to all lines save
                              the first of wrapped output
    F)r_r`raZbreak_long_words)rX�wrap)r^r_r`ra�wrapperrrr�wraptext�s
�rdc@speZdZdZddddd�dd�Zd	d
�dd�Zd	d
�d
d�Zddd�dd�Zdd	d�dd�Zddd�dd�Z	dS)�FixedOffsetTimezonez&Fixed offset in minutes east from UTC.N�floatr�None)�offsetrArcCs(tj|d�|_|durd|}||_dS)N)Zminutesz
Etc/GMT%+d)�datetimeZ	timedelta�_offset�zone)�selfrhrArrr�__init__�szFixedOffsetTimezone.__init__r,)rcCs|jS�N�rk�rlrrr�__str__�szFixedOffsetTimezone.__str__cCsd|j�d|j�d�S)Nz<FixedOffset "z" �>)rkrjrprrr�__repr__�szFixedOffsetTimezone.__repr__zdatetime.datetimezdatetime.timedelta)�dtrcCs|jSrn)rj�rlrtrrr�	utcoffset�szFixedOffsetTimezone.utcoffsetcCs|jSrnrorurrr�tzname�szFixedOffsetTimezone.tznamecCstSrn)�ZEROrurrr�dst�szFixedOffsetTimezone.dst)N)
rYrZr[�__doc__rmrqrsrvrwryrrrrre�srer��a�bcCs||k||kSrnrr{rrr�_cmpsr~)r)r]rJrJ),rzr6rr�collectionsrirRr8�textwrap�collections.abcrr�typingrrrZbabelrr	�object�missingr
rr\�VERBOSEr r+r:rBrWrXrd�OrderedDictZodictZtzinforeZUTCZLOCALTZZ
get_localzoneZ	STDOFFSETZ	DSTOFFSETZDSTDIFFrxr~rrrr�<module>sD	�0� A

Youez - 2016 - github.com/yon3zu
LinuXploit