+
     ]i@  c                   sV   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
HtHt ^ RIHt ^ RIHt ^ RIHtHtHt ^RIHtHtHt ^R	IHtHt R
 tRRRRRRRRRRRRRR/t ! R R]4      t ! R R]4      t ! R R]4      t ! R R4      t ]PB                   ! R R ]4      4       t"R# )!z,Interactive figures in the IPython notebook.)	b64encodeN)Comm)display
JavascriptHTML)is_interactiveGcf)_Backend
CloseEventNavigationToolbar2)FigureCanvasWebAggCoreFigureManagerWebAggNavigationToolbar2WebAgg)TimerTornadoTimerAsyncioc                 s   \         P                  ! 4        U u. uFY  p RP                  V P                  P                  P                  4       ;'       g    RV P                   2V P                  R7      NK[  	  pp \        4       '       g,   VP                  R\        \         P                  4       24       RP                  V4      # u up i )z
Return a string showing the figure and connection status for the backend.

This is intended as a diagnostic tool, and not for general use.
z{fig} - {socket}zFigure )ZfigsocketzFigures pending show: Z
)r   Zget_all_fig_managersZformatcanvasfigureZ	get_labelnumweb_socketsr   ZappendlenfigsZjoin)managerZresults     H/usr/lib64/python3.14/site-packages/matplotlib/backends/backend_nbagg.pyconnection_infor      s     //1
 2G	 	!!&&002 , ,gkk]+&& 	" 	( 2   .s388}o>?99Vs   :C$CZhomez
fa fa-homeZbackzfa fa-arrow-leftZforwardzfa fa-arrow-rightZzoom_to_rectzfa fa-square-oZmovezfa fa-arrowsdownloadzfa fa-floppy-oc            
       s    ] tR t^5t]P
                  R,            U UUUu. uF#  w  rr#V\        9   g   K  W\        V,          V3NK%  	  upppp tRtR# u upppp i )NavigationIPy N))ZDownloadzDownload plotr   r   )__name__
__module____qualname____firstlineno__r
   Z	toolitems_FONT_AWESOME_CLASSES__static_attributes__)ZtextZtooltip_textZ
image_fileZname_of_methods   0000r   r   r   5   sa     (11MN9N DT "77E$'
3^EN9I 9s
   A
A
r   c                   s   a a ] tR t^@t o];ttV 3R lt]R 4       t	R t
R tR t]R 4       t]RV 3R ll4       tR tR	 tR
 tR tRtVtV ;t# )FigureManagerNbAggc                s4   < R V n         \        SV `	  W4       R# )FN)_shownsuper__init__)selfr   r   	__class__s   &&&r   r&   ZFigureManagerNbAgg.__init__C   s    %    c                s   aaa V! V4      oV ! SV4      o\        4       '       d!   SP                  4        SP                  4        VVV3R  lpSP                  RV4      oS# )c                 sV   < SP                  S4       \        P                  ! S4       R # N)mpl_disconnectr   destroy)Zeventr   cidr   s   &r   r,   Z6FigureManagerNbAgg.create_with_canvas.<locals>.destroyO   s    !!#&KK r)   close_event)r   show	draw_idleZmpl_connect)clsZcanvas_classr   r   r,   r   r-   r   s   &&&& @@@r   create_with_canvasZ%FigureManagerNbAgg.create_with_canvasG   sU    f%fc"LLN	!   8r)   c                sR    \        \        \        P                  4       4      4       R # r*   )r   r   r#   get_javascriptr'      &r   
display_jsZFigureManagerNbAgg.display_jsV   s     	
-<<>?@r)   c                s   V P                   '       g"   V P                  4        V P                  4        MV P                  P	                  4        R V n         \        V R4      '       d&   V P                  P                  V P                  4       \        4       '       g/   ^ RI	H
p VP                  P                  V P                  R4       R# R# )T_cidgcfr   N)r$   r6   _create_commr   r0   Zhasattrr+   r7   r   matplotlib._pylab_helpersr   r   Zpopr   )r'   r      & r   r/   ZFigureManagerNbAgg.show\   s    {{{OOKK!!#
 4##KK&&t||45HHLL4(  r)   c                s4    RV n         V P                  4        R# )z:
A special method to re-show the figure in the notebook.

FN)r$   r/   r4   r5   r   reshowZFigureManagerNbAgg.reshowm   s    
 		r)   c                s,    \        V P                  4      # r*   )Zboolr   r4   r5   r   	connectedZFigureManagerNbAgg.connectedu   s    D$$%%r)   c                s  < Vf   \         P                  ! 4       pMTp\        SV `  VR7       VP	                  \
        P                  ! \        4      P                  R,          P                  RR7      4       Vf   VP                  4       # R # )N)streamzweb_backend/js/nbagg_mpl.jszutf-8)Zencoding)ioZStringIOr%   r3   ZwritepathlibZPathZ__file__ZparentZ	read_textZgetvalue)r1   r=   Zoutputr(   s   && r   r3   Z!FigureManagerNbAgg.get_javascripty   sr    >[[]FFf-gll8,3356ii1	3 >??$$ r)   c                s>    \        V 4      pV P                  V4       V# r*   )
CommSocketZadd_web_socketr'   commr:   r   r8   ZFigureManagerNbAgg._create_comm   s    $D!r)   c                s    V P                  R 4       \        V P                  4       F  pVP                  4        K  	  V P	                  4        R# )closeN)Z_send_eventZlistr   on_closeclearup_closedrA   r:   r   r,   ZFigureManagerNbAgg.destroy   s:    !))*DMMO +r)   c                s   V P                    Uu0 uF  pVP                  4       '       g   K  VkK  	  upV n         \        V P                   4      ^ 8X  d'   \        RV P                  4      P                  4        R# R# u upi )zClear up any closed Comms.r.   N)r   is_openr   r	   r   Z_process)r'   r   r:   r   rE   Z!FigureManagerNbAgg.clearup_closed   sj    151A1A 11Av%~~/ #F1A 1 t A%}dkk2;;= &1s
   A<A<c                s    V P                    Uu0 uF"  pVP                  P                  V8w  g   K   VkK$  	  upV n         R # u upi r*   )r   rB   comm_id)r'   rG   r   s   && r   remove_commZFigureManagerNbAgg.remove_comm   sA    151A1A ?1Av%{{22g= #F1A ? ?s
   AA)r$   r   r*   )r   r   r   r    r   Z_toolbar2_classZ
ToolbarClsr&   Zclassmethodr2   r6   r/   r;   Zpropertyr<   r3   r8   r,   rE   rH   r"   __classdictcell__Z__classcell__)r(   __classdict__s   @@r   r#   r#   @   sy     #00Oj&  A)" & & 
% 
%
>? ?r)   r#   c                   s    ] tR t^t]tRtR# )FigureCanvasNbAggr   N)r   r   r   r    r#   Zmanager_classr"   r   r)   r   rK   rK      s    &Mr)   rK   c                   sH   a  ] tR t^t o RtR tR tR tR tR t	R t
RtV tR	# )
r@   a4  
Manages the Comm connection between IPython and the browser (client).

Comms are 2 way, with the CommSocket being able to publish a message
via the send_json method, and handle a message with on_message. On the
JS side figure.send_message and figure.ws.onmessage do the sending and
receiving respectively.

c                s  a a R S n         SS n        \        \        P                  ! 4       4      S n        \        \        RS P                  ,          4      4        \        RRS P                  /R7      S n        S P                  P                  S P                  4       S P                  oRS n        TT 3R lpS P                  P                  T4       R #   \         d   p\        R4      ThR p?ii ; i)Nz<div id=%r></div>
matplotlibZid)datazTUnable to create an IPython notebook Comm instance. Are you in the IPython notebook?Fc                 st   < R Sn         SP                  V R,          R,          4       SP                  4        R# )TcontentrG   N)
_ext_closerH   rE   )Zclose_messager   r'   s   &r   	_on_closeZ&CommSocket.__init__.<locals>._on_close   s.    "DOi 8 CD""$r)   )supports_binaryr   ZstruuidZuuid4r   r   r   rB   ZAttributeErrorZRuntimeErrorZon_msg
on_messagerO   rD   )r'   r   ZerrrP   s   ff  r   r&   ZCommSocket.__init__   s    #

%	 	(499456	5\tyy0ABDI
 			),,	%
 			9%  	5  + ,145	5s   C C0C++C0c                s`    V P                   ;'       g    V P                  P                  '       * # r*   )rO   rB   Z_closedr4   r5   r   rF   ZCommSocket.is_open   s!    OO88tyy'8'899r)   c                s    V P                  4       '       d    V P                  P                  4        R # R #   \         d     R # i ; ir*   )rF   rB   rC   ZKeyErrorr4   r5   r   rD   ZCommSocket.on_close   s;     <<>>		!   s   6 AAc                sh    V P                   P                  R \        P                  ! V4      /4       R# )rM   N)rB   sendjsonZdumps)r'   rN      &&r   	send_jsonZCommSocket.send_json   s     		

7 345r)   c                s    V P                   '       d#   V P                  P                  R R/V.R7       R# \        V4      P	                  R4      pRV 2pV P                  P                  RV/4       R# )blobz	image/png)ZbuffersZasciizdata:image/png;base64,rM   N)rQ   rB   rT   r    Zdecode)r'   rX   rM   Zdata_uris   &&  r   send_binaryZCommSocket.send_binary   s`    IINNFK04&NA T?))'2D/v6HIINNFH-.r)   c                s4   \         P                  ! VR ,          R,          4      pVR,          R8X  d-   V P                  4        V P                  P	                  4        R# VR,          R8X  d   VR,          V n        R# V P                  P                  V4       R# )rN   rM   ZtypeZclosingrQ   ZvalueN)rU   ZloadsrD   r   rE   rQ   Zhandle_json)r'   ZmessagerV   r   rS   ZCommSocket.on_message   sm     **WY/786?i'MMOLL'')V_ 11#*7#3D LL$$W-r)   )rO   rB   r   rQ   rR   N)r   r   r   r    __doc__r&   rF   rD   rW   rY   rS   r"   rI   )rJ   s   @r   r@   r@      s-     &2:6/. .r)   r@   c                   s    ] tR t^t]t]tRtR# )_BackendNbAggr   N)	r   r   r   r    rK   ZFigureCanvasr#   ZFigureManagerr"   r   r)   r   r[   r[      s    $L&Mr)   r[   )#rZ   Zbase64r    r>   rU   r?   rR   Zipykernel.commr   ZIPython.displayr   r   r   rL   r   r9   r   Zmatplotlib.backend_basesr   r	   r
   Zbackend_webagg_corer   r   r   r   r   r   r!   r   r#   rK   r@   Zexportr[   r   r)   r   <module>r\      s    2
  	     5 5 % ) M MK K & L
"$
N $ 9, 9\?, \?~'. 'J. J.Z 
'H ' 'r)   