
    Eh                     `    S SK JrJrJrJr  S r\" 5       r\\\	4   r
S\4S jr " S S5      rg)    )ListUnionOptionalAnyc                     XUS.$ )N)	operationlocationparams )namer	   kwargss      ^C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\dash/_patch.py
_operationr      s    vFF    objc                 D    [        U [        5      (       a  [        S5      eg )Nz&a slice is not a valid index for patch)
isinstanceslice	TypeError)r   s    r   validate_slicer      s     #u@AA r   c                      \ rS rSrSr  S(S\\\      S\S    4S jjrS r	S r
S	\S
S 4S jrS	\S
S 4S jrS\S\4S jrS	\4S jrS\S\4S jrS\4S jrS\4S jrS\4S jrS\S
S 4S jrS\4S jrS\4S jrS rS rS	\S
S4S jrS	\S
S4S jrS\S	\S
S4S jrS)S jrS)S  jrS	\\ \!4   S
S4S! jr"S	\S
S4S" jr#S*S#\S
S4S$ jjr$S% r%S
\4S& jr&S'r'g)+Patch   z
Patch a callback output value

Act like a proxy of the output prop value on the frontend.

Supported prop types: Dictionaries and lists.
Nr	   parentc                     Ub  Xl         O#U=(       a    UR                   =(       d    / U l         Ub  UR                  U l        g / U l        g N	_location_operations)selfr	   r   s      r   __init__Patch.__init__   sD    
 %N %9)9)9@bDN%11D!Dr   c                     [        U 5      $ r   )varsr    s    r   __getstate__Patch.__getstate__*   s    Dzr   c                 8    [        U 5      R                  U5        g r   )r$   update)r    states     r   __setstate__Patch.__setstate__-   s    T
% r   itemreturnc                 H    [        U5        [        U R                  U/-   U S9$ )N)r	   r   )r   r   r   r    r-   s     r   __getitem__Patch.__getitem__0   s"    tdnnv5dCCr   c                     US:X  a  [         eUS:X  a  U R                  $ US:X  a  U R                  $ U R                  U5      $ )Ntolistr   r   )AttributeErrorr   r   r1   r0   s     r   __getattr__Patch.__getattr__4   sG    8  ;>>!= ###%%r   keyvaluec                 P    US;   a  X R                   U'   g U R                  X5        g )Nr   )__dict____setitem__r    r8   r9   s      r   __setattr__Patch.__setattr__>   s%    ..!&MM#S(r   c                 &    U R                  U5        g r   )__delitem__r0   s     r   __delattr__Patch.__delattr__D   s    r   c                     [        U5        U[        L a  g U R                  R                  [	        SU R
                  U/-   US95        g )NAssignr9   )r   _noopr   appendr   r   r=   s      r   r<   Patch.__setitem__G   sD    sE>#&	
r   c                     [        U5        U R                  R                  [        SU R                  U/-   5      5        g )NDelete)r   r   rH   r   r   )r    r8   s     r   rA   Patch.__delitem__T   s0    s
8T^^se5K LMr   otherc                     [        U[        [        45      (       a  U R                  U5        O.U R                  R                  [        SU R                  US95        U R                  (       d  U $ [        $ )NAddrF   )	r   listtupleextendr   rH   r   r   rG   r    rM   s     r   __iadd__Patch.__iadd__X   sQ    edE]++KK##JudnnE$RS~~Kr   c                     U R                   R                  [        SU R                  US95        U R                  (       d  U $ [        $ )NSubrF   r   rH   r   r   rG   rS   s     r   __isub__Patch.__isub__a   4    
5$.. NO~~Kr   c                     U R                   R                  [        SU R                  US95        U R                  (       d  U $ [        $ )NMulrF   rX   rS   s     r   __imul__Patch.__imul__g   r[   r   c                     U R                   R                  [        SU R                  US95        U R                  (       d  U $ [        $ )NDivrF   rX   rS   s     r   __itruediv__Patch.__itruediv__m   r[   r   c                 R    U R                  US9  U R                  (       d  U $ [        $ )N)E)r)   r   rG   rS   s     r   __ior__Patch.__ior__s   s!    e~~Kr   c                     [        S5      e)Nz6Patch objects are write-only, you cannot iterate them.)r   r%   s    r   __iter__Patch.__iter__y   s    PQQr   c                 "    SU R                    S3$ )Nz!<write-only dash.Patch object at >)r   r%   s    r   __repr__Patch.__repr__|   s    24>>2B!DDr   c                 `    U R                   R                  [        SU R                  US95        g)z!Add the item to the end of a listAppendrF   Nr   rH   r   r   r0   s     r   rH   Patch.append   #    
8T^^4 PQr   c                 `    U R                   R                  [        SU R                  US95        g)z#Add the item to the start of a listPrependrF   Nrq   r0   s     r   prependPatch.prepend   s#    
9dnnD QRr   indexc           	      `    U R                   R                  [        SU R                  X!S95        g)z#Add the item at the index of a listInsert)r9   rx   Nrq   )r    rx   r-   s      r   insertPatch.insert   s&    xtI	
r   c                 b    U R                   R                  [        SU R                  5      5        g)zRemove all items in a listClearNrq   r%   s    r   clearPatch.clear   s!    
7DNN CDr   c                 b    U R                   R                  [        SU R                  5      5        g)z(Reversal of the order of items in a listReverseNrq   r%   s    r   reversePatch.reverse   s!    
9dnn EFr   c                     [        U[        [        45      (       d  [        U S35      eU R                  R                  [        SU R                  US95        g)z&Add all the items to the end of a listz should be a list or tupleExtendrF   N)r   rP   rQ   r   r   rH   r   r   r0   s     r   rR   Patch.extend   sG    $u..tf$>?@@
8T^^4 PQr   c                 `    U R                   R                  [        SU R                  US95        g)z-filter the item out of a list on the frontendRemoverF   Nrq   r0   s     r   removePatch.remove   rs   r   re   c                     U=(       d    0 nUR                  U5        U R                  R                  [        SU R                  US95        g)z9Merge a dict or keyword arguments with another dictionaryMergerF   N)r)   r   rH   r   r   )r    re   Fr9   s       r   r)   Patch.update   s7    RQ
7DNN% PQr   c                     [        S5      e)NzOsort is reserved for future use, use brackets to access this key on your object)KeyErrorr%   s    r   sort
Patch.sort   s    ]
 	
r   c                      SU R                   S.$ )N__dash_patch_update)r   
operations)r   r%   s    r   to_plotly_jsonPatch.to_plotly_json   s    #8**
 	
r   r   )NN)r.   Nr   )(__name__
__module____qualname____firstlineno____doc__r   r   _KeyTyper!   r&   r+   r1   r6   r   r>   rB   r<   rA   rT   rY   r^   rb   rf   ri   rm   rH   rv   intr{   r   r   r   rP   rQ   rR   r   r)   r   r   __static_attributes__r   r   r   r   r      s    .2$("4>*" !"!D DW D& &W &)x ) ) 
x 
 
Nx Nc c c g # S RER3 R4 RSC SD S
C 
s 
t 
EGR5u- R$ RR3 R4 RR RD R


 
r   r   N)typingr   r   r   r   r   objectrG   strr   r   r   r   r   r   r   <module>r      sA    - -G 	c?B B
]
 ]
r   