+
    M`p                        R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt ^ RIH	t	 ^ RIHtHt ^ t^t ^ RIHtHt RtRtRtR	t]P4                  R*8  d   ]]3t ! R
 R]4      t ! R R]4      t ! R R]4      t  ! R R]]!4      t"R t#]PH                  ! ]PJ                  ]#R7      t&R]3R lt']3R lt( ! R R])4      t* ! R R]*4      t+ ! R R]*4      t, ! R R]*4      t- ! R R ]*4      t. ! R! R"]*4      t/ ! R# R$]*4      t0 ! R% R&])4      t1 ! R' R(])4      t2R) t3R#   ]
 d    ]t	 ELi ; i  ]
 d    ^ RIHtHt ]t ELi ; i)+zApply JSON-Patches (RFC 6902) )unicode_literalsN)MappingProxyType)JsonPointerJsonPointerException)MutableMappingMutableSequenceu    Stefan Kögl <stefan@skoegl.net>z1.32z0https://github.com/stefankoegl/python-json-patchzModified BSD Licensec                       ] tR t^JtRtRtR# )JsonPatchExceptionzBase Json Patch exception N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       +/usr/lib/python3/dist-packages/jsonpatch.pyr	   r	   J       #r   r	   c                       ] tR t^NtRtRtR# )InvalidJsonPatchz+Raised if an invalid JSON Patch is created r
   Nr   r
   r   r   r   r   N   s    6r   r   c                       ] tR t^RtRtRtR# )JsonPatchConflictzRaised if patch could not be applied due to conflict situation such as:
- attempt to add object key when it already exists;
- attempt to operate with nonexistence object key;
- attempt to insert value to array at position beyond its size;
- etc.
r
   Nr   r
   r   r   r   r   R   s    r   r   c                       ] tR t^[tRtRtR# )JsonPatchTestFailedzA Test operation failed r
   Nr   r
   r   r   r   r   [   r   r   r   c                    \         P                  ! \        4      pV  F  w  r#W,          P                  V4       K  	  \	        R VP                  4        4       4      # )z'Convert duplicate keys values to lists.c              3   `   "   T F$  w  rT\        V4      ^8X  d
   V^ ,          MT3x  K&  	  R# 5i   N)len).0keyvaluess   &  r   	<genexpr>multidict.<locals>.<genexpr>f   s1       )KC 
3v;!+fQi8(s   ,.)collectionsdefaultdictlistappenddictitems)ordered_pairsmdictr!   values   &   r   	multidictr.   _   sT     ##D)E#

%  $   !;;=  r   )object_pairs_hookFc                    \        V\        4      '       d   \        P                  WR7      pM\        WR7      pVP	                  W4      # )aL  Apply list of patches to specified json document.

:param doc: Document object.
:type doc: dict

:param patch: JSON patch as list of dicts or raw JSON-encoded string.
:type patch: list or str

:param in_place: While :const:`True` patch will modify target document.
                 By default patch will be applied to document copy.
:type in_place: bool

:param pointer_cls: JSON pointer class to use.
:type pointer_cls: Type[JsonPointer]

:return: Patched document object.
:rtype: dict

>>> doc = {'foo': 'bar'}
>>> patch = [{'op': 'add', 'path': '/baz', 'value': 'qux'}]
>>> other = apply_patch(doc, patch)
>>> doc is not other
True
>>> other == {'foo': 'bar', 'baz': 'qux'}
True
>>> patch = [{'op': 'add', 'path': '/baz', 'value': 'qux'}]
>>> apply_patch(doc, patch, in_place=True) == {'foo': 'bar', 'baz': 'qux'}
True
>>> doc == other
True
pointer_cls)
isinstance
basestring	JsonPatchfrom_stringapply)docpatchin_placer2   s   &&&&r   apply_patchr;   r   s>    B %$$%%e%E%9;;s%%r   c                0    \         P                  WVR7      # )a  Generates patch by comparing two document objects. Actually is
a proxy to :meth:`JsonPatch.from_diff` method.

:param src: Data source document object.
:type src: dict

:param dst: Data source document object.
:type dst: dict

:param pointer_cls: JSON pointer class to use.
:type pointer_cls: Type[JsonPointer]

>>> src = {'foo': 'bar', 'numbers': [1, 3, 4, 8]}
>>> dst = {'baz': 'qux', 'numbers': [1, 4, 7]}
>>> patch = make_patch(src, dst)
>>> new = patch.apply(src)
>>> new == dst
True
r1   )r5   	from_diff)srcdstr2   s   &&&r   
make_patchr@      s    * s[AAr   c                      a  ] tR t^t o Rt]3R ltR tR tR t	R t
]R 4       t]R 4       t]P                  R	 4       tR
tV tR# )PatchOperationz'A single operation inside a JSON Patch.c                   W n         VP                  R 4      '       g   \        R4      h\        VR ,          V P                   4      '       d(   VR ,          P                  V n        VR ,          V n        M/VR ,          V n         V P                  V P
                  4      V n        Wn        R#   \         d   p\        R4      hRp?ii ; i)pathz#Operation must have a 'path' memberzInvalid 'path'N)	r2   __contains__r   r3   rD   locationpointer	TypeError	operation)selfrI   r2   exs   &&& r   __init__PatchOperation.__init__   s    &%%f--"#HIIi')9)9::%f-22DM$V,DL%f-DM9#//> #  9&'7889s    B* *C5C  Cc                    \        R4      h)zGAbstract method that applies a patch operation to the specified object.z%should implement the patch operation.)NotImplementedError)rJ   objs   &&r   r7   PatchOperation.apply   s    !"IJJr   c                Z    \        \        V P                  P                  4       4      4      # N)hash	frozensetrI   r*   rJ   s   &r   __hash__PatchOperation.__hash__   s    Idnn224566r   c                d    \        V\        4      '       g   R # V P                  VP                  8H  # F)r3   rB   rI   rJ   others   &&r   __eq__PatchOperation.__eq__   s%    %00~~00r   c                    W8X  * # rS   r
   r[   s   &&r   __ne__PatchOperation.__ne__       !!r   c                R    R P                  V P                  P                  RR 4      # )/N)joinrG   partsrV   s   &r   rD   PatchOperation.path   s"    xx**3B/00r   c                     \        V P                  P                  R,          4      #   \         d!    T P                  P                  R,          u # i ; i)r   re   )intrG   rg   
ValueErrorrV   s   &r   r!   PatchOperation.key   sE    	*t||))"-.. 	*<<%%b))	*s   %( (AAc                    \        V4      V P                  P                  R&   V P                  P                  V n        V P                  V P
                  R&   R# )r   rD   Nre   )strrG   rg   rD   rF   rI   )rJ   r-   s   &&r   r!   rl      s=    !$U2))!%vr   )rF   rI   rG   r2   N)r   r   r   r   r   r   rL   r7   rW   r]   r`   propertyrD   r!   setterr   __classdictcell____classdict__s   @r   rB   rB      se     1.9 #$K71
" 1 1 * * 	ZZ/ /r   rB   c                   6   a  ] tR t^t o RtR tR tR tRtV t	R# )RemoveOperationz/Removes an object property or an array element.c                    V P                   P                  V4      w  r# W# V#   \        \        3 d"   pR P	                  T4      p\        T4      hRp?ii ; i)z(can't remove a non-existent object '{0}'N)rG   to_lastKeyError
IndexErrorformatr   )rJ   rP   subobjpartrK   msgs   &&    r   r7   RemoveOperation.apply   s[    ||++C0	)
 
	 *% 	)<CCDIC#C((	)s   # AAAc                    V P                   V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   rD   r!   rJ   rD   r!   s   &&&r   _on_undo_removeRemoveOperation._on_undo_remove   s=    99xx3A 
 q
r   c                    V P                   V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   r   r   s   &&&r   _on_undo_addRemoveOperation._on_undo_add   =    99xx#~A 
 q
r   r
   N
r   r   r   r   r   r7   r   r   r   rq   rr   s   @r   ru   ru      s     9 r   ru   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )AddOperationi  z,Adds an object property or an array element.c                N    V P                   R ,          pT P                  P	                  T4      w  rE\        T\        4      '       dQ   TR8X  d   TP                  T4       T# T\        T4      8  g   T^ 8  d   \        R4      hTP                  YR4        T# \        T\        4      '       d   Tf   TpT# Y$T&    T# Tf$   \        RP                  \        T4      4      4      h\        RP                  T P                  T4      4      h  \         d   p\        R4      hRp?ii ; i)r-   /The operation does not contain a 'value' memberN-zcan't insert outside of listinvalid document type {0}2unable to fully resolve json pointer {0}, part {1})rI   rx   r   rG   rw   r3   r   r(   r   r   insertr   rH   rz   typerF   )rJ   rP   r-   rK   r{   r|   s   &&    r   r7   AddOperation.apply	  s#   	CNN7+E
 ||++C0fo..s{e$& 
# F#tax'(FGG d* 
 //| 
  %t 
	 | ; B B4< PQQ'(\(c(cdhdqdqsw(xyy5  	C"AC C	Cs   D	 	D$DD$c                    V P                   V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   r   r   s   &&&r   r   AddOperation._on_undo_remove)  r   r   c                    V P                   V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   r   r   s   &&&r   r   AddOperation._on_undo_add1  r   r   r
   Nr   rr   s   @r   r   r     s     6@ r   r   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )ReplaceOperationi:  z?Replaces an object property or an array element by a new value.c                X    V P                   R ,          pT P                  P	                  T4      w  rETf   T# TR8X  d   \        R4      h\        T\        4      '       d$   T\        T4      8  g   T^ 8  d   \        R4      hM\        T\        4      '       d$   YT9  d   RP                  T4      p\        T4      hMLTf$   \        RP                  \        T4      4      4      h\        RP                  T P                  T4      4      hY$T&   T#   \         d   p\        R4      hRp?ii ; i)	r-   r   Nr   z7'path' with '-' can't be applied to 'replace' operationzcan't replace outside of listz)can't replace a non-existent object '{0}'r   r   )rI   rx   r   rG   rw   r3   r   r   r   r   rz   rH   r   rF   )rJ   rP   r-   rK   r{   r|   r}   s   &&     r   r7   ReplaceOperation.apply=  s%   	CNN7+E
 ||++C0<L3;"#\]]fo..s6{"dQh'(GHH '/ //!AHHN',, " | ; B B4< PQQ'(\(c(cdhdqdqsw(xyyt
7  	C"AC C	Cs   D D)D$$D)c                    V# rS   r
   r   s   &&&r   r    ReplaceOperation._on_undo_remove]      
r   c                    V# rS   r
   r   s   &&&r   r   ReplaceOperation._on_undo_add`  r   r   r
   Nr   rr   s   @r   r   r   :  s     I@ r   r   c                   z   a  ] tR tRt o RtR t]R 4       t]R 4       t]P                  R 4       tR t
R tR	tV tR
# )MoveOperationid  z?Moves an object property or an array element to a new location.c                *    \        V P                  R ,          V P                  4      '       d   V P                  R ,          pM#V P                  V P                  R ,          4      p VP                  V4      w  rE WE,          pT P                  T8X  d   T# \        T\        4      '       d-   T P                  P                  T4      '       d   \        R4      h\        RRRT P                  R ,          /T P                  R7      P                  T4      p\        RRRT P                  R	T/T P                  R7      P                  T4      pT#   \         d   p\	        R4      hRp?ii ; i  \        \        3 d   p\        \        T4      4      hRp?ii ; i)
from.The operation does not contain a 'from' memberNz*Cannot move values into their own childrenopremoverD   r1   addr-   )r3   rI   r2   rx   r   rw   ry   r   rn   rG   r   containsru   r7   r   rF   rJ   rP   from_ptrrK   r{   r|   r-   s   &&     r   r7   MoveOperation.applyg  sv   	B$..0$2B2BCC>>&1++DNN6,BC
  '',	-LE
 <<8#Jfn--%%h//#$PQQ(DNN6*
 '') */s 	
 %DMMU
 ''	) */s	 	 
;  	B"@B B	B *% 	-#CG,,	-s6   A E
 "E
 :E( 
E%E  E%(F9FFc                    V P                  V P                  R ,          4      pRP                  VP                  RR 4      # )r   rd   Nre   )r2   rI   rf   rg   rJ   r   s   & r   	from_pathMoveOperation.from_path  s5    ##DNN6$:;xxs+,,r   c                    V P                  V P                  R ,          4      p \        VP                  R,          4      #   \         d    TP                  R,          u # i ; i)r   re   )r2   rI   rj   rg   rH   r   s   & r   from_keyMoveOperation.from_key  sR    ##DNN6$:;	&x~~b)** 	&>>"%%	&s   A   A! A!c                    V P                  V P                  R ,          4      p\        V4      VP                  R&   VP                  V P                  R &   R# )r   Nre   )r2   rI   rn   rg   rD   )rJ   r-   r   s   && r   r   r     s?    ##DNN6$:; Zr!)vr   c                   V P                   V8X  d5   V P                  V8  d   V ;P                  ^,          un        M	V^,          pV P                  V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   r   r   rD   r!   r   s   &&&r   r   MoveOperation._on_undo_remove  sl    >>T!}}#"q99xx#~A 
 q
r   c                   V P                   V8X  d5   V P                  V8  d   V ;P                  ^,          un        M	V^,          pV P                  V8X  d6   V P                  V8  d   V ;P                  ^,          un        V# V^,          pV# r   r   r   s   &&&r   r   MoveOperation._on_undo_add  sl    >>T!}}s""q99xx#~A 
 q
r   r
   N)r   r   r   r   r   r7   ro   r   r   rp   r   r   r   rq   rr   s   @r   r   r   d  s]     I#J - - & & __/ /
 r   r   c                   *   a  ] tR tRt o RtR tRtV tR# )TestOperationi  z!Test value by specified location.c           
         V P                   P                  V4      w  r#Vf   TpMV P                   P                  W#4      p  V P                  R,          pYF8w  d2   Rp\	        TP                  T\        T4      T\        T4      4      4      hT#   \         d   p\	        \        T4      4      hR p?ii ; i  \         d   p\        R4      hR p?ii ; i)Nr-   r   z0{0} ({1}) is not equal to tested value {2} ({3}))rG   rw   walkr   r   rn   rI   rx   r   rz   r   )rJ   rP   r{   r|   valrK   r-   r}   s   &&      r   r7   TestOperation.apply  s    	/<<//4LF|ll''5	CNN7+E
 <DC%cjjd3i16U'E F F 
 $ 	/%c"g..	/
  	C"AC C	Cs4   #B B B6 B3B..B36CCCr
   Nr   r   r   r   r   r7   r   rq   rr   s   @r   r   r     s     + r   r   c                   *   a  ] tR tRt o RtR tRtV tR# )CopyOperationi  z@Copies an object property or an array element to a new location c                    V P                  V P                  R ,          4      pTP	                  T4      w  rE \
        P                  ! YE,          4      p\        RRRT P                  RT/T P                   R7      P                  T4      pT#   \         d   p\        R4      hRp?ii ; i  \        \        3 d   p\        \        T4      4      hRp?ii ; i)r   r   Nr   r   rD   r-   r1   )r2   rI   rx   r   rw   copydeepcopyry   r   rn   r   rF   r7   r   s   &&     r   r7   CopyOperation.apply  s    	B''v(>?H
  '',	-MM&,/E %DMMU
 ''	) */s	 	 
!  	B"@B B	B *% 	-#CG,,	-s.   "B B* B'B""B'*C;CCr
   Nr   rr   s   @r   r   r     s     K r   r   c                     a  ] tR tRt o ]! ]P                  4      t]! ]4      t	]
! R]R]R]R]R]R]/4      t ]3R ltR	 tR
 t]tR tR tR tR t]R]3R l4       t]RR]3R l4       tRR lt]R 4       t RR lt!R t"Rt#V t$R# )r5   i  r   r   replacemovetestr   c                f    Wn         W n        V P                    F  pV P                  V4       K  	  R # rS   )r9   r2   _get_operation)rJ   r9   r2   r   s   &&& r   rL   JsonPatch.__init__(  s+    
& **B# r   c                "    V P                  4       # )zstr(self) -> self.to_string())	to_stringrV   s   &r   __str__JsonPatch.__str__3  s    ~~r   c                ,    \        V P                  4      # rS   )boolr9   rV   s   &r   __bool__JsonPatch.__bool__7      DJJr   c                ,    \        V P                  4      # rS   )iterr9   rV   s   &r   __iter__JsonPatch.__iter__<  r   r   c                >    \        \        V P                  4      4      # rS   )rT   tuple_opsrV   s   &r   rW   JsonPatch.__hash__?  s    E$))$%%r   c                d    \        V\        4      '       g   R # V P                  VP                  8H  # rZ   )r3   r5   r   r[   s   &&r   r]   JsonPatch.__eq__B  s%    %++yyEJJ&&r   c                    W8X  * # rS   r
   r[   s   &&r   r`   JsonPatch.__ne__G  rb   r   Nc                P    T;'       g    V P                   pV! V4      pV ! WSR7      # )a`  Creates JsonPatch instance from string source.

:param patch_str: JSON patch as raw string.
:type patch_str: str

:param loads: A function of one argument that loads a serialized
              JSON string.
:type loads: function

:param pointer_cls: JSON pointer class to use.
:type pointer_cls: Type[JsonPointer]

:return: :class:`JsonPatch` instance.
r1   )json_loader)cls	patch_strloadsr2   r   r9   s   &&&&  r   r6   JsonPatch.from_stringJ  s*      ..sI&522r   Tc                    T;'       g    V P                   p\        WWeR7      pVP                  RRW4       \        VP	                  4       4      pV ! WR7      # )a  Creates JsonPatch instance based on comparison of two document
objects. Json patch would be created for `src` argument against `dst`
one.

:param src: Data source document object.
:type src: dict

:param dst: Data source document object.
:type dst: dict

:param dumps: A function of one argument that produces a serialized
              JSON string.
:type dumps: function

:param pointer_cls: JSON pointer class to use.
:type pointer_cls: Type[JsonPointer]

:return: :class:`JsonPatch` instance.

>>> src = {'foo': 'bar', 'numbers': [1, 3, 4, 8]}
>>> dst = {'baz': 'qux', 'numbers': [1, 4, 7]}
>>> patch = JsonPatch.from_diff(src, dst)
>>> new = patch.apply(src)
>>> new == dst
True
r1    N)json_dumperDiffBuilder_compare_valuesr'   execute)	r   r>   r?   optimizationdumpsr2   r   builderopss	   &&&&&&   r   r=   JsonPatch.from_diff^  sO    > ..scMD#37??$%300r   c                R    T;'       g    V P                   pV! V P                  4      # )z!Returns patch set as JSON string.)r   r9   )rJ   r   r   s   && r   r   JsonPatch.to_string  s$    //t//4::&&r   c                T    \        \        V P                  V P                  4      4      # rS   )r   mapr   r9   rV   s   &r   r   JsonPatch._ops  s    S,,djj9::r   c                    V'       g   \         P                  ! V4      pV P                   F  pVP                  V4      pK  	  V# )zApplies the patch to a given object.

:param obj: Document object.
:type obj: dict

:param in_place: Tweaks the way how patch would be applied - directly to
                 specified `obj` or to its copy.
:type in_place: bool

:return: Modified `obj`.
)r   r   r   r7   )rJ   rP   r:   rI   s   &&& r   r7   JsonPatch.apply  s8     --$CI//#&C # 
r   c                   R V9  d   \        R4      hVR ,          p\        V\        4      '       g   \        R4      hW P                  9  d   \        RP	                  V4      4      hV P                  V,          pV! WP
                  R7      # )r   z&Operation does not contain 'op' memberzOperation must be a stringzUnknown operation {0!r}r1   )r   r3   r4   
operationsrz   r2   )rJ   rI   r   r   s   &&  r   r   JsonPatch._get_operation  sx    y "#KLLt_"j))"#?@@__$"#<#C#CB#GHHoob!9*:*:;;r   )r9   r2   rS   rZ   )%r   r   r   r   staticmethodjsonr   r   
_jsonloadsr   r   ru   r   r   r   r   r   r   r   rL   r   r   __nonzero__r   rW   r]   r`   classmethodr6   r=   r   ro   r   r7   r   r   rq   rr   s   @r   r5   r5     s     tzz*Kz*K!/|## J,Z +6 	$   K &'
" *.K 3 3& (,D#"1 "1H'
 ; ;*< <r   r5   c                      a  ] tR tRt o ]P
                  ]3R ltR tR t	R t
R tR tR tR	 tR
 tR tR tR tR tR tRtV tR# )r   i  c                z    W0n         W@n        / / .V n        . . .V n        . ;V n        pWn        W n        WUR .VR&   R # )NNNN)r   r2   index_storageindex_storage2_DiffBuilder__rootsrc_docdst_doc)rJ   r	  r
  r   r2   roots   &&&&& r   rL   DiffBuilder.__init__  sI    
& "X!2hdt$Qr   c                   V\        V4      3p V P                  V,          pVP                  V4      pVf   V.WT&   R # WT,          P                  V4       R #   \         d(    T P
                  T,          P                  YB34        R # i ; irS   )r   r  getr(   rH   r  )rJ   r-   indexst	typed_keystoragestoreds   &&&&   r   store_indexDiffBuilder.store_index  s~    DK(			?((,G[[+F~&+W""))%0 	?#**I+=>	?s   -A A .B	B	c                   V\        V4      3p V P                  V,          P                  V4      pV'       d   VP                  4       # R#   \         dl    T P
                  T,          p\        \        T4      ^,
          RR4       F3  pYV,          ^ ,          T8X  g   K  TP                  T4      ^,          u u # 	   R# i ; i)r   Nre   )r   r  r  poprH   r  ranger   )rJ   r-   r  r  r  r  is   &&&    r   
take_indexDiffBuilder.take_index  s    DK(			-''+//	:Fzz|#   	-))"-G3w<>2r2:a=I-";;q>!,, 3	-s   9A ACC;C Cc                V    V P                   pV^ ,          pW2V.;V^&   V^ &   V^ ,          # )    r  )rJ   r   r  lasts   &&  r   r   DiffBuilder.insert  s4    {{Aw!,,Q$q'Awr   c                *    Vw  r#pW2^&   W#^ &   . VR&   R# )r   r  Nr
   )rJ   r  	link_prev	link_next_s   &&   r   r   DiffBuilder.remove  s#    "'	a ! !ar   c              #  n   "   V P                   pV^,          pW2Jd   V^,          x  V^,          pK  R# 5ir   r  )rJ   startr  currs   &&  r   	iter_fromDiffBuilder.iter_from  s4     {{Qxq'M7D    35c              #  n   "   V P                   pV^,          pW!Jd   V^,          x  V^,          pK  R# 5ir   r  )rJ   r  r(  s   &  r   r   DiffBuilder.__iter__  s4     {{Awq'M7D r+  c           	   #    "   V P                   pV^,          pW!Jd   V^,          VJd   V^,          V^,          ^,          rCVP                  VP                  8X  d   \        V4      \        8X  dk   \        V4      \        8X  dW   \        RRRVP                  RVP                  R,          /V P                  R7      P                  x  V^,          ^,          pK  V^,          P                  x  V^,          pK  R# 5i)r   r   r   rD   r-   r1   N)r  rF   r   ru   r   r   rI   r2   )rJ   r  r(  op_first	op_seconds   &    r   r   DiffBuilder.execute  s     {{AwAwd"&*1gtAwqz)$$	(:(::X/9Y<7*i	 2 2!4!4W!=, $(#3#3	5 6?Y	?
  71:Dq'###7D s   C;C=c                   V P                  V\        4      pVe   V^,          p\        VP                  4      \        8X  dX   \        V4      \        8X  dD   V P                  V4       F.  pVP                  VP                  VP                  4      Vn        K0  	  V P                  V4       VP                  \        W4      8w  dD   \        RRRVP                  R\        W4      /V P                  R7      pV P                  V4       R # R # \        RRR\        W4      RV/V P                  R7      pV P                  V4      pV P                  W8\         4       R # )Nr   r   r   rD   r1   r   r-   )r  
_ST_REMOVEr   r!   rj   r)  r   rD   r   rF   
_path_joinr   r2   r   r   r  _ST_ADD)	rJ   rD   r!   itemr  r   vnew_op	new_indexs	   &&&&     r   _item_addedDiffBuilder._item_added  s   j1qBBFF|s"tCyC'7.A..rww?BF / KK{{j33&&BKKJt1(  $//	1
 F# 4 "e
4-#  ++	-F
 F+ITg6r   c           	        \        R RR\        W4      /V P                  R7      pV P                  V\        4      pV P                  V4      pVEe   V^,          pVP                  P                  V P                  4      ^ ,          p\        V4      \        8X  dD   V P                  V4       F.  p	V	P                  VP                  VP                  4      Vn        K0  	  V P                  V4       VP                   VP                   8w  d8   \#        R RRVP                   RVP                   /V P                  R7      pWF^&   R# V P                  V4       R# V P%                  W6\&        4       R# )r   r   rD   r1   Nr   r   )ru   r4  r2   r  r5  r   rG   rw   r
  r   r'   r)  r   rD   r!   r   rF   r   r  r3  )
rJ   rD   r!   r6  r8  r  r9  r   
added_itemr7  s
   &&&&      r   _item_removedDiffBuilder._item_removed  s+    (Jt)"
 '') g.KK'	qB
 ++DLL9!<JJ4'.A^^BGGRVV<BF / KK"++-&&FOOBKK(  $//	1
  &! I& Tj9r   c                p    V P                  \        R RR\        W4      RV/V P                  R7      4       R# )r   r   rD   r-   r1   N)r   r   r4  r2   )rJ   rD   r!   r6  s   &&&&r   _item_replacedDiffBuilder._item_replaced?  s:    $)Jt)T&
 ''	) 	*r   c                   \        VP                  4       4      p\        VP                  4       4      pWT,
          pWE,
          pV F%  pV P                  V\        V4      W(,          4       K'  	  V F%  pV P	                  V\        V4      W8,          4       K'  	  WE,           F"  pV P                  WW(,          W8,          4       K$  	  R # rS   )setkeysr>  rn   r:  r   )	rJ   rD   r>   r?   src_keysdst_keys
added_keysremoved_keysr!   s	   &&&&     r   _compare_dictsDiffBuilder._compare_dictsF  s    sxxz?sxxz?(
*CtSXsx8   CT3s8SX6  &&C  CHch? 'r   c                   \        V4      \        V4      rT\        WE4      p\        WE4      p\        V4       EF  pW8  d   W(,          W8,          rW8X  d   K!  \	        V	\
        4      '       d4   \	        V
\
        4      '       d   V P                  \        W4      W4       Kj  \	        V	\        4      '       d4   \	        V
\        4      '       d   V P                  \        W4      W4       K  V P                  WV	4       V P                  WV
4       K  WE8  d   V P                  WW(,          4       K  V P                  WW8,          4       EK  	  R # rS   )r   maxminr  r3   r   rJ  r4  r   _compare_listsr>  r:  )rJ   rD   r>   r?   len_srclen_dstmax_lenmin_lenr!   oldnews   &&&&       r   rO  DiffBuilder._compare_listsU  s    s8SXg'g'>C}8SXS:^44sN33''
4(=sH_55"388''
4(=sH &&t#6$$T4"""4#(;   CH5- "r   c                   \        V\        4      '       d4   \        V\        4      '       d   V P                  \        W4      W44       R # \        V\        4      '       d4   \        V\        4      '       d   V P                  \        W4      W44       R # V P                  V4      V P                  V4      8X  d   R # V P                  WV4       R # rS   )r3   r   rJ  r4  r   rO  r   rA  )rJ   rD   r!   r>   r?   s   &&&&&r   r   DiffBuilder._compare_valuesq  s    c>**3//
4 5s@_--300
4 5s@ ZZ_

3/ 3/r   )__rootr
  r   r  r  r2   r	  N)r   r   r   r   r   r   r   rL   r  r  r   r   r)  r   r   r:  r>  rA  rJ  rO  r   r   rq   rr   s   @r   r   r     s[     /3zz{ %?-(72:B*@680 0r   r   c                     Vf   V # V R,           \        V4      P                  RR4      P                  RR4      ,           # )Nrd   ~z~0z~1)rn   r   r   s   &&r   r4  r4    s9    
{#:C((d3;;CFFFr   )   r  )4r   
__future__r   r%   r   	functoolsr   systypesr   ImportErrorr)   jsonpointerr   r   r5  r3  collections.abcr   r   unicodern   
__author____version____website____license__version_infobytesr4   	Exceptionr	   r   r   AssertionErrorr   r.   partialr   r   r;   r@   objectrB   ru   r   r   r   r   r   r5   r   r4  r
   r   r   <module>ro     s  B & '     
&
 : 
? 0
@$ vJ$ $7) 7* $,n $  tzzYG
 &+ %&P &1 B03/V 3/ln <1> 1h'~ 'TSN SlN 6N 2@< @<FT0& T0nGy    ;
Cs"   D D) 	D&%D&)D>=D>