� M�g� ����ddlmZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z dd l mZdd lmZGd �d ee��ZGd �deee��ZGd�deee��ZdS)�)� annotationsN�)� _CompactJSON)� base64_decode)� base64_encode)� BadPayload)�_PDataSerializer)� Serializer)�TimedSerializerc�F��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)� serializer�payload�bytes�args�t.Anyr� t.Any | None�kwargs�returnc�f��d}|�d��r |dd�}d} t|��}n$#t$r}td|���|�d}~wwxYw|r: t j|��}n$#t$r}td|���|�d}~wwxYwt ��j|g|�Ri|��S)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) �selfrrrrr�json�e� __class__s ��e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/itsdangerous/url_safe.pyrz#URLSafeSerializerMixin.load_payloads���� � � � �d� #� #� ��a�b�b�k�G��J� � ��)�)�D�D��� � � ��M� ����� ����� ���� � � ���t�,�,����� � � � �W�#$���������� ���� $�u�w�w�#�D�:�4�:�:�:�6�:�:�:s-�6� A�A�A�A2�2 B�<B�B�objc����t���|��}d}tj|��}t |��t |��dz kr|}d}t |��}|rd|z}|S)NFrTr)r� dump_payloadr�compress�lenr)r r%r!� is_compressed� compressed�base64dr#s �r$r'z#URLSafeSerializerMixin.dump_payload7sv����w�w�#�#�C�(�(��� ��]�4�(�(� � �z�?�?�c�$�i�i�!�m� ,� ,��D� �M���%�%�� � %��W�n�G���) rrrrrrrrrr)r%rrr) �__name__� __module__� __qualname__�__doc__rr�__annotations__rr'� __classcell__)r#s@r$r r s����������� 1=��<�<�<�<� $(� ;�;�;�;�;�;�;�;�@���������r-r c��eZdZdZdS)�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/r0r1�r-r$r5r5H����������r-r5c��eZdZdZdS)�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 ``'.'``. Nr6r7r-r$r:r:Or8r-r:)� __future__r�typing�tr�_jsonr�encodingrr�excrrr r �timedr �strr r5r:r7r-r$�<module>rCsF��"�"�"�"�"�"����� � � � �������#�#�#�#�#�#�#�#�#�#�#�#�������(�(�(�(�(�(�"�"�"�"�"�"�"�"�"�"�"�"�6�6�6�6�6�Z��_�6�6�6�r�����.� �3����������3�_�S�5I�����r-
Memory