Ë
    `§1hÐ  ã                  óš   — d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
  G d„ de«      Z	 	 	 	 dd	„Z	 	 d	 	 	 	 	 	 	 dd
„Z	 	 	 	 dd„Zy)é    )Úannotationsé   )Úevent_classÚT_JSON_DICT)Ú	dataclassN)Úruntimec                  ó<   ‡ — e Zd ZdZdd„Zedd„«       Zˆ fd„Zˆ xZS )ÚStreamHandlez€
    This is either obtained from another method or specified as ``blob:<uuid>`` where
    ``<uuid>`` is an UUID of a Blob.
    c                ó   — | S ©N© )Úselfs    úh/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v136/io.pyÚto_jsonzStreamHandle.to_json   s   € Øˆó    c                ó   —  | |«      S r   r   )ÚclsÚjsons     r   Ú	from_jsonzStreamHandle.from_json   s   € á�4‹yÐr   c                ó>   •— dj                  t        ‰| �	  «       «      S )NzStreamHandle({}))ÚformatÚsuperÚ__repr__)r   Ú	__class__s    €r   r   zStreamHandle.__repr__   s   ø€ Ø!×(Ñ(¬©Ñ)9Ó);Ó<Ð<r   )ÚreturnÚstr)r   r   r   r
   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úclassmethodr   r   Ú__classcell__)r   s   @r   r
   r
      s+   ø„ ñóð òó ð÷=ð =r   r
   c              #  óX   K  — t        «       }| j                  «       |d<   d|dœ}|–—}y­w)zu
    Close the stream, discard any temporary backing storage.

    :param handle: Handle of the stream to close.
    ÚhandlezIO.close©ÚmethodÚparamsN)Údictr   )r$   r'   Úcmd_dictr   s       r   Úcloser*      s6   è ø€ ô ›&€FØ—~‘~Ó'€Fˆ8ÑàØñ€Hð ‰>�Dùs   ‚(*c              #  óÐ   K  — t        «       }| j                  «       |d<   |�||d<   |�||d<   d|dœ}|–—}d|v rt        |d   «      ndt        |d   «      t        |d	   «      fS ­w)
a…  
    Read a chunk of the stream

    :param handle: Handle of the stream to read.
    :param offset: *(Optional)* Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.
    :param size: *(Optional)* Maximum number of bytes to read (left upon the agent discretion if not specified).
    :returns: A tuple with the following items:

        0. **base64Encoded** - *(Optional)* Set if the data is base64-encoded
        1. **data** - Data that were read.
        2. **eof** - Set if the end-of-file condition occurred while reading.
    r$   NÚoffsetÚsizezIO.readr%   Úbase64EncodedÚdataÚeof)r(   r   Úboolr   )r$   r,   r-   r'   r)   r   s         r   Úreadr2   0   s�   è ø€ ô" ›&€FØ—~‘~Ó'€Fˆ8ÑØÐØ!ˆˆxÑØÐØˆˆv‰àØñ€Hð ‰>€Dà'6¸$Ñ'>ŒˆT�/Ñ"Ô#ÀDÜˆD�‰LÓÜˆT�%‰[Óðð ùs   ‚A$A&c              #  ór   K  — t        «       }| j                  «       |d<   d|dœ}|–—}t        |d   «      S ­w)zª
    Return UUID of Blob object specified by a remote object id.

    :param object_id: Object id of a Blob object wrapper.
    :returns: UUID of the specified Blob.
    ÚobjectIdzIO.resolveBlobr%   Úuuid)r(   r   r   )Ú	object_idr'   r)   r   s       r   Úresolve_blobr7   S   sG   è ø€ ô ›&€FØ"×*Ñ*Ó,€Fˆ:Ñà"Øñ€Hð ‰>€DÜˆt�F‰|ÓÐùs   ‚57)r$   r
   r   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])NN)r$   r
   r,   útyping.Optional[int]r-   r8   r   zZtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[bool], str, bool]])r6   zruntime.RemoteObjectIdr   z/typing.Generator[T_JSON_DICT, T_JSON_DICT, str])Ú
__future__r   Úutilr   r   Údataclassesr   ÚenumÚtypingÚ r   r   r
   r*   r2   r7   r   r   r   ú<module>r?      s‚   ðõ #ß *Ý !Û Û Ý ô=�3ô =ð Øðà	7óð& (,Ø%)ð Øð à$ð ð #ð ð 
bó	 ðFØ)ðà	6ôr   