
    dh
              	           d dl mZ d dlmZmZmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ dd	ee   d
e	fdZe G d d             Z	 	 dded	ee   ded
efdZ	 	 dded	ee   ded
efdZy)    )	dataclass)AnyDictOptional)	BaseModel)Bot)DefaultBotProperties)TelegramMethod)	InputFileNdefaultreturnc                 4    | 
t               } t        d|       S )Nz42:Fake)tokenr   )r	   r   r   s    U/var/www/netwell/bot/venv/lib/python3.12/site-packages/aiogram/utils/serialization.py_get_fake_botr      s    &(Y00    c                   0    e Zd ZU dZeed<   eeef   ed<   y)DeserializedTelegramObjecta"  
    Represents a dumped Telegram object.

    :param data: The dumped data of the Telegram object.
    :type data: Any
    :param files: The dictionary containing the file names as keys
        and the corresponding `InputFile` objects as values.
    :type files: Dict[str, InputFile]
    datafilesN)	__name__
__module____qualname____doc__r   __annotations__r   strr    r   r   r   r      s     IYr   r   objinclude_api_method_namec                 D   i }|rt        | t              r| j                  |d<   t        | t              r| j	                  dd      } t        |      }i }|j                  j                  | ||d      }t        |t              r|j                  |       t        ||      S )am  
    Deserialize Telegram Object to JSON compatible Python object.

    :param obj: The object to be deserialized.
    :param default: Default bot properties
        should be passed only if you want to use custom defaults.
    :param include_api_method_name: Whether to include the API method name in the result.
    :return: The deserialized Telegram object.
    methodpythonF)modewarningsr   )botr   _dumps_json)r   r   )
isinstancer
   __api_method__r   
model_dumpr   sessionprepare_valuedictupdater   )r   r   r    extendsfake_botr   prepareds          r   deserialize_telegram_objectr2   "   s     G:c>#B..#y!nn(Un; W-H"$E--	 . H (D! %85AAr   c                 2    t        | ||      j                  S )a  
    Deserialize telegram object to JSON compatible Python object excluding files.

    :param obj: The telegram object to be deserialized.
    :param default: Default bot properties
        should be passed only if you want to use custom defaults.
    :param include_api_method_name: Whether to include the API method name in the result.
    :return: The deserialized telegram object.
    )r   r    )r2   r   )r   r   r    s      r   %deserialize_telegram_object_to_pythonr4   G   s!     ' 7 d	r   )N)NT)dataclassesr   typingr   r   r   pydanticr   aiogramr   aiogram.client.defaultr	   aiogram.methodsr
   aiogram.typesr   r   r   boolr2   r4   r   r   r   <module>r=      s    ! & &   7 * #18$89 1S 1      " /3$("B	"B*+"B ""B  	"BN /3$(	*+ " 		r   