Ë
    :vžj\Z  ã                  ó  — d Z ddlmZ ddlZddlZddlZddlZddlm	Z	m
Z
 ddlmZmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZ dd	lmZ dd
lmZ ddlmZ ddl m!Z!m"Z" ddl#m$Z$ d„ Z%d„ Z& G d„ de«      Z' G d„ de(«      Z) G d„ de«      Z*y)zAn extension application.é    )ÚannotationsN)ÚEnvironmentÚFileSystemLoader)Ú
JupyterAppÚNoStart)ÚLogFormatter)ÚRedirectHandler)ÚAnyÚBoolÚDictÚ	HasTraitsÚListÚUnicodeÚdefault)ÚConfig)Ú	ServerApp)Ú_i18n)Úis_namespace_packageÚurl_path_joiné   )ÚExtensionHandlerMixinc                ó  — t        |«      dk(  ry| j                  rdt        |«      dkD  rU|d   |dd }}t        j                  d|«      r4|| j                  v r% | «       }|j	                  ||«       |j
                  S yyyy)z.Preparse command line to look for subcommands.r   Nr   z^\w(\-?\w)*$)ÚlenÚsubcommandsÚreÚmatchÚinitialize_subcommandÚsubapp)Úapplication_klassÚargvÚsubcÚsubargvÚapps        úu/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/jupyter_server/extension/application.pyÚ_preparse_for_subcommandr%      s‰   € ô ˆ4ƒy�A‚~Øð ×$Ò$¬¨T«°Qªà˜Q™  a b ˆgˆÜ�8‰8�O TÔ*¨tÐ7H×7TÑ7TÑ/Tá#Ó%ˆCØ×%Ñ% d¨GÔ4Ø—:‘:Ðð	 0UÐ*ð *7Ð$ó    c                óŠ  ‡— 	 |d|j                  d«       Št        ˆfd„dD «       «      r+ | «       }|j                  d‰v «       |j	                  d«       d‰v sd‰v r( | «       }|j                  «        |j	                  d«       d	‰v r) | «       }|j                  «        |j	                  d«       yy# t        $ r |ŠY Œªw xY w)
a@  Looks for 'help', 'version', and 'generate-config; commands
    in command line. If found, raises the help and version of
    current Application.

    This is useful for traitlets applications that have to parse
    the command line multiple times, but want to control when
    when 'help' and 'version' is raised.
    Nz--c              3  ó&   •K  — | ]  }|‰v –— Œ
 y ­w©N© )Ú.0ÚxÚinterpreted_argvs     €r$   Ú	<genexpr>z/_preparse_for_stopping_flags.<locals>.<genexpr>@   s   øè ø€ Ð
IÑ*H Qˆ1Ð Ô Ñ*Hùs   ƒ)z-hú
--help-allz--helpr/   r   z	--versionz-Vz--generate-config)ÚindexÚ
ValueErrorÚanyÚ
print_helpÚexitÚprint_versionÚwrite_default_config)r   r    r#   r-   s      @r$   Ú_preparse_for_stopping_flagsr7   -   sÍ   ø€ ð ØÐ 2 $§*¡*¨TÓ"2Ð3Ðô
 Ó
IÑ*HÓ
IÔIÙÓ!ˆØ�‰�|Ð'7Ð7Ô8Ø�‰�Œð Ð&Ñ&¨$Ð2BÑ*BÙÓ!ˆØ×ÑÔØ�‰�Œð Ð.Ñ.ÙÓ!ˆØ× Ñ Ô"Ø�‰��ð /øô! ò  ØÒð ús   ƒB4 Â4CÃCc                  ór   — e Zd ZdZ e ed«      ¬«      j                  d¬«      Zej                  d„ «       Z
y)ÚExtensionAppJinjaMixinzAUse Jinja templates for HTML templates on top of an ExtensionApp.z;Options to pass to the jinja2 environment for this
        ©ÚhelpT©Úconfigc                óˆ  — | j                  «        t        | j                  «      dkD  r4| j                  j	                  | j
                  › d�| j                  i«       t        dt        | j                  «      dgddœ| j                  ¤Ž| _	        | j                  j	                  | j
                  › d�| j                  i«       y)	z$Get templates defined in a subclass.r   Ú_template_pathszjinja2.ext.i18nT)ÚloaderÚ
extensionsÚ
autoescapeÚ_jinja2_envNr*   )
Úinitialize_templatesr   Útemplate_pathsÚsettingsÚupdateÚnamer   r   Újinja2_optionsÚ
jinja2_env©Úselfs    r$   Ú_prepare_templatesz)ExtensionAppJinjaMixin._prepare_templates\   s­   € ð 	×!Ñ!Ô#äˆt×"Ñ"Ó# aÒ'Ø�M‰M× Ñ  T§Y¡Y K¨Ð"?À×ATÑATÐ!UÔVô &ð 
Ü# D×$7Ñ$7Ó8Ø)Ð*Øñ
ð ×!Ñ!ñ	
ˆŒð 	�‰×Ñ §¡ ¨;Ð7¸¿¹ÐIÕJr&   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚtagrI   ÚtÚno_type_checkrM   r*   r&   r$   r9   r9   R   sG   „ ÙKáÙðó
ô÷
 
�c�€cÓð ð ‡_�_ñKó ñKr&   r9   c                  ó   — e Zd ZdZy)ÚJupyterServerExtensionExceptionz9Exception class for raising for Server extensions errors.N)rN   rO   rP   rQ   r*   r&   r$   rV   rV   u   s   „ ÚCr&   rV   c                  ó¸  ‡ — e Zd ZU dZdZi Zded<    ed¬«      j                  d¬«      Z	 e
d«      d	„ «       Zed
„ «       Zd Zded<   ed„ «       Zed„ «       ZdZ e«       j                  d¬«      Z e
d«      d„ «       Z ed«      Z ed«      ZegZ e«       Zded<    e
d«      d„ «       ZeZ e
d«      d„ «       Z e
d«      d„ «       Z  ed¬«      j                  d¬«      Z! e
d«      d„ «       Z" e# e«       d¬«      j                  d¬«      Z$ e# e«        e%d«      ¬«      j                  d¬«      Z& e' e%d «      ¬«      j                  d¬«      Z( e# e%d!«      ¬«      j                  d¬«      Z)d"ed#<   d$„ Z*d%„ Z+d&„ Z,d'„ Z-d(„ Z.d)„ Z/d*„ Z0d+„ Z1d,„ Z2d9d-„Z3d.„ Z4ˆ fd/„Z5d0„ Z6d1„ Z7d2„ Z8ed3„ «       Z9d4„ Z:ed5„ «       Z;eZ<ed:d6„«       Z=ed;d7„«       Z>ed<d8„«       Z?ˆ xZ@S )=ÚExtensionAppaà  Base class for configurable Jupyter Server Extension Applications.

    ExtensionApp subclasses can be initialized two ways:

    - Extension is listed as a jpserver_extension, and ServerApp calls
      its load_jupyter_server_extension classmethod. This is the
      classic way of loading a server extension.

    - Extension is launched directly by calling its `launch_instance`
      class method. This method can be set as a entry_point in
      the extensions setup.py.
    Tzdict[str, t.Any]Úserverapp_configa  Whether to open in a browser after starting.
        The specific browser used is platform dependent and
        determined by the python standard library `webbrowser`
        module, unless it is overridden using the --browser
        (ServerApp.browser) configuration option.
        r:   r<   Úopen_browserc                óp   — | j                   €J ‚| j                   j                  d   j                  dd«      S )Nr   rZ   T)Ú	serverappr=   ÚgetrK   s    r$   Ú_default_open_browserz"ExtensionApp._default_open_browser¢   s4   € à�~‰~Ð)Ð)Ð)Ø�~‰~×$Ñ$ [Ñ1×5Ñ5°nÀdÓKÐKr&   c                óJ   — | j                   €J ‚| j                   j                  S )z4Look on the same path as our parent for config files)r\   Úconfig_file_pathsrK   s    r$   r`   zExtensionApp.config_file_paths§   s$   € ð �~‰~Ð)Ð)Ð)Ø�~‰~×/Ñ/Ð/r&   zstr | Unicode[str, str]rH   c                ó†   — | j                   j                  d«      }t        |d   «      rdj                  |dd «      S |d   S )zGet an extension package.Ú.r   é   )rO   Úsplitr   Újoin)ÚclsÚpartss     r$   Úget_extension_packagez"ExtensionApp.get_extension_package´   sB   € ð —‘×$Ñ$ SÓ)ˆÜ  a¡Ô)à—8‘8˜E ! A˜JÓ'Ð'Ø�Q‰xˆr&   c                ó   — | j                   S )zGet an extension point.)rO   )rf   s    r$   Úget_extension_pointz ExtensionApp.get_extension_point½   s   € ð �~‰~Ðr&   Ú/Údefault_urlc                ó   — | j                   S r)   )Úextension_urlrK   s    r$   Ú_default_urlzExtensionApp._default_urlÇ   s   € à×!Ñ!Ð!r&   Ú	notebooksFzServerApp | Noner\   c                ó˜   — t        j                  «       r	 t        j                  «       S t        «       S # t        $ r Y t        «       S w xY wr)   )r   ÚinitializedÚinstanceÚ	ExceptionrK   s    r$   Ú_default_serverappzExtensionApp._default_serverappØ   sL   € ô × Ñ Ô"ðÜ ×)Ñ)Ó+Ð+ô ‹{Ðøô ò àô ‹{Ððús   –4 ´	A	ÁA	Ú	log_levelc                ó"   — t         j                  S r)   )ÚloggingÚINFOrK   s    r$   Ú_default_log_levelzExtensionApp._default_log_levelè   s   € ä�|‰|Ðr&   Ú
log_formatc                 ó   — 	 y)z2override default log format to include date & timezV%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s]%(end_color)s %(message)sr*   rK   s    r$   Ú_default_log_formatz ExtensionApp._default_log_formatì   s   € ð eð	
r&   z9Url where the static assets for the extension are served.Ústatic_url_prefixc                ó~   — d| j                   › d�}| j                  €J ‚t        | j                  j                  |«      S )Nzstatic/rk   )rH   r\   r   Úbase_url)rL   Ú
static_urls     r$   Ú_default_static_url_prefixz'ExtensionApp._default_static_url_prefix÷   s;   € à˜tŸy™y˜k¨Ð+ˆ
Ø�~‰~Ð)Ð)Ð)Ü˜TŸ^™^×4Ñ4°jÓAÐAr&   zÅpaths to search for serving static files.

        This allows adding javascript/css to be available from the notebook server machine,
        or overriding individual files in the IPython
        zpPaths to search for serving jinja templates.

        Can be used to override templates from notebook.templates.z(Settings that will passed to the server.z Handlers appended to the server.zList[tuple[t.Any, ...]]Úhandlersc                ór   — | j                   sydj                  | j                   j                  dd«      «      S )zThe default config file name.Ú zjupyter_{}_configÚ-Ú_)rH   ÚformatÚreplacerK   s    r$   Ú_config_file_name_defaultz&ExtensionApp._config_file_name_default  s.   € à�yŠyØØ"×)Ñ)¨$¯)©)×*;Ñ*;¸CÀÓ*EÓFÐFr&   c                 ó   — y)z1Override this method to add handling of settings.Nr*   rK   s    r$   Úinitialize_settingsz ExtensionApp.initialize_settings  ó   � r&   c                 ó   — y)z<Override this method to append handlers to a Jupyter Server.Nr*   rK   s    r$   Úinitialize_handlersz ExtensionApp.initialize_handlers  r�   r&   c                 ó   — y)z7Override this method to add handling of template files.Nr*   rK   s    r$   rD   z!ExtensionApp.initialize_templates!  r�   r&   c           
     óè   — | j                  «       j                  «       }t        |D �ci c]  }|t        | |«      “Œ c}«      | _        | j                  | j
                  | j                  › d�<   yc c}w )z†Builds a Config object from the extension's traits and passes
        the object to the webapp's settings as `<name>_config`.
        Ú_configN)Úclass_own_traitsÚkeysr   ÚgetattrÚextension_configrF   rH   )rL   ÚtraitsrS   s      r$   Ú_prepare_configzExtensionApp._prepare_config$  sh   € ð ×&Ñ&Ó(×-Ñ-Ó/ˆÜ &ÁVÓ'LÁVÀ¨¬7°4¸Ó+;Ñ(;ÀVÑ'LÓ MˆÔØ/3×/DÑ/Dˆ�‰˜Ÿ™˜ 7Ð+Ò,ùò (Ms   ¨A/c                ó†  — | j                   €J ‚| j                   j                  } | j                  j                  di |j                  ¤Ž | j                  j                  | j                  › d�| j
                  | j                  › | i«       | j                  «         |j                  j                  di | j                  ¤Ž y)zPrepare the settings.NÚ_static_pathsr*   )r\   Úweb_apprF   rG   rH   Ústatic_pathsrŒ   )rL   Úwebapps     r$   Ú_prepare_settingszExtensionApp._prepare_settings,  s£   € ð �~‰~Ð)Ð)Ð)Ø—‘×'Ñ'ˆØˆ�‰×ÑÑ/˜vŸ™Ò/ð 	�‰×Ñà—9‘9�+˜]Ð+¨T×->Ñ->Ø—9‘9�+ ðô	
ð 	× Ñ Ô"ð 	ˆ�‰×ÑÑ/ §¡Ó/r&   c                óh  — | j                   €J ‚| j                   j                  }| j                  «        g }| j                  D ]o  }t	        |j
                  d   |d   «      }|d   }i }t        |t        «      r| j                  |d<   	 |j                  |d   «       |||f}|j                  |«       Œq t        | j                  «      dkD  rEt	        | j                  d«      }||j
                  d   d	| j                  if}|j                  |«       |j                  d
|«       y# t        $ r Y Œ“w xY w)zPrepare the handlers.Nr€   r   r   rH   rc   z(.*)Ústatic_handler_classÚpathz.*$)r\   r›   r�   rƒ   r   rF   Ú
issubclassr   rH   rG   Ú
IndexErrorÚappendr   rœ   r~   Úadd_handlers)	rL   r�   Únew_handlersÚhandler_itemsÚpatternÚhandlerÚkwargsÚnew_handlerr�   s	            r$   Ú_prepare_handlerszExtensionApp._prepare_handlersA  s;  € à�~‰~Ð)Ð)Ð)Ø—‘×'Ñ'ˆð 	× Ñ Ô"ð ˆØ!Ÿ]œ]ˆMä# F§O¡O°JÑ$?ÀÈqÑAQÓRˆGØ# AÑ&ˆGð (*ˆFÜ˜'Ô#8Ô9Ø!%§¡��v‘ðØ—‘˜m¨AÑ.Ô/ð # G¨VÐ4ˆKØ×Ñ Õ,ð! +ô& ˆt× Ñ Ó! AÒ%ä& t×'=Ñ'=¸vÓFˆJð Ø—‘Ð 6Ñ7Ø˜×*Ñ*Ð+ðˆGð
 ×Ñ Ô(à×Ñ˜E <Õ0øô' ò Ùðús   Â	D%Ä%	D1Ä0D1c                ó¼   — t        | j                  «      dkD  r4| j                  j                  | j                  › d�| j                  i«       | j                  «        y)z=Add templates to web app settings if extension has templates.r   r?   N)r   rE   rF   rG   rH   rD   rK   s    r$   rM   zExtensionApp._prepare_templatesl  sI   € äˆt×"Ñ"Ó# aÒ'Ø�M‰M× Ñ  T§Y¡Y K¨Ð"?À×ATÑATÐ!UÔVØ×!Ñ!Õ#r&   c                óŽ   — d| j                   | j                  | j                  dœi}|d   j                  | j                  «       |S )zThe jupyter server config.r   )rl   rZ   Úfile_url_prefix)rl   rZ   r¯   rG   rY   )rL   Úbase_configs     r$   Ú_jupyter_server_configz#ExtensionApp._jupyter_server_configr  sO   € ð Ø#×/Ñ/Ø $× 1Ñ 1Ø#'×#7Ñ#7ñð
ˆð 	�KÑ ×'Ñ'¨×(=Ñ(=Ô>ØÐr&   c                ó  — || _         | j                  «        | j                  | j                   j                  «       | j	                  | j                   j
                  «       | j                   j                  | j                  «       d| _        y)aË  Link the ExtensionApp to an initialized ServerApp.

        The ServerApp is stored as an attribute and config
        is exchanged between ServerApp and `self` in case
        the command line contains traits for the ExtensionApp
        or the ExtensionApp's config files have server
        settings.

        Note, the ServerApp has not initialized the Tornado
        Web Application yet, so do not try to affect the
        `web_app` attribute.
        TN)r\   Úload_config_fileÚupdate_configr=   Úparse_command_lineÚ
extra_argsÚ_linked©rL   r\   s     r$   Ú_link_jupyter_server_extensionz+ExtensionApp._link_jupyter_server_extension~  sj   € ð #ˆŒà×ÑÔð 	×Ñ˜4Ÿ>™>×0Ñ0Ô1ð 	×Ñ §¡× 9Ñ 9Ô:ð 	�‰×$Ñ$ T§[¡[Ô1àˆ�r&   c                ó¶   — | j                   sd}t        |«      ‚| j                  «        | j                  «        | j	                  «        | j                  «        y)aX  Initialize the extension app. The
        corresponding server app and webapp should already
        be initialized by this step.

        - Appends Handlers to the ServerApp,
        - Passes config and settings from ExtensionApp
          to the Tornado web application
        - Points Tornado Webapp to templates and static assets.
        zoThis extension has no attribute `serverapp`. Try calling `.link_to_serverapp()` before calling `.initialize()`.N)r\   rV   r˜   rM   rž   r¬   )rL   Úmsgs     r$   Ú
initializezExtensionApp.initialize   sR   € ð �~Š~ð#ð ô
 2°#Ó6Ð6à×ÑÔØ×ÑÔ!Ø×ÑÔ Ø×ÑÕ r&   c                ór   •— t         ‰| �  «        | j                  €J ‚| j                  j                  «        y)zoStart the underlying Jupyter server.

        Server should be started after extension is initialized.
        N)ÚsuperÚstartr\   )rL   Ú	__class__s    €r$   r¿   zExtensionApp.start·  s.   ø€ ô
 	‰‰Œà�~‰~Ð)Ð)Ð)Ø�‰×ÑÕr&   c                 ó   — y)z6Return a list of activity happening in this extension.Nr*   rK   s    r$   Úcurrent_activityzExtensionApp.current_activityÁ  s   € àr&   c              ƒ  ó   K  — y­w)z0Cleanup any resources managed by this extension.Nr*   rK   s    r$   Ústop_extensionzExtensionApp.stop_extensionÅ  ó   è ø� ùó   ‚c                óˆ   — | j                   €J ‚| j                   j                  «        | j                   j                  «        y)z#Stop the underlying Jupyter server.N)r\   ÚstopÚclear_instancerK   s    r$   rÈ   zExtensionApp.stopÈ  s2   € à�~‰~Ð)Ð)Ð)Ø�‰×ÑÔØ�‰×%Ñ%Õ'r&   c                óØ   — |j                   }	 |j                  | j                     }|j                  }|j                  «        |S # t        $ r  | «       }|j                  |«       Y Œ5w xY w)z‰Initialize and configure this extension, then add the extension's
        settings and handlers to the server's web application.
        )Úextension_managerÚextension_pointsrH   r#   ÚKeyErrorr¹   r¼   )rf   r\   rË   ÚpointÚ	extensions        r$   Ú_load_jupyter_server_extensionz+ExtensionApp._load_jupyter_server_extensionÎ  so   € ð
 &×7Ñ7Ðð	@à%×6Ñ6°s·x±xÑ@ˆEØŸ	™	ˆIð 	×ÑÔØÐøô	 ò 	@Ù›ˆIØ×4Ñ4°YÖ?ð	@ús   Ž%A Á!A)Á(A)c              ƒ  ó   K  — y­w)a:  
        An async hook to start e.g. tasks from the extension after
        the server's event loop is running.

        Override this method (no need to call `super()`) to
        start (async) tasks from an extension.

        This is useful for starting e.g. background tasks from
        an extension.
        Nr*   r¸   s     r$   Ú_start_jupyter_server_extensionz,ExtensionApp._start_jupyter_server_extensionÞ  rÅ   rÆ   c                óâ  —  | «       }||_         |j                  «        |j                  |j                  «       |j	                  |j
                  «       |j                  j                  dt        dt        |j                  d«      ifdt        dt        |j                  d«      ifdt        dt        |j                  d«      ifdt        dt        |j                  d	«      ifd
t        dt        |j                  d«      ifdt        dt        |j                  d«      ifdt        dt        |j                  d«      ifdt        dt        |j                  d«      ifg«       |j                  «        y)zPEnables extension to be loaded as classic Notebook (jupyter/notebook) extension.z/static/favicons/favicon.icoÚurlzstatic/base/images/favicon.icoz#/static/favicons/favicon-busy-1.icoz%static/base/images/favicon-busy-1.icoz#/static/favicons/favicon-busy-2.icoz%static/base/images/favicon-busy-2.icoz#/static/favicons/favicon-busy-3.icoz%static/base/images/favicon-busy-3.icoz!/static/favicons/favicon-file.icoz#static/base/images/favicon-file.icoz%/static/favicons/favicon-notebook.icoz'static/base/images/favicon-notebook.icoz%/static/favicons/favicon-terminal.icoz'static/base/images/favicon-terminal.icoz/static/logo/logo.pngzstatic/base/images/logo.pngN)r\   r³   r´   r=   rµ   r¶   rƒ   Úextendr	   r   r€   r¼   )rf   r\   rÏ   s      r$   Úload_classic_server_extensionz*ExtensionApp.load_classic_server_extensionê  s¨  € ñ “Eˆ	Ø'ˆ	ÔØ×"Ñ"Ô$Ø×Ñ 	× 0Ñ 0Ô1Ø×$Ñ$ Y×%9Ñ%9Ô:à×Ñ×!Ñ!ð 4Ü#ØœM¨)×*<Ñ*<Ð>^Ó_Ð`ðð ;Ü#àœ}Ø%×.Ñ.Ð0Wó ððð ;Ü#àœ}Ø%×.Ñ.Ð0Wó ððð ;Ü#àœ}Ø%×.Ñ.Ð0Wó ððð 9Ü#àœ}Ø%×.Ñ.Ð0Uó ððð =Ü#àœ}Ø%×.Ñ.ØEó ðð	ð =Ü#àœ}Ø%×.Ñ.ØEó ðð	ð -Ü#ØœM¨)×*<Ñ*<Ð>[Ó\Ð]ðð}CôE	
ðL 	×ÑÕr&   c                ó:   —  | j                   j                  di |¤ŽS )zqInstantiate the ServerApp

        Override to customize the ServerApp before it loads any configuration
        r*   )Úserverapp_classrs   )rf   rª   s     r$   Úmake_serverappzExtensionApp.make_serverapp=  s    € ð ,ˆs×"Ñ"×+Ñ+Ñ5¨fÑ5Ð5r&   c                ór  — | j                  «       di}| j                  }d| j                  v r/|j                  | j                  d   «       || j                  d<   d} | j                  dd|i|¤Ž}|j
                  j                  | j
                  «       |j                  |xs g | j                  |¬«       |S )a  Creates an instance of ServerApp and explicitly sets
        this extension to enabled=True (i.e. superseding disabling
        found in other config from files).

        The `launch_instance` method uses this method to initialize
        and start a server.
        TÚjpserver_extensionsF)r    Ústarter_extensionÚfind_extensionsr*   )rh   Úload_other_extensionsrY   rG   rÙ   Úaliasesr¼   rH   )rf   r    rÞ   rª   rÛ   rÝ   r\   s          r$   Úinitialize_serverzExtensionApp.initialize_serverE  sÁ   € ð  #×8Ñ8Ó:¸DÐAÐØ×3Ñ3ˆØ  C×$8Ñ$8Ñ8Ø×&Ñ& s×';Ñ';Ð<QÑ'RÔSØ:MˆC× Ñ Ð!6Ñ7Ø#ˆOØ&�C×&Ñ&ÑYÐ;NÐYÐRXÑYˆ	Ø×Ñ× Ñ  §¡Ô-Ø×ÑØ’˜Ø!Ÿh™hØ+ð 	ô 	
ð
 Ðr&   c                óV  — |€t         j                  dd }n|}t        | |«      }|r|j                  «        yt	        | |«       | j                  |¬«      }| j                  s(|j                  j                  | j                  › d�«       	 |j                  «        y# t        $ r Y yw xY w)zÍLaunch the extension like an application. Initializes+configs a stock server
        and appends the extension to the server. Then starts the server and routes to
        extension's landing page.
        Nr   )r    z- is running without loading other extensions.)Úsysr    r%   r¿   r7   rà   rÞ   ÚlogÚinforH   r   )rf   r    rª   Úargsr   r\   s         r$   Úlaunch_instancezExtensionApp.launch_instance]  s£   € ð ˆ<Ü—8‘8˜A˜B�<‰DàˆDô *¨#¨tÓ4ˆÙØ�L‰LŒNØô
 	% S¨$Ô/Ø×)Ñ)¨tÐ)Ó4ˆ	ð ×(Ò(Ø�M‰M×Ñ #§(¡( Ð+XÐYÔZð	Ø�O‰OÕøÜò 	Ùð	ús   ÂB Â	B(Â'B()r\   r   ÚreturnÚNone)rª   zt.Anyrç   r   )NTr)   )ArN   rO   rP   rQ   rÞ   rY   Ú__annotations__r   rR   rZ   r   r^   Úpropertyr`   rH   Úclassmethodrh   rj   rn   r   rl   ro   r¯   r·   r   Úclassesr
   r\   ru   r   Ú_log_formatter_clsrz   r}   r~   r‚   r   rœ   r   rE   r   rF   rƒ   rŠ   rŒ   r�   rD   r˜   rž   r¬   rM   r±   r¹   r¼   r¿   rÂ   rÄ   rÈ   rÐ   rÒ   rÖ   rØ   rÙ   rà   ræ   Ú__classcell__)rÀ   s   @r$   rX   rX   ~   sò  ø… ñð  !Ðð
 *,ÐÐ&Ó+ñ
 ðô÷ 
�c�€cÓð ñ ˆ^ÓñLó ðLð ñ0ó ð0ð %3€DÐ
!Ó2àñó ðð ñó ðð
 €Má“)—-‘- t�-Ó,€Káˆ]Óñ"ó ð"ñ ˜kÓ*€Oñ �5‹k€Gð 	ð€Gñ
 #&£%€IÐÓ'áˆ[Óñó ðð &Ðáˆ[Óñó ðñ ˆ\Óñ
ó ð
ñ  ØLôç	�c�€cÓð ñ Ð Ó!ñBó "ðBñ
 Ù‹	ðô÷ 
�c�€cÓð ñ Ù‹	ÙðFó
ô÷ 
�c�€cÓð ñ ™ÐMÓNÔO×SÑSÐ[_ÐSÓ`€Há(,ÙÐ9Ó:ô)ç	�c�€cÓð Ð%ó òGò@òKòFòEò0ò*)1òV$ò
ó òD!ô.òò?ò(ð ñó ðò
ð ñNó ðNð`  €Oàò6ó ð6ð òó ðð. òó ôr&   rX   )+rQ   Ú
__future__r   rx   r   râ   ÚtypingrS   Újinja2r   r   Újupyter_core.applicationr   r   Útornado.logr   Útornado.webr	   Ú	traitletsr
   r   r   r   r   r   r   Útraitlets.configr   Újupyter_server.serverappr   Újupyter_server.transutilsr   Újupyter_server.utilsr   r   r©   r   r%   r7   r9   rt   rV   rX   r*   r&   r$   Ú<module>rú      sq   ðÙ å "ã Û 	Û 
Û ç 0ß 8Ý $Ý 'ß H× HÑ HÝ #å .Ý +ß Då *òò""ôJK˜Yô KôFD iô Dô�:õ r&   