
    <if                     |    S SK 7   " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      rg)   )*c                   \    \ rS rSrSrS rS rS rS r " S S\	5      r
 " S	 S
\	5      rSrg)EdgeOptions   z
This is where the construction of the edges' options takes place.
So far, the edge smoothness can be switched through this object
as well as the edge color's inheritance. 
c                 X    U R                  5       U l        U R                  5       U l        g N)SmoothsmoothColorcolorselfs    G/home/james-whalen/.local/lib/python3.13/site-packages/pyvis/options.py__init__EdgeOptions.__init__
   s    kkmZZ\
    c                 $    XR                   l        g)a+  
Whether or not to inherit colors from the source node.
If this is set to `from` then the edge will take the color
of the source node. If it is set to `to` then the color will
be that of the destination node.

.. note:: If set to `True` then the `from` behavior is adopted
          and vice versa.
N)r   inheritr   statuss     r   inherit_colorsEdgeOptions.inherit_colors   s     $

r   c                 $    XR                   l        g)a  
Change smooth option for edges. When using dynamic, the edges will
have an invisible support node guiding the shape. This node is part
of the physics simulation,

:param smooth_type: Possible options are dynamic, continuous, discrete,
                    diagonalCross, straightCross, horizontal, vertical,
                    curvedCW, curvedCCW, cubicBezier

:type smooth_type: str
N)r
   type)r   smooth_types     r   toggle_smoothnessEdgeOptions.toggle_smoothness   s     'r   c                 ,    [        U R                  5      $ r   str__dict__r   s    r   __repr__EdgeOptions.__repr__(       4==!!r   c                   $    \ rS rSrSrS rS rSrg)EdgeOptions.Smooth+   a  
When the edges are made to be smooth, the edges are drawn as a
dynamic quadratic bezier curve. The drawing of these curves
takes longer than that of the straight curves but it looks better.
There is a difference between dynamic smooth curves and static
smooth curves. The dynamic smooth curves have an invisible support
node that takes part in the physics simulation. If there are a lot
of edges, another kind of smooth than dynamic would be better for
performance.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   EdgeOptions.Smooth.__repr__6       t}}%%r   c                      SU l         SU l        g )NTdynamicenabledr   r   s    r   r   EdgeOptions.Smooth.__init__9   s    DL!DIr   r-   N__name__
__module____qualname____firstlineno____doc__r"   r   __static_attributes__ r   r   r	   r&   +   s    			&	"r   r	   c                   $    \ rS rSrSrS rS rSrg)EdgeOptions.Color=   z
The color object contains the color information of the edge
in every situation. When the edge only needs a single color value
like 'rgb(120,32,14)', '#ffffff' or 'red' can be supplied instead
of an object.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   EdgeOptions.Color.__repr__D   r*   r   c                     SU l         g NTr   r   s    r   r   EdgeOptions.Color.__init__G   s	    DLr   r?   Nr0   r7   r   r   r   r9   =   s    		&	 r   r   )r   r
   N)r1   r2   r3   r4   r5   r   r   r   r"   objectr	   r   r6   r7   r   r   r   r      s3    "
$'"" "$   r   r   c                   *    \ rS rSrSrS rS rS rSrg)InteractionK   z
Used for all user interaction with the network. Handles mouse
and touch events as well as the navigation buttons and the popups.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   Interaction.__repr__P   r$   r   c                 .    SU l         SU l        SU l        g )NFT)hideEdgesOnDraghideNodesOnDrag	dragNodesr   s    r   r   Interaction.__init__S   s    $$r   c                      U R                   U   $ r   r!   r   items     r   __getitem__Interaction.__getitem__X       }}T""r   )rJ   rH   rI   N	r1   r2   r3   r4   r5   r"   r   rP   r6   r7   r   r   rC   rC   K   s    "
#r   rC   c                   .    \ rS rSrSrS rSS jrS rSrg)		Configure\   z`
Handles the HTML part of the canvas and generates
an interactive option editor with filtering.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   Configure.__repr__b   r$   r   Nc                 ,    Xl         U(       a  X l        g g r   r.   filter)r   r.   filter_s      r   r   Configure.__init__e   s    !K r   c                      U R                   U   $ r   rM   rN   s     r   rP   Configure.__getitem__j   rR   r   rZ   )FNrS   r7   r   r   rU   rU   \   s    
""
#r   rU   c                   P    \ rS rSrSrS rSS jrS rS rS r	 " S	 S
\
5      rSrg)Layoutn   zX
Acts as the camera that looks on the canvas.
Does the animation, zooming and focusing.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   Layout.__repr__t   r$   r   Nc                 b    U(       d  SU l         OXl         X l        U R                  SS9U l        g )N    T)r.   )
randomSeedimprovedLayoutHierarchicalhierarchical)r   rg   rh   s      r   r   Layout.__init__w   s-    DO(O, --d-;r   c                 $    XR                   l        g)z,
The distance between the different levels.
N)rj   levelSeparationr   distances     r   set_separationLayout.set_separation   s     -5)r   c                 $    XR                   l        g)z
Distance between different trees (independent networks). This is
only for the initial layout. If you enable physics, the repulsion
model will denote the distance between the trees.
N)rj   treeSpacingrn   s     r   set_tree_spacingLayout.set_tree_spacing   s     )1%r   c                 $    XR                   l        g)a  
Method for reducing whitespace. Can be used alone or together with
block shifting. Enabling block shifting will usually speed up the
layout process. Each node will try to move along its free axis to
reduce the total length of it's edges. This is mainly for the
initial layout. If you enable physics, they layout will be determined
by the physics. This will greatly speed up the stabilization time
N)rj   edgeMinimizationr   s     r   set_edge_minimizationLayout.set_edge_minimization   s     .4*r   c                   2    \ rS rSrS r       SS jrSrg)Layout.Hierarchical   c                      U R                   U   $ r   rM   rN   s     r   rP   Layout.Hierarchical.__getitem__   s    ==&&r   c                 X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g r   )r.   rm   rs   blockShiftingrw   parentCentralization
sortMethod)r   r.   rm   rs   r   rw   r   r   s           r   r   Layout.Hierarchical.__init__   s,     #L#2 *!.$4!(<%(Or   )r   rw   r.   rm   r   r   rs   N)F      TTThubsize)r1   r2   r3   r4   rP   r   r6   r7   r   r   ri   r{      s#    	' "$' #"&%))-(	)r   ri   )rj   rh   rg   r>   )r1   r2   r3   r4   r5   r"   r   rp   rt   rx   rA   ri   r6   r7   r   r   ra   ra   n   s,    
"<51	4)v )r   ra   c                   :    \ rS rSrSrS rS rS
S jrS rS r	S	r
g)Options   as  
Represents the global options of the network.
This object consists of indiviual sub-objects
that map to VisJS's modules of:
    - configure
    - layout
    - interaction
    - physics
    - edges

The JSON representation of this object is directly passed
in to the VisJS framework.
In the future this can be expanded to completely mimic
the structure VisJS can expect.
c                 ,    [        U R                  5      $ r   r   r   s    r   r"   Options.__repr__   r$   r   c                      U R                   U   $ r   rM   rN   s     r   rP   Options.__getitem__   rR   r   Nc                     U(       a  [        5       U l        [        5       U l        [	        5       U l        [        5       U l        [        5       U l	        g r   )
ra   layoutrC   interactionrU   	configurePhysicsphysicsr   edges)r   r   s     r   r   Options.__init__   s3     (DK&="y ]
r   c                     UR                  SS5      R                  SS5      nUR                  S5      nX#S n[        R                  U5      nU$ )a  
This method should accept a JSON string and replace its internal
options structure with the given argument after parsing it.
In practice, this method should be called after using the browser
to experiment with different physics and layout options, using
the generated JSON options structure that is spit out from the
front end to serve as input to this method as a string.

:param new_options: The JSON like string of the options that will
                    override.

:type new_options: str

  {N)replacefindjsonloads)r   new_optionsoptionsfirst_brackets       r   setOptions.set   sN     %%dB/77R@S).)**W%r   c                 0    [         R                  U S SSS9$ )Nc                     U R                   $ r   rM   )os    r   <lambda>!Options.to_json.<locals>.<lambda>   s    AJJr   T   )default	sort_keysindent)r   dumpsr   s    r   to_jsonOptions.to_json   s#    zz.1  & 	&r   )r   r   r   r   r   r   )r1   r2   r3   r4   r5   r"   rP   r   r   r   r6   r7   r   r   r   r      s     "##,&r   r   N)r   rA   r   rC   rU   ra   r   r7   r   r   <module>r      sH    E & E P#& #"# #$>)V >)D7&f 7&r   