ó
    …~i©1  ã                  óú   • % S r SSKJr  SSKJr  SSKJrJrJrJ	r	J
r
JrJr  SSKrSSKJr  \(       a  SSKJr  SSKJr  SS	KJrJr  S
\S'    SSKr " S S\5      rg! \ a    Sr\R2                  " S5         N(f = f)a,  Integration code for CSS selectors using `Soup Sieve <https://facelessuser.github.io/soupsieve/>`_ (pypi: ``soupsieve``).

Acquire a `CSS` object through the `element.Tag.css` attribute of
the starting point of your CSS selector, or (if you want to run a
selector against the entire document) of the `BeautifulSoup` object
itself.

The main advantage of doing this instead of using ``soupsieve``
functions is that you don't need to keep passing the `element.Tag` to be
selected against, since the `CSS` object is permanently scoped to that
`element.Tag`.

é    )Úannotations)Ú
ModuleType)ÚAnyÚcastÚIterableÚIteratorÚMutableSequenceÚOptionalÚTYPE_CHECKINGN)Ú_NamespaceMapping)Ú	SoupSieve)Úelement)Ú	ResultSetÚTagúOptional[ModuleType]Ú	soupsievezEThe soupsieve package is not installed. CSS selectors cannot be used.c                  óX  • \ rS rSrSrSSS jjrSS jr      SS jrSS jr  S         SS jjr	  S         SS	 jjr
   S           SS
 jjr   S           SS jjr  S         SS jjr  S         SS jjr  S         SS jjrSrg)ÚCSSé-   at  A proxy object against the ``soupsieve`` library, to simplify its
CSS selector API.

You don't need to instantiate this class yourself; instead, use
`element.Tag.css`.

:param tag: All CSS selectors run by this object will use this as
    their starting point.

:param api: An optional drop-in replacement for the ``soupsieve`` module,
    intended for use in unit tests.
Nc                óJ   • Uc  [         nUc  [        S5      eX l        Xl        g )NzLCannot execute CSS selectors because the soupsieve package is not installed.)r   ÚNotImplementedErrorÚapiÚtag)Úselfr   r   s      ÚD/home/mande/repo/quber/.venv/lib/python3.13/site-packages/bs4/css.pyÚ__init__ÚCSS.__init__;   s-   € Ø‰;ÜˆCØ‰;Ü%Ø^óð ð ŒØ�ó    c                óx   • [         c  [        S5      e[        [        U R                  R                  U5      5      $ )zÏEscape a CSS identifier.

This is a simple wrapper around `soupsieve.escape() <https://facelessuser.github.io/soupsieve/api/#soupsieveescape>`_. See the
documentation for that function for more information.
zMCannot escape CSS identifiers because the soupsieve package is not installed.)r   r   r   Ústrr   Úescape)r   Úidents     r   r!   Ú
CSS.escapeE   s6   € ô ÑÜ%Ø_óð ô ”C˜Ÿ™Ÿ™¨Ó/Ó0Ð0r   c                ó€   • [        X R                  R                  5      (       d  Uc  U R                  R                  nU$ )z%Normalize a dictionary of namespaces.)Ú
isinstancer   r   r   Ú_namespaces)r   ÚnsÚselects      r   Ú_nsÚCSS._nsQ   s3   € ô ˜&§(¡(×"4Ñ"4×5Ñ5¸"¹*ð —‘×%Ñ%ˆBØˆ	r   c                ó    • SSK Jn  U" SU5      $ )a  Normalize a list of results to a py:class:`ResultSet`.

A py:class:`ResultSet` is more consistent with the rest of
Beautiful Soup's API, and :py:meth:`ResultSet.__getattr__` has
a helpful error message if you try to treat a list of results
as a single result (a common mistake).
r   )r   N)Úbs4r   )r   Úresultsr   s      r   Ú_rsÚCSS._rs\   s   € õ 	"á˜˜wÓ'Ð'r   c                ó\   • U R                   R                  " XR                  X!5      U40 UD6$ )a§  Pre-compile a selector and return the compiled object.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.compile() <https://facelessuser.github.io/soupsieve/api/#soupsievecompile>`_ method.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   `soupsieve.compile() <https://facelessuser.github.io/soupsieve/api/#soupsievecompile>`_ method.

:return: A precompiled selector object.
:rtype: soupsieve.SoupSieve
)r   Úcompiler)   ©r   r(   Ú
namespacesÚflagsÚkwargss        r   r1   ÚCSS.compilei   s)   € ð2 �x‰x×Ò ¯©°Ó(DÀeÑVÈvÑVÐVr   c                ór   • U R                   R                  " XR                  U R                  X!5      U40 UD6$ )aY  Perform a CSS selection operation on the current Tag and return the
first result, if any.

This uses the Soup Sieve library. For more information, see
that library's documentation for the `soupsieve.select_one() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect_one>`_ method.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.select_one() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect_one>`_ method.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   `soupsieve.select_one() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect_one>`_ method.
)r   Ú
select_oner   r)   r2   s        r   r8   ÚCSS.select_one„   s7   € ð4 �x‰x×"Ò"Ø—H‘H˜dŸh™h zÓ:¸Eñ
ØEKñ
ð 	
r   c           
     óš   • Uc  SnU R                  U R                  R                  " XR                  U R	                  X!5      X440 UD65      $ )aq  Perform a CSS selection operation on the current `element.Tag`.

This uses the Soup Sieve library. For more information, see
that library's documentation for the `soupsieve.select() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect>`_ method.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param limit: After finding this number of results, stop looking.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.select() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect>`_ method.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   `soupsieve.select() <https://facelessuser.github.io/soupsieve/api/#soupsieveselect>`_ method.
r   )r.   r   r(   r   r)   ©r   r(   r3   Úlimitr4   r5   s         r   r(   Ú
CSS.select¢   sK   € ð8 ‰=ØˆEà�x‰xØ�H‰H�OŠOØŸ™ $§(¡(¨:Ó">ÀñØPVñó
ð 	
r   c                ór   • U R                   R                  " XR                  U R                  X!5      X440 UD6$ )aÕ  Perform a CSS selection operation on the current `element.Tag`.

This uses the Soup Sieve library. For more information, see
that library's documentation for the `soupsieve.iselect()
<https://facelessuser.github.io/soupsieve/api/#soupsieveiselect>`_
method. It is the same as select(), but it returns a generator
instead of a list.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param limit: After finding this number of results, stop looking.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.iselect() <https://facelessuser.github.io/soupsieve/api/#soupsieveiselect>`_ method.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   `soupsieve.iselect() <https://facelessuser.github.io/soupsieve/api/#soupsieveiselect>`_ method.
)r   Úiselectr   r)   r;   s         r   r?   ÚCSS.iselectÇ   s7   € ð> �x‰x×ÒØ—H‘H˜dŸh™h zÓ:¸Eñ
ØLRñ
ð 	
r   c                ór   • U R                   R                  " XR                  U R                  X!5      U40 UD6$ )aU  Find the `element.Tag` closest to this one that matches the given selector.

This uses the Soup Sieve library. For more information, see
that library's documentation for the `soupsieve.closest()
<https://facelessuser.github.io/soupsieve/api/#soupsieveclosest>`_
method.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.closest() <https://facelessuser.github.io/soupsieve/api/#soupsieveclosest>`_ method.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   `soupsieve.closest() <https://facelessuser.github.io/soupsieve/api/#soupsieveclosest>`_ method.

)r   Úclosestr   r)   r2   s        r   rB   ÚCSS.closestê   s7   € ð8 �x‰x×ÒØ—H‘H˜dŸh™h zÓ:¸Eñ
ØEKñ
ð 	
r   c                óŽ   • [        [        U R                  R                  " XR                  U R                  X!5      U40 UD65      $ )a7  Check whether or not this `element.Tag` matches the given CSS selector.

This uses the Soup Sieve library. For more information, see
that library's documentation for the `soupsieve.match()
<https://facelessuser.github.io/soupsieve/api/#soupsievematch>`_
method.

:param: a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.match()
    <https://facelessuser.github.io/soupsieve/api/#soupsievematch>`_
    method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    `soupsieve.match()
    <https://facelessuser.github.io/soupsieve/api/#soupsievematch>`_
    method.
)r   Úboolr   Úmatchr   r)   r2   s        r   rF   Ú	CSS.match
  s@   € ô> ÜØ�H‰H�NŠNØŸ™ $§(¡(¨:Ó">ÀñØIOñó
ð 	
r   c           
     ó�   • U R                  U R                  R                  " XR                  U R	                  X!5      U40 UD65      $ )a¶  Filter this `element.Tag`'s direct children based on the given CSS selector.

This uses the Soup Sieve library. It works the same way as
passing a `element.Tag` into that library's `soupsieve.filter()
<https://facelessuser.github.io/soupsieve/api/#soupsievefilter>`_
method. For more information, see the documentation for
`soupsieve.filter()
<https://facelessuser.github.io/soupsieve/api/#soupsievefilter>`_.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    `soupsieve.filter()
    <https://facelessuser.github.io/soupsieve/api/#soupsievefilter>`_
    method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    `soupsieve.filter()
    <https://facelessuser.github.io/soupsieve/api/#soupsievefilter>`_
    method.
)r.   r   Úfilterr   r)   r2   s        r   rI   Ú
CSS.filter0  sA   € ð> �x‰xØ�H‰H�OŠOØŸ™ $§(¡(¨:Ó">ÀñØIOñó
ð 	
r   )r   r   )N)r   zelement.Tagr   r   )r"   r    Úreturnr    )r'   úOptional[_NamespaceMapping]r(   r    rK   rL   )r-   zMutableSequence[Tag]rK   zResultSet[Tag])Nr   )
r(   r    r3   rL   r4   Úintr5   r   rK   r   )
r(   r    r3   rL   r4   rM   r5   r   rK   zelement.Tag | None)Nr   r   )r(   r    r3   rL   r<   rM   r4   rM   r5   r   rK   úResultSet[element.Tag])r(   r    r3   rL   r<   rM   r4   rM   r5   r   rK   zIterator[element.Tag])
r(   r    r3   rL   r4   rM   r5   r   rK   zOptional[element.Tag])
r(   r    r3   rL   r4   rM   r5   r   rK   rE   )
r(   r    r3   rL   r4   rM   r5   r   rK   rN   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r!   r)   r.   r1   r8   r(   r?   rB   rF   rI   Ú__static_attributes__© r   r   r   r   -   s  † ñöô
1ð	Ø-ð	Ø7:ð	à	$ô	ô(ð  37Øð	WàðWð 0ðWð ð	Wð
 ðWð 
õWð< 37Øð	
àð
ð 0ð
ð ð	
ð
 ð
ð 
õ
ðB 37ØØð#
àð#
ð 0ð#
ð ð	#
ð
 ð#
ð ð#
ð 
 õ#
ðP 37ØØð!
àð!
ð 0ð!
ð ð	!
ð
 ð!
ð ð!
ð 
õ!
ðL 37Øð	
àð
ð 0ð
ð ð	
ð
 ð
ð 
õ
ðF 37Øð	$
àð$
ð 0ð$
ð ð	$
ð
 ð$
ð 
õ$
ðR 37Øð	#
àð#
ð 0ð#
ð ð	#
ð
 ð#
ð 
 ÷#
ð #
r   r   )rS   Ú
__future__r   Útypesr   Útypingr   r   r   r   r	   r
   r   ÚwarningsÚbs4._typingr   r   r   r,   r   Úbs4.elementr   r   Ú__annotations__ÚImportErrorÚwarnÚobjectr   rU   r   r   Ú<module>r`      sv   ðòõ #å ÷÷ ñ ó Ý )æÝ#Ýß*àÓ ðÛôf
ˆ&õ f
øð ó Ø€IØ‡M‚MØOöðús   ÁA ÁA:Á9A: