
    -em                        d Z ddlmZ ddlZ ej        e          ZddlZddlZddl	m
Z
 ddl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mZmZ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dl&m'Z' ddl(m)Z)m*Z*m+Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl$m9Z9m:Z:m;Z;m<Z< ddl	m=Z=m>Z> ddl?m@Z@ ddlAmBZB er&ddlCmDZDmEZE ddlmFZF ddlmGZG ddlHmIZImJZJmKZKmLZL ddl$mMZM d ZNd!ZO G d" d#          ZPdS )$aE   Provide the ``Document`` class, which is a container for Bokeh Models to
be reflected to the client side BokehJS library.

As a concrete example, consider a column layout with ``Slider`` and ``Select``
widgets, and a plot with some tools, an axis and grid, and a glyph renderer
for circles. A simplified representation of this document might look like the
figure below:

.. figure:: /_images/document.svg
    :align: center
    :width: 65%

    A Bokeh Document is a collection of Bokeh Models (e.g. plots, tools,
    glyphs, etc.) that can be serialized as a single collection.

    )annotationsN)loads)TYPE_CHECKINGAnyIterable)Template   )HoldPolicyTypeis_DataModel)findis_single_string_selector)Deserializer
Serialized
SerializerUnknownReferenceError)FILE)ID)check_integrityprocess_validation_issues)Event)Model)Themebuilt_in_themesdefault)make_id)	nice_join)__version__   )CallbackDocumentCallbackManagerEventCallbackJSEventCallbackMessageCallback)DocumentPatchedEventRootAddedEventRootRemovedEventTitleChangedEvent)DocJson	PatchJson)DocumentModelManager)DocumentModuleManager)SessionContextSessionDestroyedCallback)Setter)SelectorType)NextTickCallbackPeriodicCallbackSessionCallbackTimeoutCallback)DocumentChangeCallbackzBokeh Application)Documentc                     e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ded<   ded<   eedd}dZed~d            Z	edd            Z
edd            Zej        dd            Zedd!            Zedd"            Zej        dd$            Zedd%            Zedd&            Zej        dd(            Zedd)            Zej        dd*            Zdd.Zdd2Zddd8Zdd;Zd3d<dd?Zdd@ZddCZeddF            ZeddH            ZddLZddNZdddRZddTZddVZ ddZZ!dd\Z"dd_Z#ddaZ$ddcZ%dddZ&ddeZ'ddfZ(dddgZ)ddhZ*ddjZ+ddnZ,ddoZ-ddrZ.dddsZ/dtduddxZ0ddyZ1ddzZ2dd|Z3d3S )r6   a   The basic unit of serialization for Bokeh.

    Document instances collect Bokeh models (e.g. plots, layouts, widgets,
    etc.) so that they may be reflected into the BokehJS client runtime.
    Because models may refer to other models (e.g., a plot *has* a list of
    renderers), it is not generally useful or meaningful to convert individual
    models to JSON. Accordingly,  the ``Document`` is thus the smallest unit
    of serialization for Bokeh.

    r!   	callbacksr+   modelsr,   moduleslist[Model]_rootsr   _themestr_titler   	_templatez,weakref.ReferenceType[SessionContext] | None_session_contextdict[str, Any]_template_variables)themetitlerD   rE   returnNonec                   t          |           | _        t          |           | _        t	          |           | _        g | _        t          | _        i | _	        || _
        || _        d | _        d S N)r!   r8   r+   r9   r,   r:   r<   r   r@   rC   r=   r?   rA   )selfrD   rE   s      7lib/python3.11/site-packages/bokeh/document/document.py__init__zDocument.__init__   sa    066*400,T22#%  $    c                *    t          | j                  S )z: A list of all the root models in this Document.

        )listr<   rJ   s    rK   rootszDocument.roots   s    
 DK   rM   list[SessionCallback]c                    | j         j        S )zA A list of all the session callbacks for this document.

        )r8   session_callbacksrP   s    rK   rT   zDocument.session_callbacks   s    
 ~//rM   set[SessionDestroyedCallback]c                    | j         j        S )zN A list of all the on_session_destroyed callbacks for this document.

        r8   session_destroyed_callbacksrP   s    rK   rX   z$Document.session_destroyed_callbacks   s    
 ~99rM   c                    || j         _        d S rI   rW   rJ   r8   s     rK   rX   z$Document.session_destroyed_callbacks   s    5>222rM   SessionContext | Nonec                <    | j         |                                  ndS )z4 The ``SessionContext`` for this document.

        N)rA   rP   s    rK   session_contextzDocument.session_context   s$    
 +/*?*Kt$$&&&QUUrM   c                    | j         S )z@ A Jinja2 template to use for rendering this document.

        )r@   rP   s    rK   templatezDocument.template   s    
 ~rM   r_   c                j    t          |t          t          f          st          d          || _        d S )Nz5document template must be Jinja2 template or a string)
isinstancer   r>   
ValueErrorr@   )rJ   r_   s     rK   r_   zDocument.template   s3    (XsO44 	VTUUU!rM   c                    | j         S )z_ A dictionary of template variables to pass when rendering
        ``self.template``.

        )rC   rP   s    rK   template_variableszDocument.template_variables   s     ''rM   c                    | j         S )aD   The current ``Theme`` instance affecting models in this Document.

        Setting this to ``None`` sets the default theme. (i.e this property
        never returns ``None``.)

        Changing theme may trigger model change events on the models in the
        document if the theme modifies any model properties.

        )r=   rP   s    rK   rD   zDocument.theme   s     {rM   Theme | str | Nonec                   |t           n|}t          |t                    rC	 t          |         }n4# t          $ r' t          | dt          t                               w xY wt          |t                    st          d          | j        |u rd S || _        | j	        D ]}| j        
                    |           d S )Nz/ is not a built-in theme; available themes are z8Theme must be a string or an instance of the Theme class)default_themera   r>   r   KeyErrorrb   r   r   r=   r9   apply_to_model)rJ   rD   models      rK   rD   zDocument.theme   s    !&EeS!! 	xx'. x x x E!v!vZcdsZtZt!v!vwwwx %'' 	YWXXX;%F[ 	. 	.EK&&u----	. 	.s	   0 1A!c                    | j         S )z A title for this document.

        This title will be set on standalone HTML documents, but not e.g. when
        ``autoload_server`` is used.

        )r?   rP   s    rK   rE   zDocument.title   s     {rM   c                0    |                      |           d S rI   )	set_title)rJ   rE   s     rK   rE   zDocument.title   s    urM   callbackr    r1   c                z    ddl m}  |dt                                }| j                            ||d          S )a   Add callback to be invoked once on the next tick of the event loop.

        Args:
            callback (callable) :
                A callback function to execute on the next tick.

        Returns:
            NextTickCallback : can be used with ``remove_next_tick_callback``

        .. note::
            Next tick callbacks only work within the context of a Bokeh server
            session. This function will no effect when Bokeh outputs to
            standalone HTML or Jupyter notebook cells.

        r	   )r1   N)ro   callback_idTone_shot)server.callbacksr1   r   r8   add_session_callback)rJ   ro   r1   cbs       rK   add_next_tick_callbackzDocument.add_next_tick_callback   sL      	877777tCCC~222x$2OOOrM   period_millisecondsintr2   c                |    ddl m}  |d|t                                }| j                            ||d          S )a_   Add a callback to be invoked on a session periodically.

        Args:
            callback (callable) :
                A callback function to execute periodically

            period_milliseconds (int) :
                Number of milliseconds between each callback execution.

        Returns:
            PeriodicCallback : can be used with ``remove_periodic_callback``

        .. note::
            Periodic callbacks only work within the context of a Bokeh server
            session. This function will no effect when Bokeh outputs to
            standalone HTML or Jupyter notebook cells.

        r	   )r2   N)ro   periodrq   Frr   )rt   r2   r   r8   ru   )rJ   ro   rx   r2   rv   s        rK   add_periodic_callbackzDocument.add_periodic_callback  sR    & 	877777t4GU\U^U^___~222x%2PPPrM   Nrk   r   setterSetter | Nonec                   || j         v rdS | j                                        5  | j                             |           ddd           n# 1 swxY w Y   | j                            t          | ||                     dS )a   Add a model as a root of this Document.

        Any changes to this model (including to other models referred to
        by it) will trigger ``on_change`` callbacks registered on this
        document.

        Args:
            model (Model) :
                The model to add as a root of this document.

            setter (ClientSession or ServerSession or None, optional) :
                This is used to prevent "boomerang" updates to Bokeh apps.
                (default: None)

                In the context of a Bokeh server application, incoming updates
                to properties will be annotated with the session that is
                doing the updating. This value is propagated through any
                subsequent change notifications that the update triggers.
                The session can compare the event setter to itself, and
                suppress any updates that originate from itself.

        N)r<   r9   freezeappendr8   trigger_on_changer&   rJ   rk   r}   s      rK   add_rootzDocument.add_root'  s    . DKF[!! 	& 	&Ku%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	((eV)L)LMMMMM   AAAtimeout_millisecondsr4   c                |    ddl m}  |d|t                                }| j                            ||d          S )ac   Add callback to be invoked once, after a specified timeout passes.

        Args:
            callback (callable) :
                A callback function to execute after timeout

            timeout_milliseconds (int) :
                Number of milliseconds before callback execution.

        Returns:
            TimeoutCallback : can be used with ``remove_timeout_callback``

        .. note::
            Timeout callbacks only work within the context of a Bokeh server
            session. This function will no effect when Bokeh outputs to
            standalone HTML or Jupyter notebook cells.

        r	   )r4   N)ro   timeoutrq   Trr   )rt   r4   r   r8   ru   )rJ   ro   r   r4   rv   s        rK   add_timeout_callbackzDocument.add_timeout_callbackF  sQ    & 	766666_d4HV]V_V_```~222x$2OOOrM   r}   
patch_json!PatchJson | Serialized[PatchJson]c                  t          t          | j                  |          	                     |          }nU# t          $ rH}| j                            |j                  r#t          j        d|j        d           Y d}~dS  d}~ww xY w|d         }t          |t                    sJ |D ]}t          j        | ||           | j                            fd           dS )a@   Apply a JSON patch object and process any resulting events.

        Args:
            patch (JSON-data) :
                The JSON-object containing the patch to apply.

            setter (ClientSession or ServerSession or None, optional) :
                This is used to prevent "boomerang" updates to Bokeh apps.
                (default: None)

                In the context of a Bokeh server application, incoming updates
                to properties will be annotated with the session that is
                doing the updating. This value is propagated through any
                subsequent change notifications that the update triggers.
                The session can compare the event setter to itself, and
                suppress any updates that originate from itself.

        Returns:
            None

        r   zFDropping a patch because it contains a previously known reference (id=z). Most of the time this is harmless and usually a result of updating a model on one side of a communications channel while it was being removed on the other end.Neventsc                0                         |            S rI   )has_ref)rk   deserializers    rK   <lambda>z+Document.apply_json_patch.<locals>.<lambda>  s    <3G3G3N3N/N rM   )r   rO   r9   deserializer   seenidloggingwarningra   r%   handle_eventflush_synced)rJ   r   r}   patcherrorr   eventr   s          @rK   apply_json_patchzDocument.apply_json_patch]  s#   , $D$5$5fEEE	+77
CCEE$ 		 		 		{))  !GLx! ! !   
 		 x&$''''' 	C 	CE -dE6BBBB  !N!N!N!NOOOOOs   < 
B<B	B		Bc                6   | j                                         5  t          | j                  dk    rNt	          t          | j                            }|                     |           t          | j                  dk    Nddd           dS # 1 swxY w Y   dS )zj Remove all content from the document but do not reset title.

        Returns:
            None

        r   N)r9   r   lenr<   nextiterremove_root)rJ   rs     rK   clearzDocument.clear  s     [!! 	$ 	$dk""Q&&dk**++  ### dk""Q&&	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$s   A'BBBsessionr   c                   |                      |           | `| `| `d | _        | j                                         | j                                         | j                                         t          j
                     d S rI   )remove_on_changer<   r=   r@   rA   r8   destroyr9   r:   gccollect)rJ   r   s     rK   r   zDocument.destroy  sz    g&&&KKN $    	
rM   doc_jsonDocJson | Serialized[DocJson]c                    t          |t                    rg |d<   t                      }|                    |          }|d         }|d         }t	                      }|D ]}|                    |           ||_        |S )z Load a document from JSON.

        doc_json (JSON-data) :
            A JSON-encoded document to create a new Document from.

        Returns:
            Document :

        defsrQ   rE   )ra   dictr   r   r6   r   rE   )clsr   r   
doc_structrQ   rE   docroots           rK   	from_jsonzDocument.from_json  s     h%% 	"!HV#~~!--h77
7#7#jj 	 	DLL	
rM   jsonc                J    t          |          }|                     |          S )z Load a document from JSON.

        json (str) :
            A string with a JSON-encoded document to create a new Document
            from.

        Returns:
            Document :

        )r   r   )r   r   json_parseds      rK   from_json_stringzDocument.from_json_string  s!     Dkk}}[)))rM   model_idr   Model | Nonec                6    | j                             |          S )z Find the model for the given ID in this document, or ``None`` if it
        is not found.

        Args:
            model_id (str) : The ID of the model to search for

        Returns:
            Model or None

        )r9   	get_by_id)rJ   r   s     rK   get_model_by_idzDocument.get_model_by_id  s     {$$X...rM   namec                6    | j                             |          S )z Find the model for the given name in this document, or ``None`` if
        it is not found.

        Args:
            name (str) : The name of the model to search for

        Returns:
            Model or None

        )r9   get_one_by_name)rJ   r   s     rK   get_model_by_namezDocument.get_model_by_name  s     {**4000rM   combinepolicyr
   c                :    | j                             |           dS )a   Activate a document hold.

        While a hold is active, no model changes will be applied, or trigger
        callbacks. Once ``unhold`` is called, the events collected during the
        hold will be applied according to the hold policy.

        Args:
            hold ('combine' or 'collect', optional)
                Whether events collected during a hold should attempt to be
                combined (default: 'combine')

                When set to ``'collect'`` all events will be collected and
                replayed in order as-is when ``unhold`` is called.

                When set to ``'combine'`` Bokeh will attempt to combine
                compatible events together. Typically, different events that
                change the same property on the same mode can be combined.
                For example, if the following sequence occurs:

                .. code-block:: python

                    doc.hold('combine')
                    slider.value = 10
                    slider.value = 11
                    slider.value = 12

                Then only *one* callback, for the last ``slider.value = 12``
                will be triggered.

        Returns:
            None

        .. note::
            ``hold`` only applies to document change events, i.e. setting
            properties on models. It does not apply to events such as
            ``ButtonClick``, etc.

        N)r8   hold)rJ   r   s     rK   r   zDocument.hold  s!    N 	F#####rM   r5   c                $     | j         j        |  dS )zm Provide callbacks to invoke if the document or any Model reachable
        from its roots changes.

        N)r8   	on_changerZ   s     rK   r   zDocument.on_change  s    
 	! ),,,,rM   receiverc                :    | j                             |           dS 


        N)r8   on_change_dispatch_to)rJ   r   s     rK   r   zDocument.on_change_dispatch_to  s      	,,X66666rM   r   str | type[Event]r"   c                ,     | j         j        |g|R   dS )zD Provide callbacks to invoke if a bokeh event is received.

        N)r8   on_eventrJ   r   r8   s      rK   r   zDocument.on_event!  s'     	 2	222222rM   r#   c                ,     | j         j        |g|R   dS )zG Provide JS callbacks to invoke if a bokeh event is received.

        N)r8   js_on_eventr   s      rK   r   zDocument.js_on_event'  s'     	#"559555555rM   msg_typer$   c                ,     | j         j        |g|R   dS r   )r8   
on_message)rJ   r   r8   s      rK   r   zDocument.on_message-  s'     	"!(7Y777777rM   r.   c                $     | j         j        |  dS )za Provide callbacks to invoke when the session serving the Document
        is destroyed

        N)r8   on_session_destroyedrZ   s     rK   r   zDocument.on_session_destroyed3  s    
 	,+Y7777rM   callback_objc                :    | j                             |           dS )a5   Remove a callback added earlier with ``add_next_tick_callback``.

        Args:
            callback_obj : a value returned from ``add_next_tick_callback``

        Returns:
            None

        Raises:
            ValueError, if the callback was never added or has already been run or removed

        Nr8   remove_session_callbackrJ   r   s     rK   remove_next_tick_callbackz"Document.remove_next_tick_callback:        	..|<<<<<rM   c                $     | j         j        |  dS )z Remove a callback added earlier with ``on_change``.

        Raises:
            KeyError, if the callback was never added

        N)r8   r   rZ   s     rK   r   zDocument.remove_on_changeI  s     	('3333rM   c                <    | j                             ||           dS r   )r8   remove_on_message)rJ   r   ro   s      rK   r   zDocument.remove_on_messageR  s"     	((8<<<<<rM   c                :    | j                             |           dS )a+   Remove a callback added earlier with ``add_periodic_callback``

        Args:
            callback_obj : a value returned from ``add_periodic_callback``

        Returns:
            None

        Raises:
            ValueError, if the callback was never added or has already been removed

        Nr   r   s     rK   remove_periodic_callbackz!Document.remove_periodic_callbackX  r   rM   c                   || j         vrdS | j                                        5  | j                             |           ddd           n# 1 swxY w Y   | j                            t          | ||                     dS )a   Remove a model as root model from this Document.

        Changes to this model may still trigger ``on_change`` callbacks
        on this document, if the model is still referred to by other
        root models.

        Args:
            model (Model) :
                The model to add as a root of this document.

            setter (ClientSession or ServerSession or None, optional) :
                This is used to prevent "boomerang" updates to Bokeh apps.
                (default: None)

                In the context of a Bokeh server application, incoming updates
                to properties will be annotated with the session that is
                doing the updating. This value is propagated through any
                subsequent change notifications that the update triggers.
                The session can compare the event setter to itself, and
                suppress any updates that originate from itself.

        N)r<   r9   r   remover8   r   r'   r   s      rK   r   zDocument.remove_rootg  s    . ##F[!! 	& 	&Ku%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	(()9$v)N)NOOOOOr   c                :    | j                             |           dS )a1   Remove a callback added earlier with ``add_timeout_callback``.

        Args:
            callback_obj : a value returned from ``add_timeout_callback``

        Returns:
            None

        Raises:
            ValueError, if the callback was never added or has already been run or removed

        Nr   r   s     rK   remove_timeout_callbackz Document.remove_timeout_callback  r   rM   r)   c                Z    |                      |          }|                    |            dS )z Overwrite everything in this document with the JSON-encoded
        document.

        json (JSON-data) :
            A JSON-encoded document to overwrite this one.

        Returns:
            None

        N)r   _destructively_move)rJ   r   replacements      rK   replace_with_jsonzDocument.replace_with_json  s/     nnT**''-----rM   selectorr0   Iterable[Model]c                    t          |d          r | j                            |d                   S t          | j        |          S )a   Query this document for objects that match the given selector.

        Args:
            selector (JSON-like query dictionary) : you can query by type or by
                name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}``

        Returns:
            seq[Model]

        r   )r   r9   get_all_by_namer   )rJ   r   s     rK   selectzDocument.select  sD     %Xv66 	A;..x/?@@@DK***rM   c                    t          |                     |                    }t          |          dk    rt          d| d|          t          |          dk    rdS |d         S )a   Query this document for objects that match the given selector.
        Raises an error if more than one object is found.  Returns
        single matching object, or None if nothing is found

        Args:
            selector (JSON-like query dictionary) : you can query by type or by
                name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}``

        Returns:
            Model or None

        r   z#Found more than one model matching z: r   N)rO   r   r   rb   )rJ   r   results      rK   
select_onezDocument.select_one  sk     dkk(++,,v;;??Y8YYvYYZZZv;;!4ayrM   SelectorType | type[Model]updatesc                    t          |t                    r%t          |t                    rt	          |          }|                     |          D ]-}|                                D ]\  }}t          |||           .dS )aZ   Update objects that match a given selector with the specified
        attribute/value updates.

        Args:
            selector (JSON-like query dictionary) : you can query by type or by
                name,i e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}``
                updates (dict) :

        Returns:
            None

        )typeN)ra   r   
issubclassr   r   r   itemssetattr)rJ   r   r   objkeyvals         rK   
set_selectzDocument.set_select  s     h%% 	+*Xu*E*E 	+***H;;x(( 	' 	'C#MMOO ' 'SS#&&&&'	' 	'rM   c                    |t          d          | j        |k    r2|| _        | j                            t	          | ||                     dS dS )r   NzDocument title may not be None)rb   r?   r8   r   r(   )rJ   rE   r}   s      rK   rn   zDocument.set_title  s]     ==>>>;%DKN,,->tUF-S-STTTTT  rM   Tdeferredr  boolc                  d t           j                                        D             }t          |          }|                    |          }|                    | j                  }|                    | j        j                  }t          t          | j
        |          }|r||d<   | j        j        r||d<   | j                                         |S )zc Convert this document to a JSON-serializble object.

        Return:
            DocJson

        c                0    g | ]}t          |          |S  r   ).0rk   s     rK   
<listcomp>z$Document.to_json.<locals>.<listcomp>  s'    jjj%UabgUhUhjjjjrM   r   )versionrE   rQ   r   r8   )r   model_class_reverse_mapvaluesr   encoder<   r8   _js_event_callbacksr)   r   rE   r9   r   )rJ   r  data_models
serializerr   rQ   r8   r   s           rK   to_jsonzDocument.to_json  s     kj5+H+O+O+Q+Qjjj222
  --!!$+..%%dn&HII	*
 
 
  	$#HV>- 	.$-H[!  """rM   c                8    | j                                          dS )zo Turn off any active document hold and apply any collected events.

        Returns:
            None

        N)r8   unholdrP   s    rK   r  zDocument.unhold  s     	rM   c                ~    | j         D ]4}|                                }t          |          }t          |           5dS )ze Perform integrity checks on the modes in this document.

        Returns:
            None

        N)rQ   
referencesr   r   )rJ   r   refsissuess       rK   validatezDocument.validate
  sJ      	. 	.A<<>>D$T**F%f----		. 	.rM   dest_docc                R   || u rt          d          |                                 g }| j                                        5  | j        rRt          t          | j                            }|                     |           |                    |           | j        Rddd           n# 1 swxY w Y   |D ]}|j	        t          d|z            t          | j                  dk    rt          d| j                  |D ]}|                    |           | j        |_        dS )z Move all data in this doc to the dest_doc, leaving this doc empty.

        Args:
            dest_doc (Document) :
                The Bokeh document to populate with data from this one

        Returns:
            None

        z-Attempted to overwrite a document with itselfNzSomehow we didn't detach %rr   z#_all_models still had stuff in it: )RuntimeErrorr   r9   r   rQ   r   r   r   r   documentr   r   rE   )rJ   r  rQ   r   s       rK   r   zDocument._destructively_move  s    tNOOO  [!! 	  	 *  dj))**  ###Q *  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	   	H 	HAz%"#@A#FGGG & t{q  TT[TTUUU 	! 	!Aa    s   AB))B-0B-)rD   r   rE   r>   rF   rG   )rF   r;   )rF   rR   )rF   rU   )r8   rU   rF   rG   )rF   r[   )rF   r   )r_   r   rF   rG   )rF   rB   )rF   r   )rD   rf   rF   rG   )rF   r>   )rE   r>   rF   rG   )ro   r    rF   r1   )ro   r    rx   ry   rF   r2   rI   )rk   r   r}   r~   rF   rG   )ro   r    r   ry   rF   r4   )r   r   r}   r~   rF   rG   )rF   rG   )r   r   rF   rG   )r   r   rF   r6   )r   r>   rF   r6   )r   r   rF   r   )r   r>   rF   r   )r   )r   r
   rF   rG   )r8   r5   rF   rG   )r   r   rF   rG   )r   r   r8   r"   rF   rG   )r   r   r8   r#   rF   rG   )r   r>   r8   r$   rF   rG   )r8   r.   rF   rG   )r   r1   rF   rG   )r8   r   rF   rG   )r   r>   ro   r$   rF   rG   )r   r2   rF   rG   )r   r4   rF   rG   )r   r)   rF   rG   )r   r0   rF   r   )r   r0   rF   r   )r   r   r   rB   rF   rG   )rE   r>   r}   r~   rF   rG   )r  r  rF   r)   )r  r6   rF   rG   )4__name__
__module____qualname____doc____annotations__rh   DEFAULT_TITLErL   propertyrQ   rT   rX   r}   r]   r_   rd   rD   rE   rw   r|   r   r   r   r   r   classmethodr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rn   r  r  r  r   r  rM   rK   r6   r6   o   s<        	 	 '&&&    """"MMMKKKBBBB'''')6] % % % % % % ! ! ! X! 0 0 0 X0 : : : X: !'? ? ? ('? V V V XV    X _" " " _"
 ( ( ( X( 
 
 
 X
 \. . . \.(    X \   \
P P P P(Q Q Q Q.N N N N N>P P P P. jn ,P ,P ,P ,P ,P ,P\
$ 
$ 
$ 
$       [6 * * * [*/ / / /1 1 1 1'$ '$ '$ '$ '$R- - - -7 7 7 73 3 3 36 6 6 68 8 8 88 8 8 8= = = =4 4 4 4= = = == = = =P P P P P>= = = =. . . .+ + + +"   (' ' ' '&U U U U U +/      8       . . . .%$ %$ %$ %$ %$ %$rM   r6   )Qr  
__future__r   r   	getLoggerr  logr   weakrefr   r   typingr   r   r   jinja2r   
core.enumsr
   core.has_propsr   
core.queryr   r   core.serializationr   r   r   r   core.templatesr   
core.typesr   core.validationr   r   r   r   rk   r   themesr   r   r   rh   util.serializationr   util.stringsr   util.versionr   r8   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r9   r+   r:   r,   application.applicationr-   r.   r/   r0   rt   r1   r2   r3   r4   r5   r   __all__r6   r  rM   rK   <module>r6     sd   ( # " " " " " g!! 
			        / / / / / / / / / /       ( ' ' ' ' ' ) ) ) ) ) ) 8 8 8 8 8 8 8 8            " ! ! ! ! !       H H H H H H H H             E E E E E E E E E E ( ( ( ( ( ( $ $ $ $ $ $ & & & & & &                         % $ $ $ $ $ $ $ ( ( ( ( ( ( * * * * * * 
/RRRRRRRR''''''))))))            /..... $O$ O$ O$ O$ O$ O$ O$ O$ O$ O$rM   