
    -e9                       d Z ddlmZ ddlZ ej        e          ZddlmZ ddl	m
Z
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ dd	lmZmZmZm Z  d
dl!m"Z" d
dl#m$Z$m%Z%m&Z&m'Z' ddl(m)Z)m*Z* ddl+m,Z,m-Z- dZ. G d de)          Z/ G d de*          Z0 G d de)          Z1 G d de)          Z2 G d de)          Z3 G d de*          Z4dS )z

    )annotationsN)nan   )CoordinateUnits	Dimension)BoolCoordinateLikeEnumFloatIncludeInstanceInstanceDefaultNullNullableOverrideSeq	UnitsSpecfield)BorderRadius)	LinePropsScalarFillPropsScalarHatchPropsScalarLineProps   )
Coordinate)FrameBottom	FrameLeft
FrameRightFrameTop   )
AnnotationDataAnnotation)	ArrowHeadTeeHead)BandBoxAnnotationPolyAnnotationSlopeSpanWhiskerc                      e Zd ZdZd2 fdZ eed                              ed           Z	 eed                              ed	           Z
 eed
                              ed           Z eed                              ed           Z eedd          Z eedd          Z eedd          Z eedd          Z eed          Z eed          Z eed          Z eed          Z edd          Z edd          Z eddddd d!d"d#d#d$
  
        Z edd!d"d%d%d&          Z edd'          Z ee d(          Z! ee"d(          Z# ee$d(          Z% ee d)d*+          Z& ee"d)d*+          Z' ee$d)d*+          Z( e)d,-          Z* e)d.-          Z+ e)d/-          Z, e)d0-          Z- e)d1-          Z. e)d.-          Z/ e)d1-          Z0 e)d0-          Z1 xZ2S )3r&   z Render a shaded rectangular region as an annotation.

    See :ref:`ug_basic_annotations_box_annotations` for information on plotting box annotations.

    returnNonec                :     t                      j        |i | d S Nsuper__init__selfargskwargs	__class__s      Alib/python3.11/site-packages/bokeh/models/annotations/geometry.pyr2   zBoxAnnotation.__init__U   %    $)&)))))    zC
    The x-coordinates of the left edge of the box annotation.
    defaulthelpc                    t                      S r/   )r   _values    r8   <lambda>zBoxAnnotation.<lambda>Z   s
    ikk r:   zD
    The x-coordinates of the right edge of the box annotation.
    c                    t                      S r/   )r   r?   s    r8   rA   zBoxAnnotation.<lambda>^   s
    jll r:   zB
    The y-coordinates of the top edge of the box annotation.
    c                    t                      S r/   )r   r?   s    r8   rA   zBoxAnnotation.<lambda>b   s
    hjj r:   zE
    The y-coordinates of the bottom edge of the box annotation.
    c                    t                      S r/   )r   r?   s    r8   rA   zBoxAnnotation.<lambda>f   s
    kmm r:   dataz[
    The unit type for the left attribute. Interpreted as |data units| by
    default.
    z\
    The unit type for the right attribute. Interpreted as |data units| by
    default.
    zZ
    The unit type for the top attribute. Interpreted as |data units| by
    default.
    z]
    The unit type for the bottom attribute. Interpreted as |data units| by
    default.
    z
    Optional left limit for box movement.

    .. note::
        This property is experimental and may change at any point.
    r=   z
    Optional right limit for box movement.

    .. note::
        This property is experimental and may change at any point.
    z
    Optional top limit for box movement.

    .. note::
        This property is experimental and may change at any point.
    z
    Optional bottom limit for box movement.

    .. note::
        This property is experimental and may change at any point.
    r   z
    Allows the box to have rounded corners.

    .. note::
        This property is experimental and may change at any point.
    Fz
    Allows to interactively modify the geometry of this box.

    .. note::
        This property is experimental and may change at any point.
    noneleftrighttopbottomxyalla  
    If `editable` is set, this property allows to configure which
    combinations of edges are allowed to be moved, thus allows
    restrictions on resizing of the box.

    .. note::
        This property is experimental and may change at any point.
    bothz
    If `editable` is set, this property allows to configure in which
    directions the box can be moved.

    .. note::
        This property is experimental and may change at any point.
    z
    Indicates whether the box is resizable around its center or its corners.

    .. note::
        This property is experimental and may change at any point.
    z(
    The {prop} values for the box.
    hoverz;
    The {prop} values for the box when hovering over.
    prefixr=   #ccccccr<   333333?#fff9ba皙?Nr,   r-   )3__name__
__module____qualname____doc__r2   r   r   acceptsr   rH   rI   rJ   rK   r
   r   
left_unitsright_units	top_unitsbottom_unitsr   
left_limitright_limit	top_limitbottom_limitr   border_radiusr   editable	resizablemovable	symmetricr   r   
line_propsr   
fill_propsr   hatch_propshover_line_propshover_fill_propshover_hatch_propsr   
line_color
line_alpha
fill_color
fill_alphahover_line_colorhover_line_alphahover_fill_colorhover_fill_alpha__classcell__r7   s   @r8   r&   r&   M   s'        * * * * * * :c ) 	 	 		11	2	2 	 Js * 	 	 		22	3	3 
 *S ( 	 	 		00	1	1  Z + 	 	 		33	4	4  ov = 	 	 	J
 $ > 	 	 	K
 _f < 	 	 	I
 4 ? 	 	 	L
 * , 	 	 	J (: - 	 	 	K  + 	 	 	I 8J . 	 	 	L !L 2 	 	 	M tE ) 	 	 	H VVWeXsCX] e 	 	 	I d63VV C 	 	 	G U * 	 	 	I  0 	 	 	J  0 	 	 	J '* 2 	 	 	K ww F 	 	 	 ww F 	 	 	   0 H 	 	 	 ),,,J#&&&J),,,J#&&&Jx---x,,,x---x,,,r:   r&   c                  d    e Zd ZdZd fdZ e ed          edd          Z e ed	          edd
          Z	 e ed          edd          Z
 eedd          Z eed          Z ed          Z ed          Z eed          Z ed          Z ed          Z xZS )r%   z Render a filled area band along a dimension.

    See :ref:`ug_basic_annotations_bands` for information on plotting bands.

    r,   r-   c                :     t                      j        |i | d S r/   r0   r3   s      r8   r2   zBand.__init__   r9   r:   lowerrE   zG
    The coordinates of the lower portion of the filled area band.
    r<   
units_enumunits_defaultr=   upperzG
    The coordinates of the upper portion of the filled area band.
    baseC
    The orthogonal coordinates of the upper and lower values.
    heightz
    The direction of the band can be specified by setting this property
    to "height" (``y`` direction) or "width" (``x`` direction).
    r;   z)
    The {prop} values for the band.
    rF   rU   rT   rS   rW   rV   rX   )rY   rZ   r[   r\   r2   r   r   r   r}   r   r   r
   r   	dimensionr   r   rk   r   rr   rq   r   rl   rt   rs   ry   rz   s   @r8   r%   r%      sk        * * * * * * IeeGnnX^ f 	 	 	E IeeGnnX^ f 	 	 	E 9UU6]]V\ d 	 	 	D Y 8 	 	 	I
  0 	 	 	J #&&&J),,,J 0 	 	 	J #&&&J),,,JJJJJr:   r%   c                      e Zd ZdZd fdZ eeg d          Z ee	dd          Z
 eeg d	          Z ee	dd
          Z edd          Z eed          Z eed          Z eed          Z eedd          Z eedd          Z eedd          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z  ed          Z! xZ"S )r'   z Render a shaded polygonal region as an annotation.

    See :ref:`ug_basic_annotations_polygon_annotations` for information on
    plotting polygon annotations.

    r,   r-   c                :     t                      j        |i | d S r/   r0   r3   s      r8   r2   zPolyAnnotation.__init__  r9   r:   z2
    The x-coordinates of the region to draw.
    r;   rE   z]
    The unit type for the ``xs`` attribute. Interpreted as |data units| by
    default.
    z2
    The y-coordinates of the region to draw.
    z]
    The unit type for the ``ys`` attribute. Interpreted as |data units| by
    default.
    Fz
    Allows to interactively modify the geometry of this polygon.

    .. note::
        This property is experimental and may change at any point.
    z,
    The {prop} values for the polygon.
    rF   rP   z?
    The {prop} values for the polygon when hovering over.
    rQ   rS   rT   rU   rV   rW   NrX   )#rY   rZ   r[   r\   r2   r   r	   xsr
   r   xs_unitsysys_unitsr   rg   r   r   rk   r   rl   r   rm   rn   ro   rp   r   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   s   @r8   r'   r'     s@        * * * * * * 
^R / 
	 
	 
	B tOV ; 	 	 	H
 
^R / 
	 
	 
	B tOV ; 	 	 	H
 tE ) 	 	 	H  0 	 	 	J  0 	 	 	J '* 2 	 	 	K ww F 	 	 	 ww F 	 	 	   0 H 	 	 	 ),,,J#&&&J),,,J#&&&Jx---x,,,x---x,,,r:   r'   c                  B    e Zd ZdZd fdZ eed          Z eed          Z e	e
d          Z e	ed	d
          Z e	ed	d
          Z e	edd          Z e	edd          Z ed          Z ed          Z ed          Z ed          Z xZS )r(   z| Render a sloped line as an annotation.

    See :ref:`ug_basic_annotations_slope` for information on plotting slopes.

    r,   r-   c                :     t                      j        |i | d S r/   r0   r3   s      r8   r2   zSlope.__init__`  r9   r:   z3
    The gradient of the line, in |data units|
    rF   z6
    The y intercept of the line, in |data units|
    z)
    The {prop} values for the line.
    abovez8
    The {prop} values for the area above the line.
    rQ   belowz8
    The {prop} values for the area below the line.
    NrT   rW   rX   )rY   rZ   r[   r\   r2   r   r   gradienty_interceptr   r   rk   r   above_fill_propsr   above_hatch_propsbelow_fill_propsbelow_hatch_propsr   above_fill_colorabove_fill_alphabelow_fill_colorbelow_fill_alphary   rz   s   @r8   r(   r(   X  sx        * * * * * * x % 	 	 	H (5 ( 	 	 	K  0 	 	 	J ww F 	 	 	   0 H 	 	 	 ww F 	 	 	   0 H 	 	 	  x---x,,,x---x,,,r:   r(   c                       e Zd ZdZd fdZ eed          Z ee	dd	          Z
 eed
d	          Z edd	          Z eed          Z eedd          Z ed          Z ed          Z xZS )r)   z Render a horizontal or vertical line span.

    See :ref:`ug_basic_annotations_spans` for information on plotting spans.

    r,   r-   c                :     t                      j        |i | d S r/   r0   r3   s      r8   r2   zSpan.__init__  r9   r:   z8
    The location of the span, along ``dimension``.
    rF   rE   ze
    The unit type for the location attribute. Interpreted as "data space"
    units by default.
    r;   widthz
    The direction of the span can be specified by setting this property
    to "height" (``y`` direction) or "width" (``x`` direction).
    Fz
    Allows to interactively modify the geometry of this span.

    .. note::
        This property is experimental and may change at any point.
    z)
    The {prop} values for the span.
    rP   z<
    The {prop} values for the span when hovering over.
    rQ   NrT   rU   rX   )rY   rZ   r[   r\   r2   r   r	   locationr
   r   location_unitsr   r   r   rg   r   r   rk   rn   r   ru   rv   ry   rz   s   @r8   r)   r)     s*        * * * * * * x . 	 	 	H T/6 A 	 	 	N
 Y 7 	 	 	I
 tE ) 	 	 	H  0 	 	 	J ww F 	 	 	  x---x,,,r:   r)   c                      e Zd ZdZd fdZ e ed          edd          Z e	 e
e           eed	
          d          Z e ed          edd          Z e	 e
e           eed	
          d          Z e ed          edd          Z eedd          Z eed          Z ed          Z xZS )r*   z~ Render a whisker along a dimension.

    See :ref:`ug_basic_annotations_whiskers` for information on plotting whiskers.

    r,   r-   c                :     t                      j        |i | d S r/   r0   r3   s      r8   r2   zWhisker.__init__  r9   r:   r}   rE   z;
    The coordinates of the lower end of the whiskers.
    r~   
   )sizez$
    Instance of ``ArrowHead``.
    r;   r   z;
    The coordinates of the upper end of the whiskers.
    r   r   r   z
    The direction of the whisker can be specified by setting this property
    to "height" (``y`` direction) or "width" (``x`` direction).
    z1
    The {prop} values for the whisker body.
    rF   underlayrT   rX   )rY   rZ   r[   r\   r2   r   r   r   r}   r   r   r#   r   r$   
lower_headr   
upper_headr   r
   r   r   r   r   rk   r   levelry   rz   s   @r8   r*   r*     s        * * * * * * IeeGnnX^ f 	 	 	E ((9--wUW7X7X7X ` 	 	 	J IeeGnnX^ f 	 	 	E ((9--wUW7X7X7X ` 	 	 	J 9UU6]]V\ d 	 	 	D Y 8 	 	 	I
  * 	 	 	J HZ(((EEEEEr:   r*   )5r\   
__future__r   logging	getLoggerrY   logmathr   
core.enumsr   r   core.propertiesr   r	   r
   r   r   r   r   r   r   r   r   r   r   core.property_aliasesr   core.property_mixinsr   r   r   r   common.propertiesr   coordinatesr   r   r   r   
annotationr!   r"   arrowsr#   r$   __all__r&   r%   r'   r(   r)   r*    r:   r8   <module>r      s    # " " " " " g!!       5 4 4 4 4 4 4 4                              2 1 1 1 1 1            + * * * * *            3 2 2 2 2 2 2 2 & & & & & & & &S- S- S- S- S-J S- S- S-j*- *- *- *- *-> *- *- *-ZG- G- G- G- G-Z G- G- G-R+- +- +- +- +-J +- +- +-Z)- )- )- )- )-: )- )- )-V() () () () ()n () () () () ()r:   