
    hMh                         d Z ddlmZmZmZmZ ddlmZmZ ddl	m
Z
 g dZe G d d	e                      Z G d
 de          ZdS )zContains the Layout class    )UnicodeInstanceCaselessStrEnumvalidate   )Widgetregister   ) __jupyter_widgets_base_version__)inheritinitialunsetc                       e Zd ZdZ ed                              d          Z ed                              d          Z ee                              d          Z	 ed                              d          Z
 eg dez   dd	                              d          Z eg d
ez   dd	                              d          Z eg dez   dd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eg dez   dd	                              d          Z eg dez   dd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd	                              d          Z eddd 	                              d          Z eddd!	                              d          Z  eddd"	                              d          Z! eddd#	                              d          Z" eddd$	                              d          Z# eddd%	                              d          Z$ eddd&	                              d          Z% ed'd(gez   dd)	                              d          Z& eddd*	                              d          Z' eg d+dd,	                              d          Z( eddd-	                              d          Z) eddd.	                              d          Z* eg d/ez   dd0	                              d          Z+ eddd1	                              d          Z, eddd2	                              d          Z- eddd3	                              d          Z. eddd4	                              d          Z/ eddd5	                              d          Z0 eddd6	                              d          Z1 eddd7	                              d          Z2 eddd8	                              d          Z3 fd9Z4d: Z5d; Z6 e7e5e6          Z8 xZ9S )<Layouta  Layout specification

    Defines a layout that can be expressed using CSS.  Supports a subset of
    https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

    When a property is also accessible via a shorthand property, we only
    expose the shorthand.

    For example:
    - ``flex-grow``, ``flex-shrink`` and ``flex-basis`` are bound to ``flex``.
    - ``flex-wrap`` and ``flex-direction`` are bound to ``flex-flow``.
    - ``margin-[top/bottom/left/right]`` values are bound to ``margin``, etc.
    
LayoutViewT)syncz@jupyter-widgets/baseLayoutModel)
flex-startflex-endcenterspace-betweenspace-aroundzspace-evenlystretchz The align-content CSS attribute.)
allow_nonehelp)r   r   r   baseliner   zThe align-items CSS attribute.)autor   r   r   r   r   zThe align-self CSS attribute.NzThe border top CSS attribute.zThe border right CSS attribute.z The border bottom CSS attribute.zThe border left CSS attribute.zThe bottom CSS attribute.zThe display CSS attribute.zThe flex CSS attribute.zThe flex-flow CSS attribute.zThe height CSS attribute.)r   r   r   r   r   z"The justify-content CSS attribute.)r   r   r   z The justify-items CSS attribute.zThe left CSS attribute.zThe margin CSS attribute.zThe max-height CSS attribute.zThe max-width CSS attribute.zThe min-height CSS attribute.zThe min-width CSS attribute.zThe overflow CSS attribute.zThe order CSS attribute.zThe padding CSS attribute.zThe right CSS attribute.zThe top CSS attribute.visiblehiddenzThe visibility CSS attribute.zThe width CSS attribute.)containcoverfillz
scale-downnonezThe object-fit CSS attribute.z"The object-position CSS attribute.z$The grid-auto-columns CSS attribute.)columnrowz	row densezcolumn densez!The grid-auto-flow CSS attribute.z!The grid-auto-rows CSS attribute.zThe grid-gap CSS attribute.z%The grid-template-rows CSS attribute.z(The grid-template-columns CSS attribute.z&The grid-template-areas CSS attribute.zThe grid-row CSS attribute.zThe grid-column CSS attribute.zThe grid-area CSS attribute.c                     d|v r3|                     d          }dD ]}|                    d| |            t                      j        di | d S )Nbordertoprightbottomleftborder_ )pop
setdefaultsuper__init__)selfkwargsr'   side	__class__s       `/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/ipywidgets/widgets/widget_layout.pyr2   zLayout.__init__P   ss    vZZ))F: < <!!"2D"2"2F;;;;""6"""""    c                     d}dD ]:}t          | d|z             s dS |t          | d|z             }}||	||k    r dS ;|S )z
        `border` property getter. Return the common value of all side
        borders if they are identical. Otherwise return None.

        Nr(   r-   )hasattrgetattr)r3   foundr5   olds       r7   _get_borderzLayout._get_borderX   sl     6 	 	D4T!122 i$.> ? ?C}Uc\\r8   c                 8    dD ]}t          | d|z   |           dS )zO
        `border` property setter. Set all 4 sides to `border` string.
        r(   r-   N)setattr)r3   r'   r5   s      r7   _set_borderzLayout._set_borderg   s7     7 	4 	4DD)d*F3333	4 	4r8   ):__name__
__module____qualname____doc__r   tag
_view_name_view_moduler   _view_module_version_model_namer   CSS_PROPERTIESalign_contentalign_items
align_self
border_topborder_rightborder_bottomborder_leftr+   displayflex	flex_flowheightjustify_contentjustify_itemsr,   margin
max_height	max_width
min_height	min_widthoverfloworderpaddingr*   r)   
visibilitywidth
object_fitobject_positiongrid_auto_columnsgrid_auto_flowgrid_auto_rowsgrid_gapgrid_template_rowsgrid_template_columnsgrid_template_areasgrid_rowgrid_column	grid_arear2   r>   rA   propertyr'   __classcell__r6   s   @r7   r   r      sn         &&***55J723377T7BBL"7#CDDHHdHSS'-((,,$,77K $O %3 %3 %35C%DPT[}   @C  @C  IM  @C  @N  @N !/ # # #!/#0<@Ggi i iililrviliwiw   ") ") ")+9":FJQpr r rruru{ru  sA  sA $5TUUUYY_cYddJ74D7XYYY]]cg]hhLGDT8Z[[[__ei_jjM'$46VWWW[[ae[ffKWTd1LMMMQQW[Q\\Fgdt2NOOOSSY]S^^G74D/HIIIMMSWMXXD4RSSSWW]aWbbIWTd1LMMMQQW[Q\\F%o ') ') ')+9':FJQuw w wwzwz  AEwz  xF  xF #O$H$H$H>$Y@B B BBE#4#.. 74D/HIIIMMSWMXXDWTd1LMMMQQW[Q\\F$5TUUUYY_cYddJ4RSSSWW]aWbbI$5TUUUYY_cYddJ4RSSSWW]aWbbIwt3PQQQUU[_U``HGDT0JKKKOOUYOZZEgdt2NOOOSSY]S^^GGDT0JKKKOOUYOZZE
'$4.F
G
G
G
K
KQU
K
V
VC )X!6~!ERV]|}}}  B  B  HL  B  M  MJGDT0JKKKOOUYOZZE !S!S!S`d  lK  L  L  L  P  P  VZ  P  [  [Jgdt:^___ccimcnnO<bcccggmqgrr$_%P%P%PR`%`mq  y\  ]  ]  ]  a  a  gk  a  l  lNWTd9\]]]aagkallNwt3PQQQUU[_U``H $=deeeiiositt#GDT@jkkkoouyozz!'$4>fgggkkqukvvwt3PQQQUU[_U``H'$46VWWW[[ae[ffK4RSSSWW]aWbbI# # # # #  4 4 4 Xk;//FFFFFr8   r   c                   "     e Zd ZeZ fdZ xZS )LayoutTraitTypec                     t          |t                    r-t                                          | | j        di |          S t                                          ||          S )Nr.   )
isinstancedictr1   r   klass)r3   objvaluer6   s      r7   r   zLayoutTraitType.validateu   s[    eT"" 	077##C)<)<e)<)<===77##C///r8   )rB   rC   rD   r   rw   r   rp   rq   s   @r7   rs   rs   q   s=        E0 0 0 0 0 0 0 0 0r8   rs   N)rE   	traitletsr   r   r   r   widgetr   r	   _versionr   rK   r   rs   r.   r8   r7   <module>r}      s       B B B B B B B B B B B B $ $ $ $ $ $ $ $ 7 7 7 7 7 7...	a0 a0 a0 a0 a0V a0 a0 
a0H0 0 0 0 0h 0 0 0 0 0r8   