§
     Mºf  ã                   óÒ  — d dl mZ  G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z eej        ¬¦  «        ej        d	<    eej        d
d¬¦  «        ej        d<    eej        ¬¦  «        ej        d<    ed
¬¦  «        ej        d
<    eej        ¬¦  «        ej        d	<    eej        ¬¦  «        ej        d<    e eej        d
¬¦  «        ¦  «        ej        d
<   d
S )é    )ÚEntitySubstitutionc                   óv   — e Zd ZdZi Zi ZdZdZ e e	ddg¦  «        ¬¦  «        Z
d„ Z	 	 	 dd„Zd„ Zd„ Zd„ ZdS )Ú	Formattera   Describes a strategy to use when outputting a parse tree to a string.

    Some parts of this strategy come from the distinction between
    HTML4, HTML5, and XML. Others are configurable by the user.

    Formatters are passed in as the `formatter` argument to methods
    like `PageElement.encode`. Most people won't need to think about
    formatters, and most people who need to think about them can pass
    in one of these predefined strings as `formatter` rather than
    making a new Formatter object:

    For HTML documents:
     * 'html' - HTML entity substitution for generic HTML documents. (default)
     * 'html5' - HTML entity substitution for HTML5 documents, as
                 well as some optimizations in the way tags are rendered.
     * 'minimal' - Only make the substitutions necessary to guarantee
                   valid HTML.
     * None - Do not perform any substitution. This will be faster
              but may result in invalid markup.

    For XML documents:
     * 'html' - Entity substitution for XHTML documents.
     * 'minimal' - Only make the substitutions necessary to guarantee
                   valid XML. (default)
     * None - Do not perform any substitution. This will be faster
              but may result in invalid markup.
    ÚhtmlÚxmlÚscriptÚstyle)Úcdata_containing_tagsc                 óV   — |�|S || j         k    rt          ¦   «         S | j        |         S ©N)ÚXMLÚsetÚHTML_DEFAULTS)ÚselfÚlanguageÚvalueÚkwargs       úL/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/bs4/formatter.pyÚ_defaultzFormatter._default*   s1   € ØÐØˆLØ�t”xÒÐÝ‘5”5ˆLØÔ! %Ô(Ð(ó    Nú/Fé   c                 ó  — || _         || _        || _        |                      ||d¦  «        | _        || _        |€d}t          |t          ¦  «        r|dk     rd}d|z  }nt          |t          ¦  «        r|}nd}|| _	        dS )a-  Constructor.

        :param language: This should be Formatter.XML if you are formatting
           XML markup and Formatter.HTML if you are formatting HTML markup.

        :param entity_substitution: A function to call to replace special
           characters with XML/HTML entities. For examples, see 
           bs4.dammit.EntitySubstitution.substitute_html and substitute_xml.
        :param void_element_close_prefix: By default, void elements
           are represented as <tag/> (XML rules) rather than <tag>
           (HTML rules). To get <tag>, pass in the empty string.
        :param cdata_containing_tags: The list of tags that are defined
           as containing CDATA in this dialect. For example, in HTML,
           <script> and <style> tags are defined as containing CDATA,
           and their contents should not be formatted.
        :param blank_attributes_are_booleans: Render attributes whose value
            is the empty string as HTML-style boolean attributes.
            (Attributes whose value is None are always rendered this way.)

        :param indent: If indent is a non-negative integer or string,
            then the contents of elements will be indented
            appropriately when pretty-printing. An indent level of 0,
            negative, or "" will only insert newlines. Using a
            positive integer indent indents that many spaces per
            level. If indent is a string (such as "\t"), that string
            is used to indent each level. The default behavior is to
            indent one space per level.
        r
   Nr   ú )
r   Úentity_substitutionÚvoid_element_close_prefixr   r
   Úempty_attributes_are_booleansÚ
isinstanceÚintÚstrÚindent)r   r   r   r   r
   r   r!   s          r   Ú__init__zFormatter.__init__1   s¤   € ðB !ˆŒØ#6ˆÔ Ø)BˆÔ&Ø%)§]¢]ØÐ+Ð-Dñ&
ô &
ˆÔ"ð ,IˆÔ*Øˆ>ØˆFÝ�f�cÑ"Ô"ð 	Ø˜ŠzˆzØ�Ø˜6‘\ˆFˆFÝ˜¥Ñ$Ô$ð 	ØˆFˆFàˆFØˆŒˆˆr   c                 ó¢   — | j         s|S ddlm} t          ||¦  «        r|j        �|j        j        | j        v r|S |                       |¦  «        S )a  Process a string that needs to undergo entity substitution.
        This may be a string encountered in an attribute value or as
        text.

        :param ns: A string.
        :return: A string with certain characters replaced by named
           or numeric entities.
        r   )ÚNavigableString)r   Úelementr$   r   ÚparentÚnamer
   )r   Únsr$   s      r   Ú
substitutezFormatter.substitutee   sk   € ð Ô'ð 	ØˆIØ,Ð,Ð,Ð,Ð,Ð,Ý�r˜?Ñ+Ô+ð 	Ø”	Ð%Ø”	” $Ô"<Ð<Ð<àˆIà×'Ò'¨Ñ+Ô+Ð+r   c                 ó,   — |                       |¦  «        S )z­Process the value of an attribute.

        :param ns: A string.
        :return: A string with certain characters replaced by named
           or numeric entities.
        )r)   )r   r   s     r   Úattribute_valuezFormatter.attribute_valuey   s   € ð �Š˜uÑ%Ô%Ð%r   c                 ó”   ‡ — |j         €g S t          ˆ fd„t          |j                              ¦   «         ¦  «        D ¦   «         ¦  «        S )a³  Reorder a tag's attributes however you want.
        
        By default, attributes are sorted alphabetically. This makes
        behavior consistent between Python 2 and Python 3, and preserves
        backwards compatibility with older versions of Beautiful Soup.

        If `empty_boolean_attributes` is True, then attributes whose
        values are set to the empty string will be treated as boolean
        attributes.
        Nc              3   óD   •K  — | ]\  }}|‰j         r|d k    rdn|fV — ŒdS )Ú N)r   )Ú.0ÚkÚvr   s      €r   ú	<genexpr>z'Formatter.attributes.<locals>.<genexpr>�   sT   øè è € ð 
ð 
á��1ð ˜Ô;ÐNÀÀRÂÀ��ÈQÐPð
ð 
ð 
ð 
ð 
ð 
r   )ÚattrsÚsortedÚlistÚitems)r   Útags   ` r   Ú
attributeszFormatter.attributes‚   s^   ø€ ð Œ9ÐØˆIÝð 
ð 
ð 
ð 
å˜SœYŸ_š_Ñ.Ô.Ñ/Ô/ð
ñ 
ô 
ñ 
ô 
ð 	
r   )NNr   NFr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚXML_FORMATTERSÚHTML_FORMATTERSÚHTMLr   Údictr   r   r   r"   r)   r+   r8   © r   r   r   r      s¸   € € € € € ðð ð8 €NØ€Oà€DØ
€Cà�DØ!˜c 8¨WÐ"5Ñ6Ô6ðñ ô €Mð)ð )ð )ð 6:ØAEØ89ð2ð 2ð 2ð 2ðh,ð ,ð ,ð(&ð &ð &ð
ð 
ð 
ð 
ð 
r   r   c                   ó&   ‡ — e Zd ZdZi Zˆ fd„Zˆ xZS )ÚHTMLFormatterzA generic Formatter for HTML.c                 óZ   •—  t          t          | ¦  «        j        | j        g|¢R i |¤Ž d S r   )ÚsuperrC   r"   r?   ©r   ÚargsÚkwargsÚ	__class__s      €r   r"   zHTMLFormatter.__init__—   s8   ø€ Ø+��m˜TÑ"Ô"Ô+¨D¬IÐG¸ÐGÐGÐGÀÐGÐGÐGÐGÐGr   ©r9   r:   r;   r<   ÚREGISTRYr"   Ú__classcell__©rI   s   @r   rC   rC   ”   sL   ø€ € € € € Ø'Ð'Ø€HðHð Hð Hð Hð Hð Hð Hð Hð Hr   rC   c                   ó&   ‡ — e Zd ZdZi Zˆ fd„Zˆ xZS )ÚXMLFormatterzA generic Formatter for XML.c                 óZ   •—  t          t          | ¦  «        j        | j        g|¢R i |¤Ž d S r   )rE   rO   r"   r   rF   s      €r   r"   zXMLFormatter.__init__ž   s8   ø€ Ø*��l˜DÑ!Ô!Ô*¨4¬8ÐE°dÐEÐEÐE¸fÐEÐEÐEÐEÐEr   rJ   rM   s   @r   rO   rO   ›   sL   ø€ € € € € Ø&Ð&Ø€HðFð Fð Fð Fð Fð Fð Fð Fð Fr   rO   )r   r   NT)r   r   r   Úhtml5Úminimal)	Ú
bs4.dammitr   r   rC   rO   Úsubstitute_htmlrK   Úsubstitute_xmlr   rA   r   r   ú<module>rV      sË  ðØ )Ð )Ð )Ð )Ð )Ð )ðO
ð O
ð O
ð O
ð O
Ð"ñ O
ô O
ð O
ðbHð Hð Hð Hð H�Iñ Hô Hð HðFð Fð Fð Fð F�9ñ Fô Fð Fð "/ Ø*Ô:ð"ñ "ô "€Ô �vÑ ð #0 -Ø*Ô:Ø"Ø"&ð#ñ #ô #€Ô �wÑ ð
 %2 MØ*Ô9ð%ñ %ô %€Ô �yÑ !ð  -˜}Øð ñ  ô  €Ô �tÑ ð ". Ø*Ô:ð"ñ "ô "€Ô �fÑ ð $0 <Ø*Ô9ð$ñ $ô $€Ô �iÑ  ð (˜iØ€IˆiŒm°Ð6Ñ6Ô6ñô €Ô �dÑ Ð Ð r   