
    hje                    v    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
 dZ G d d	e
          ZdS )
z Provide a Request handler that lists the application (if more than one)
or (if only one) redirects to the route of that applications.

    )annotationsN)authenticated   )AuthRequestHandler)RootHandlerc                  .    e Zd ZdZd Zed             ZdS )r   z Implements a custom Tornado handler to display the available applications
    If only one application it redirects to that application route
    c                n    |d         | _         |d         | _        |d         | _        |d         | _        d S )Napplicationsprefixindexuse_redirect)r
   r   r   r   )selfargskws      ?lib/python3.11/site-packages/bokeh/server/views/root_handler.py
initializezRootHandler.initialize3   s8    ~.l[
~.    c                  K   | j         dn| j         }| j        r`t          | j                  dk    rHt	          | j                                                  }||d         z   }|                     |           d S | j        dn| j        }|                     ||t          | j                                                             d S )N r   r   zapp_index.html)r   items)
r   r   lenr
   listkeysredirectr   rendersorted)r   r   kwargsr   	app_namesredirect_tor   s          r   getzRootHandler.get9   s      {* 	VT%6!7!71!<!<T.335566I 9Q</KMM+&&&&&(,
(:$$
EKKfF4;L;Q;Q;S;S4T4TKUUUUUr   N)__name__
__module____qualname____doc__r   r   r     r   r   r   r   .   sM         / / / V V ]V V Vr   r   )r$   
__future__r   logging	getLoggerr!   logtornado.webr   auth_request_handlerr   __all__r   r%   r   r   <module>r-      s     # " " " " " g!! & % % % % % 5 4 4 4 4 4V V V V V$ V V V V Vr   