§
    1�’jß  ã                   óp   — d dl Z d dlZd dlmZ d dlZd dlmZ d dlm	Z	m
Z
 d„ Zd„ Z G d„ dee¦  «        ZdS )	é    N)ÚUserDict)ÚReprHTMLMixin)Úgenerate_link_to_param_docÚget_docstringc                 óp  — t          | t          j        ¦  «        r-t          j        | dddd¬¦  «        } t	          j        | ¦  «        S t          j        ¦   «         }dD ]}t          ||d¦  «         Œd|_	        t          | t          ¦  «        r| d›S t	          j        |                     | ¦  «        ¦  «        S )	Né   ú,Té   )Ú	precisionÚ	separatorÚsuppress_smallÚ	threshold)ÚmaxlistÚmaxdictÚmaxtupleÚmaxsetÚmaxfrozensetÚmaxdequeÚmaxarrayé	   z.4g)Ú
isinstanceÚnpÚndarrayÚarray2stringÚhtmlÚescapeÚreprlibÚReprÚsetattrÚ	maxstringÚfloatÚrepr)ÚvalueÚrÚattrs      úXC:\Projects\DSCons\.venv\Lib\site-packages\sklearn\utils\_repr_html\fitted_attributes.pyÚ_read_fitted_attrr'      s¹   € Ý�%�œÑ$Ô$ð "Ý”Ø˜Q¨#¸dÈað
ñ 
ô 
ˆõ Œ{˜5Ñ!Ô!Ð!åŒ‰Œ€Aðð 	ð 	ˆõ 	��4˜ÑÔÐÐØ€A„Kå�%�ÑÔð Øˆ~ˆ~ÐåŒ;�q—v’v˜e‘}”}Ñ%Ô%Ð%ó    c                 óˆ  — d}d}d}g }|                       ¦   «         D �]|\  }}t          | j        || j        ¦  «        }t	          | j        d|¦  «        }| j        r/|r-|r+|                     |t          j        |¦  «        |¬¦  «        }	ndt          j        |¦  «        › d�}	t          |¦  «        dk    r=t          j        t          |d	         ¦  «        ¦  «        t          |d
         ¦  «        f}
n‡t          j        |d	         ¦  «        }t          j        t          |d         ¦  «        ¦  «        }t          j        t          |d         ¦  «        ¦  «        }|› d|› d|› �t          |d
         ¦  «        f}
|                      |j        |
d|	iŽ¦  «         �Œ~|                     d                     |¦  «        ¬¦  «        S )zìGenerate HTML representation of estimator fitted attributes.

    Creates an HTML table with fitted attribute names and values
    wrapped in a collapsible details element. When attributes are arrays,
    shape and dtype are shown.
    aì  
        <div class="estimator-table">
            <details>
                <summary>Fitted attributes</summary>
                <table class="parameters-table">
                    <tbody>
                        <tr>
                        <th>Name</th>
                        <th>Type</th>
                        <th>Value</th>
                        </tr>
                        {rows}
                    </tbody>
                </table>
            </details>
        </div>
    z°
       <tr class="default">
           <td class="param">{fitted_attr_display}</td>
           <td class="fitted-att-type">{0}</td>
           <td>{1}</td>


       </tr>
    aq  
        <a class="param-doc-link"
            style="anchor-name: --doc-link-{fitted_attr_name};"
            rel="noreferrer" target="_blank" href="{link}">
            {fitted_attr_name}
            <span class="param-doc-description"
            style="position-anchor: --doc-link-{fitted_attr_name};">
            {fitted_attr_description}</span>
        </a>
    Ú
Attributes)ÚlinkÚfitted_attr_nameÚfitted_attr_descriptionz8<a class="param-doc-link" style="text-decoration:none;">z</a>r   Ú	type_namer#   ÚdtypeÚshapeú[ú]Úfitted_attr_displayú
)Úrows)Úitemsr   Úestimator_classÚdoc_linkr   Úformatr   r   ÚlenÚstrr'   ÚappendÚjoin)Úfitted_attributesÚFITTED_ATTR_TEMPLATEÚFITTED_ATTR_ROW_TEMPLATEÚ'FITTED_ATTR_AVAILABLE_DOC_LINK_TEMPLATEr5   ÚnameÚ	attr_infor+   r-   r3   Úhtml_row_valuesr.   r/   r0   s                 r&   Ú_fitted_attr_html_reprrE   ,   s  € ðÐð" Ðð	/Ð+ð €Dà,×2Ò2Ñ4Ô4ð +
ñ +
‰ˆˆiÝ)ØÔ-ØØÔ&ñ
ô 
ˆõ
 #0ØÔ-¨|¸Tñ#
ô #
Ðð Ô%ð 	¨$ð 	Ð3Jð 	à"I×"PÒ"PØÝ!%¤¨TÑ!2Ô!2Ø(?ð #Qñ #ô #ÐÐð+Ý”;˜tÑ$Ô$ð+ð +ð +ð  õ
 ˆy‰>Œ>˜QÒÐå”�C 	¨+Ô 6Ñ7Ô7Ñ8Ô8Ý! )¨GÔ"4Ñ5Ô5ðˆOˆOõ
 œ I¨kÔ$:Ñ;Ô;ˆIÝ”K¥ I¨gÔ$6Ñ 7Ô 7Ñ8Ô8ˆEÝ”K¥ I¨gÔ$6Ñ 7Ô 7Ñ8Ô8ˆEð Ð.Ð.˜uÐ.Ð. uÐ.Ð.Ý! )¨GÔ"4Ñ5Ô5ðˆOð 	�ŠØ+Ð$Ô+Ø ðà$7ðð ñ	
ô 	
ð 	
ñ 	
ð  ×&Ò&¨D¯IªI°d©O¬OÐ&Ñ<Ô<Ð<r(   c                   ó0   ‡ — e Zd ZdZeZddddœˆ fd„
Zˆ xZS )Ú	AttrsDictaÃ  Dictionary-like class to store and provide an HTML representation.

    It builds an HTML structure to be used with Jupyter notebooks or similar
    environments.

    Parameters
    ----------
    fitted_attrs : dict, default=None
        Dictionary of fitted attributes and their values.

    estimator_class : type, default=None
        The class of the estimator. It allows to find the online documentation
        link for each parameter.

    doc_link : str, default=""
        The base URL to the online documentation for the estimator class.
        Used to generate parameter-specific documentation links in the HTML
        representation. If empty, documentation links will not be generated.
    NÚ )Úfitted_attrsr7   r8   c                ój   •— t          ¦   «                              |pi ¦  «         || _        || _        d S )N)ÚsuperÚ__init__r7   r8   )ÚselfrI   r7   r8   Ú	__class__s       €r&   rL   zAttrsDict.__init__£   s3   ø€ Ý‰Œ×Ò˜Ð+¨Ñ,Ô,Ð,Ø.ˆÔØ ˆŒˆˆr(   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rE   Ú
_html_reprrL   Ú__classcell__)rN   s   @r&   rG   rG   Œ   sZ   ø€ € € € € ðð ð( (€Jà'+¸TÈBð !ð !ð !ð !ð !ð !ð !ð !ð !ð !ð !r(   rG   )r   r   Úcollectionsr   Únumpyr   Úsklearn.utils._repr_html.baser   Úsklearn.utils._repr_html.commonr   r   r'   rE   rG   © r(   r&   ú<module>rZ      sÉ   ðð €€€Ø €€€Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð à 7Ð 7Ð 7Ð 7Ð 7Ð 7ðð ð ð ð ð ð ð ð&ð &ð &ð6]=ð ]=ð ]=ð@!ð !ð !ð !ð !�˜xñ !ô !ð !ð !ð !r(   