+
    nDj$L                       R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
t
^ RI
HtHt ^RIHtHt ]'       d   ^ RIHt ^ RIHtHt ^ RIt^ RIt^R	IHt ^ R
IHt ^ RIHt ^RIHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t) ^RI*H+t+H,t, . ROt-Rt. ^ RI/H0t1H2t3 ^ RI4H5t6H7t8 R R lt:]! ];4      Px                  R,          P{                  4       t>R R lt?Rs@RsA]	R,          tB]	R,          tCR R ltD ! R R4      t7R#   ]9 d    Rt. Lfi ; i) z7Helper functions for converting streams to inline html.)annotationsN)Path)TYPE_CHECKINGLiteral)RecordBatchipc)to_nanosto_nanos_since_epoch)Callable)datetime	timedelta)BlueprintLike)bindings)RerunMissingDependencyError)ContainerSelectionItemEntitySelectionItem
PauseEvent	PlayEventRecordingOpenEventSelectionChangeEventSelectionItemTimelineChangeEventTimeUpdateEventViewerEventViewSelectionItem_viewer_event_from_json_str)RecordingStreamget_data_recordingViewerT)HTMLVBox)ErrorWidgetr   Fc                   V ^8  d   QhRR/#    returnNone )formats   "R/data/cameron/venvs/s3viz/lib/python3.14/site-packages/rerun_sdk/rerun/notebook.py__annotate__r*   D   s      $     c                     ^ RI p V P                  4       ;_uu_ 4       pV! ^4       RRR4       R#   + '       g   i     R# ; i)zTPump the Jupyter event loop so pending widget updates are delivered to the frontend.N)jupyter_ui_poll	ui_events)r-   polls     r)   _flush_ui_eventsr0   D   s,    		"	"	$	$Q 
%	$	$	$s	   	0A	z_loading_widget.cssc                    V ^8  d   QhRRRR/# )r$   table_idstrr%   r'   )r(   s   "r)   r*   r*   Q   s      3 3 r+   c                D    R\          R\        P                  ! V 4       R2# )zKBuild the HTML fragment shown in the loading widget for the given table id.z<style>zy</style><div class="rerun-notebook-loading"><div class="rerun-notebook-loading__spinner"></div><div>Loading table &ldquo;z&rdquo;&hellip;</div></div>)_LOADING_CSShtmlescape)r2   s   &r)   _render_loading_htmlr8   Q   s0     ,  % &*[[%:$; <	r+   i  i  c               $    V ^8  d   QhRRRRRR/# )r$   width
int | Noneheightr%   r&   r'   )r(   s   "r)   r*   r*   c   s!     ! !z !: !$ !r+   c                "    V e   V s Ve   VsR# R# )z
Set the default size for the viewer.

This will be used for any viewers created after this call.

Parameters
----------
width:
    The width of the viewer in pixels.
height:
    The height of the viewer in pixels.

N)_default_width_default_height)r:   r<   s   $$r)   set_default_sizer@   c   s        r+   c                  .   ] tR t^ytRtRRRRRRRRRRRRR	R/R
 R lltR5R R lltR R ltRRRR/R R lltR R lt	R6R R llt
R R ltR R ltRRRRRRR R/R! R" lltR# R$ ltR% R& ltR' R( ltR)RR*RR+RR,RR-R/R. R/ lltR0 R1 ltR2 R3 ltR4tR# )7r   zi
A viewer embeddable in a notebook.

This viewer is a wrapper around the `rerun_notebook.Viewer` widget.
r:   Nr<   url	blueprint	recordinguse_global_recordingthemec               8    V ^8  d   QhRRRRRRRRRR	R
RRRRR/# )r$   r:   zint | Literal['auto'] | Noner<   rB   
str | NonerC   BlueprintLike | NonerD   RecordingStream | NonerE   zbool | NonerF   z)Literal['dark', 'light', 'system'] | Noner%   r&   r'   )r(   s   "r)   r*   Viewer.__annotate__   sf     m m ,m -	m
 m (m *m *m 9m 
mr+   c                 a  \         '       g   \        RR4      h\        4       S n        \	        RR7      S n        Rp\        P                  P                  RR4      p	RpV	f&   \        P                  ! 4       pVe   VP                  p	\        Ve   TM\        Ve   TM\        VV	VR7      S n        Ve1   S P                  P!                  VP                  VP"                  4       . S n        R V 3R	 llp
S P                  P'                  V
4       Vf   VRJ pV'       d   \)        V4      pVe1   \        P*                  ! VP-                  4       S P.                  R
7       Ve#   Ve   VP1                  V4       R# \3        R4      hR# )a  
Create a new Rerun viewer widget for use in a notebook.

Any data logged to the recording after initialization will be sent directly to the viewer.

This widget can be displayed by returning it at the end of your cells execution, or immediately
by calling [`rerun.notebook.Viewer.display`][].

Parameters
----------
width:
    The width of the viewer in pixels, or "auto".

    When set to "auto", scales to 100% of the notebook cell's width.
height:
    The height of the viewer in pixels, or "auto".

    When set to "auto", scales using a 16:9 aspect ratio with `width`.
url:
    Optional URL passed to the viewer for displaying its contents.
recording:
    Specifies the [`rerun.RecordingStream`][] to use.
    If left unspecified, defaults to the current active data recording, if there is one.
    See also: [`rerun.init`][], [`rerun.set_global_data_recording`][].
blueprint:
    A blueprint object to send to the viewer.
    It will be made active and set as the default blueprint in the recording.

    Setting this is equivalent to calling [`rerun.send_blueprint`][] before initializing the viewer.
use_global_recording:
    If no explicit `recording` is provided, the Viewer uses the thread-local/global recording created by `rr.init`
    or set explicitly via `rr.set_thread_local_data_recording`/`rr.set_global_data_recording`.

    Settings this to `False` causes the Viewer to not pick up the global recording.

    Defaults to `False` if `url` is provided, and `True` otherwise.
theme:
    The color theme to use. Either "dark", "light", or "system".

    If not set, the viewer uses the previously persisted theme preference or defaults to "system".

zrerun-notebooknotebook )valueNREDAP_TOKEN)r:   r<   rB   fallback_tokenrF   c                    V ^8  d   QhRRRR/# )r$   json_strr3   r%   r&   r'   )r(   s   "r)   r*   %Viewer.__init__.<locals>.__annotate__   s     	 	3 	4 	r+   c                T   < \        V 4      pSP                   F  pV! V4       K  	  R # N)r   _event_callbacks)rS   evtcallbackselfs   &  r)   on_raw_event%Viewer.__init__.<locals>.on_raw_event   s$    -h7C 11 2r+   rD   rY   zWCan only set a blueprint if there's either an active recording or a recording passed in)HAS_NOTEBOOKr   _ErrorWidget_error_widget_HTML_loading_widgetosenvirongetr   get_credentialsaccess_token_Viewerr>   r?   _viewerset_credentials
user_emailrW   _on_raw_eventr   set_callback_sink	to_native_flush_hooksend_blueprint
ValueError)rZ   r:   r<   rB   rC   rD   rE   rF   credentialsrQ   r[   s   f$$$$$$$   r)   __init__Viewer.__init__   sh   j |-.>
KK)^$2 t<!"224K&!,!9!9 ,%.#/6_)
 "LL(()A)A;CYCYZ FH	 	
 	""<0  '#&$; *95I &&#--/))
  $((3 m 	 !r+   c               $    V ^8  d   QhRRRRRR/# )r$   rD   rJ   rC   rI   r%   r&   r'   )r(   s   "r)   r*   rK      s(     %0 %0)%0 (%0 
	%0r+   c                    \        V4      pVf   \        R4      h\        P                  ! VP	                  4       V P
                  R7       Ve   VP                  V4       R# R# )a;  
Adds a recording to the viewer.

If no recording is specified, the current active recording will be used.

NOTE: By default all calls to `rr.init()` will re-use the same recording_id, meaning
that your recordings will be merged together. If you want to keep them separate, you
should call `rr.init("my_app_id", recording_id=uuid.uuid4())`.

Parameters
----------
recording:
    Specifies the [`rerun.RecordingStream`][] to use.
    If left unspecified, defaults to the current active data recording, if there is one.
    See also: [`rerun.init`][], [`rerun.set_global_data_recording`][].
blueprint:
    A blueprint object to send to the viewer.
    It will be made active and set as the default blueprint in the recording.

    Setting this is equivalent to calling [`rerun.send_blueprint`][] before initializing the viewer.

Nz4No recording specified and no active recording foundr]   )r   rq   r   rm   rn   ro   rp   )rZ   rD   rC   s   &&&r)   add_recordingViewer.add_recording   s^    6 'y1	STT""))+%%	

  $$Y/ !r+   c               $    V ^8  d   QhRRRRRR/# )r$   record_batchr   r2   r3   r%   r'   )r(   s   "r)   r*   rK     s&     L L+ L L Lr+   c                	    VP                   pVP                  R V/4      p\        P                  ! VP                  VR7      # )s
   __table_id)schema)r|   with_metadatar   from_arrayscolumns)rZ   rz   r2   r|   s   &&& r)   _add_table_idViewer._add_table_id  s=    $$%%}h&?@ &&|';';FKKr+   make_activeTmake_defaultc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r$   application_idr3   rC   r   r   boolr   r%   r&   r'   )r(   s   "r)   r*   rK     s4     (
 (
!(
.;(
MQ(
hl(
	(
r+   c          	     .   VP                  4       p\        P                  ! \        P                  ! VRRRR7      4      pVP                  R^ R7       VP                  V4       \        P                  ! V P                  VVVP                  4       R7       R# )a  
Set the blueprint for the given application.

Parameters
----------
application_id:
    The ID of the application to set the blueprint for.
blueprint:
    The blueprint to set for the application.
make_active:
    Whether to make the blueprint active.
    If `True`, the blueprint will be set as the active blueprint for the application.
make_default:
    Whether to make the blueprint the default blueprint for the application.
    If `True`, the blueprint will be set as the default blueprint for the application.

FT)r   r   make_thread_defaultdefault_enabledrC   )sequence)rY   r   r   blueprint_streamN)
to_blueprintr   _from_nativer   new_blueprintset_time_log_to_streamset_callback_sink_blueprintro   rn   )rZ   r   rC   r   r   r   s   &&&$$ r)   set_application_blueprint Viewer.set_application_blueprint  s    * **,	*77""-"$) $	
 	!!+!:  !12,,%%#%-779		
r+   c               $    V ^8  d   QhRRRRRR/# )r$   idr3   tablez6RecordBatch | list[RecordBatch] | datafusion.DataFramer%   r&   r'   )r(   s   "r)   r*   rK   H  s)     ", ",", F", 
	",r+   c                   ^ RI Hp \        V4      V P                  n        \        4         V! V4      pV P                  WA4      p\        P                  ! 4       p\        P                  ! WeP                  4      pVP                  V4       VP                  4        VP                  4       P                  4       pV P                   P#                  V4       RV P                  n        R#   RT P                  n        i ; i)a2  
Sends a table in the form of a dataframe to the viewer.

Parameters
----------
id:
    The name that uniquely identifies the table in the viewer.
    This name will also be shown in the recording panel.
table:
    The table data as an Arrow RecordBatch, list of RecordBatches, or a datafusion DataFrame.

)to_record_batchrN   N)rerun._arrowr   r8   rb   rO   r0   r   pyarrowBufferOutputStreamr   
new_streamr|   write_batchclosegetvalue
to_pybytesri   
send_table)	rZ   r   r   r   rz   	new_tablesinkwritertable_as_bytess	   &&&      r)   r   Viewer.send_tableH  s    " 	1%9"%=" 	
	,*51L**<<I--/D^^D*:*:;Fy)LLN!]]_779NLL##N3)+D  &D  &s   B(C' 'C:Fc                    V ^8  d   QhRRRR/# )r$   block_until_readyr   r%   r&   r'   )r(   s   "r)   r*   rK   l  s     - - -$ -r+   c                    ^ RI Hp V! V P                  4       V! \        V P                  V P
                  .4      4       V'       d   V P
                  P                  4        R# R# )aD  
Display the viewer in the notebook cell immediately.

Parameters
----------
block_until_ready:
    Whether to block until the viewer is ready to receive data. If this is `False`, the viewer
    will still be displayed, but logged data will likely be queued until the viewer becomes ready
    at the end of cell execution.

displayN)IPython.displayr   r`   _VBoxrb   ri   r   )rZ   r   r   s   && r)   r   Viewer.displayl  sK     	,""# 	t++T\\:;<LL**, r+   c                   V ^8  d   QhRR/# r#   r'   )r(   s   "r)   r*   rK     s      4 r+   c                	&    V P                  4        R # rV   r   )rZ   s   &r)   _ipython_display_Viewer._ipython_display_  s    r+   c                    V ^8  d   QhRRRR/# )r$   databytesr%   r&   r'   )r(   s   "r)   r*   rK     s     $ $ $$ $r+   c                	<    V P                   P                  V4       R # rV   )ri   send_rrd)rZ   r   s   &&r)   ro   Viewer._flush_hook  s    d#r+   top	selectiontimec          
     ,    V ^8  d   QhRRRRRRRRRR/# )r$   r   z'_PanelState | Literal['default'] | NonerC   r   r   r%   r&   r'   )r(   s   "r)   r*   rK     s>     17 17 517 ;	17
 ;17 617 
17r+   c                   / pV'       d   WR&   V'       d   W%R&   V'       d   W5R&   V'       d   WER&   V P                   P                  V4       R# )a  
Partially update the state of panels in the viewer.

Valid states are the strings `expanded`, `collapsed`, `hidden`, `default`, and the value `None`.

Panels set to:
- `None` will be unchanged.
- `expanded` will be fully expanded, taking up the most space.
- `collapsed` will be smaller and simpler, omitting some information.
- `hidden` will be completely invisible, taking up no space.
- `default` will be reset to the default state.

The `collapsed` state is the same as the `hidden` state for panels
which do not support the `collapsed` state.

Setting the panel state using this function will also prevent the user
from modifying that panel's state in the viewer.

Parameters
----------
top: str
    State of the top panel of the viewer.
blueprint: str
    State of the blueprint panel, positioned on the left side of the viewer.
selection: str
    State of the selection panel, positioned on the right side of the viewer.
time: str
    State of the time panel, positioned on the bottom side of the viewer.

r   rC   r   r   N)ri   update_panel_states)rZ   r   rC   r   r   panel_statess   &$$$$ r)   update_panelsViewer.update_panels  sJ    N HJ"%(1%(1%#' ((6r+   c                    V ^8  d   QhRRRR/# )r$   recording_idr3   r%   r&   r'   )r(   s   "r)   r*   rK     s      8 8 8 
	8r+   c               <    V P                   P                  V4       R# )a,  
Set the active recording for the viewer.

This is equivalent to clicking on the given recording in the blueprint panel.

Parameters
----------
recording_id: str
    The ID of the recording to set the viewer to.

    Using this requires setting an explicit recording ID when creating the recording.

N)ri   set_active_recording)rZ   r   s   &$r)   r   Viewer.set_active_recording  s    & 	)),7r+   c                    V ^8  d   QhRRRR/# r$   rB   r3   r%   r&   r'   )r(   s   "r)   r*   rK     s     # ## 
#r+   c                <    V P                   P                  V4       R# )zy
Open a URL in the viewer.

Parameters
----------
url: str
    The URL to open.

    Must point to a valid data source.

N)ri   open_urlrZ   rB   s   &&r)   r   Viewer.open_url  s      	c"r+   c                    V ^8  d   QhRRRR/# r   r'   )r(   s   "r)   r*   rK     s     $ $$ 
$r+   c                <    V P                   P                  V4       R# )z
Close an open URL in the viewer.

Does nothing if the URL is not open.

Parameters
----------
url: str
    The URL to close.

N)ri   	close_urlr   s   &&r)   r   Viewer.close_url  s      	s#r+   r   duration	timestamptimelineplayc               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r$   r   r;   r   z/int | float | timedelta | np.timedelta64 | Noner   z-int | float | datetime | np.datetime64 | Noner   rH   r   r   r%   r&   r'   )r(   s   "r)   r*   rK     sJ     /9 /9 /9 B	/9
 A/9 /9 /9 
/9r+   c                   \        R WV3 4       4      ^8  d   \        RV R24      hVe   TpM"Ve   \        V4      pMVe   \        V4      pMRpV P                  P                  WFV4       R# )a  
Set the time control for the viewer.

You are expected to set at most ONE of the arguments `sequence`, `duration`, or `timestamp`.

Parameters
----------
sequence:
    Used for sequential indices, like `frame_nr`.
    Must be an integer.
duration:
    Used for relative times, like `time_since_start`.
    Must either be in seconds, a [`datetime.timedelta`][], or [`numpy.timedelta64`][].
    For nanosecond precision, use `numpy.timedelta64(nanoseconds, 'ns')`.
timestamp:
    Used for absolute time indices, like `capture_time`.
    Must either be in seconds since Unix epoch, a [`datetime.datetime`][], or [`numpy.datetime64`][].
    For nanosecond precision, use `numpy.datetime64(nanoseconds, 'ns')`.
play:
    Whether to start playing from the specified time point. Defaults to paused.
timeline:
    The name of the timeline to switch to. If not provided, time will remain on the current timeline.

c              3  (   "   T F  qR Jx  K
  	  R # 5irV   r'   ).0xs   & r)   	<genexpr>'Viewer.set_time_ctrl.<locals>.<genexpr>  s     F&E}&Es   z]set_time_ctrl: Exactly one of `sequence`, `duration`, and `timestamp` must be set (timeline='z')N)sumrq   r   r	   ri   set_time_ctrl)rZ   r   r   r   r   r   r   s   &$$$$$ r)   r   Viewer.set_time_ctrl  s    B Fx9&EFFJopxoyy{|  D!H%D"'	2DD""848r+   c                    V ^8  d   QhRRRR/# )r$   rY   zCallable[[ViewerEvent], None]r%   r&   r'   )r(   s   "r)   r*   rK   '  s     / /!> /4 /r+   c                <    V P                   P                  V4       R# )a\  
Register a callback to be called when a viewer event occurs.

The callback will receive a [`ViewerEvent`][rerun.notebook.ViewerEvent], which is one of:
[`PlayEvent`][rerun.notebook.PlayEvent], [`PauseEvent`][rerun.notebook.PauseEvent],
[`TimeUpdateEvent`][rerun.notebook.TimeUpdateEvent], [`TimelineChangeEvent`][rerun.notebook.TimelineChangeEvent],
[`SelectionChangeEvent`][rerun.notebook.SelectionChangeEvent], or [`RecordingOpenEvent`][rerun.notebook.RecordingOpenEvent].

Parameters
----------
callback:
    A function that takes a [`ViewerEvent`][rerun.notebook.ViewerEvent] as its only argument.

N)rW   append)rZ   rY   s   &&r)   on_eventViewer.on_event'  s     	$$X.r+   c               $    V ^8  d   QhRRRRRR/# )r$   rg   r3   emailr%   r&   r'   )r(   s   "r)   r*   rK   8  s!     : :C : : :r+   c                	<    V P                   P                  W4       R # rV   )ri   rj   )rZ   rg   r   s   &&&r)   rj   Viewer.set_credentials8  s    $$\9r+   )r`   rW   rb   ri   )NN)F)__name__
__module____qualname____firstlineno____doc__rs   rw   r   r   r   r   r   ro   r   r   r   r   r   r   rj   __static_attributes__r'   r+   r)   r   r   y   s   m /3m 04	m
 m +/m -1m -1m <@m^%0NL(
TX(
os(
T",H-0$17 8<17 >B	17
 >B17 9=17f8*#$$$/9  $/9 EI	/9
 DH/9  $/9 /9b/": :r+   )r   r   r   r   r   r   r   r   r   r   r   r   r@   )r   rC   r   r   )expanded	collapsedhidden)Er   
__future__r   r6   rc   pathlibr   typingr   r   r   r   r   r   r   r	   collections.abcr
   r   r   
datafusionnumpynprC   r   rerunr   rerun.error_utilsr   _eventr   r   r   r   r   r   r   r   r   r   r   r   recording_streamr   r   __all__r^   
ipywidgetsr   ra   r    r   rerun_notebookr!   r_   r   rh   ModuleNotFoundErrorr0   __file__parent	read_textr5   r8   r>   r?   _Panel_PanelStater@   r'   r+   r)   <module>r     s    = "  	  )  $ 0(,(  9    B  7M
 X%%(==HHJ 	8	978!,@: @:s  Ls   C9 9	DD