Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/itsdangerous/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/itsdangerous/__pycache__/url_safe.cpython-312.pyc

�

'ٜg�	����ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZGd�dee�ZGd
�deee�ZGd�deee�Zy)�)�annotationsN�)�_CompactJSON)�
base64_decode)�
base64_encode)�
BadPayload)�_PDataSerializer)�
Serializer)�TimedSerializerc�X��eZdZUdZeZded<dd�									d�fd�Zd	�fd�Z�xZ	S)
�URLSafeSerializerMixinz�Mixed in with a regular serializer it will attempt to zlib
    compress the string to make it shorter if necessary. It will also
    base64 encode the string so that it can safely be placed in a URL.
    z_PDataSerializer[str]�default_serializerN)�
serializerc�"��d}|jd�r|dd}d}	t|�}|r	t	j
|�}t
�|�|g|��i|��S#t$r}td|��|�d}~wwxYw#t$r}td|��|�d}~wwxYw)NF�.rTz;Could not base64 decode the payload because of an exception)�original_errorzACould not zlib decompress the payload before decoding the payload)�
startswithr�	Exceptionr�zlib�
decompress�super�load_payload)	�self�payloadr�args�kwargsr�json�e�	__class__s	        ��@/usr/local/lib/python3.12/site-packages/itsdangerous/url_safe.pyrz#URLSafeSerializerMixin.load_payloads�����
����d�#��a�b�k�G��J�	� ��)�D��
����t�,���w�#�D�:�4�:�6�:�:���	��M� ���
��	���
� �W�#$�����
�s.�A�A2�	A/�A*�*A/�2	B�;B	�	Bc���t�|�|�}d}tj|�}t	|�t	|�dz
kr|}d}t|�}|rd|z}|S)NFrTr)r�dump_payloadr�compress�lenr)r�objr�
is_compressed�
compressed�base64drs      �r r"z#URLSafeSerializerMixin.dump_payload7s^����w�#�C�(���
��]�]�4�(�
��z�?�c�$�i�!�m�,��D� �M���%����W�n�G���)
r�bytesr�t.Anyrzt.Any | Nonerr+�returnr+)r%r+r,r*)
�__name__�
__module__�__qualname__�__doc__rr�__annotations__rr"�
__classcell__)rs@r r
r
s[����
1=��-�<�$(�	;��;��;�!�	;�
�;�
�
;�@�r)r
c��eZdZdZy)�URLSafeSerializerz�Works like :class:`.Serializer` but dumps and loads into a URL
    safe string consisting of the upper and lowercase character of the
    alphabet as well as ``'_'``, ``'-'`` and ``'.'``.
    N�r-r.r/r0�r)r r4r4H���r)r4c��eZdZdZy)�URLSafeTimedSerializerz�Works like :class:`.TimedSerializer` but dumps and loads into a
    URL safe string consisting of the upper and lowercase character of
    the alphabet as well as ``'_'``, ``'-'`` and ``'.'``.
    Nr5r6r)r r9r9Or7r)r9)�
__future__r�typing�tr�_jsonr�encodingrr�excrrr	r
�timedr�strr
r4r9r6r)r �<module>rBs[��"����#�#��(�"�"�6�Z��_�6�r�.�
�3����3�_�S�5I�r)

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists