
    &g                       % S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
Jr  SSK
Jr  SSKJr  SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$  SSK%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-  SS	K.J/r/  SS
K0J1r1J2r2J3r3J4r4  SSK5J6r6J7r7J8r8J9r9J:r:  SSK;J<r<  SSK=J>r>  SSK?J@r@JArAJBrB  SSKCJDrD  SSKEJFrF  SSKGJHrH  SSKIJJrJ  SSKKJLrL  SSKMJNrNJOrO  SSKPJQrQ  SSKRJSrS  \(       a  SSKTJUrU  SSKVJWrWJXrX   SSKYJZrZ  Sr[/ SQr]Sr^Sr_Sr`S raS!rbS"rcS#rdS$reS%rfS&rgS'rhS(riS)rjS*rkS+rlS,rmS-rnS.roS/rpS0rqS1rr\R                  " S25      R                  ru\R                  " S35      R                  rw\R                  " S35      R                  rx\R                  " S45      R                  ry\R                  " S55      R                  rz\R                  " S65      R                  r{SS7 jr|SS8 jr}              SS9 jr~SS: jr              SS; jr              SS< jrSS= jr              SS> jr              SS? jr              SS@ jr              SSA jr              SSB jr              SSC jr              SSD jr              SSE jr              SSF jr              SSG jr              SSH jr              SSI jr              SSJ jr0 \" \^5      \_\" \_5      \_\" \`5      \_\" \a5      \_\" \b5      \_\" \c5      SK _\" \d5      \_\" \e5      \_\" \f5      \_\" \g5      SL _\" \h5      \_\" \i5      \_\" \j5      \_\" \k5      \_\" \l5      \_\" \m5      \~_\" \n5      \_\" \o5      \\" \p5      \\" \q5      SM \" \r5      SN 0ErSO\SP'   \[(       a   S             SSQ jjrO S             SSR jjr\!" SS\\\4   ST9r S             SSU jjr  S               SSV jjrSSW jr\[(       a  \ZGR0                  r\R                  " S25      GR2                  r\R                  " S35      GR2                  r\R                  " S45      GR2                  r\R                  " S55      GR2                  r\R                  " S65      GR2                  r\" SX \" SY5       5       5      rSSZ jrSS[ jrSS\ jrSS] jrSS^ jrSS_ jrSS` jrSSa jr          SSb jrSSc jrSSd jrSSe jrSSf jrSSg jrSSh jrSSi jrSSj jrSSk jrSSl jrSSm jrSSn jrSSo jrSSp jrSSq jrSSr jr0 \\_\\_\R                  \_\8\_\\_\\_\\_\\_\\_\\_\" S5      \_\	GR                  \_\,\_\D\_\/\_\<\_\F\_\H\\J\\L\\N\\O\\Q\\>\\R4                  \0Er0 r\ H&  r\" \Ss5      (       d  M  \\   \\GR                  '   M(     \" St \ 5       5      r  S             SSu jjrSSv jr S         SSw jjr\[(       a  \ZGR                  r\" Sx5      rS\14       SSy jjr\$SSSz jj5       r\$SS{ j5       r S     SS| jjrSS} jr\[(       a  \ZGR                  r\$SSS~ jj5       r\$      SS j5       r S     SS jjr        SS jrSS jr\[(       a  \ZGR                  rSS jr        SS jr\$SSS jj5       r\$SS j5       r S     SS jjr\$ S     SS jj5       r\$      SS j5       r S     SS jjrSS jr " S S\5      rSS jrSS jr\" \S5      (       a  \GR                  " \S9  gg! \\ a    Sr[ GNf = f)av  BSON (Binary JSON) encoding and decoding.

The mapping from Python types to BSON types is as follows:

=======================================  =============  ===================
Python Type                              BSON Type      Supported Direction
=======================================  =============  ===================
None                                     null           both
bool                                     boolean        both
int [#int]_                              int32 / int64  py -> bson
:class:`bson.int64.Int64`                int64          both
float                                    number (real)  both
str                                      string         both
list                                     array          both
dict                                     object         both
:class:`~bson.son.SON`                   object         both
:py:class:`~collections.abc.Mapping`     object         py -> bson
:class:`~bson.raw_bson.RawBSONDocument`  object         both [#raw]_
datetime.datetime [#dt]_ [#dt2]_         UTC datetime   both
:class:`~bson.datetime_ms.DatetimeMS`    UTC datetime   both [#dt3]_
:class:`~bson.regex.Regex`               regex          both
compiled re [#re]_                       regex          py -> bson
:class:`~bson.binary.Binary`             binary         both
:py:class:`uuid.UUID` [#uuid]_           binary         both
:class:`~bson.objectid.ObjectId`         oid            both
:class:`~bson.dbref.DBRef`               dbref          both
:class:`~bson.dbref.DBRef`               dbpointer      bson -> py
None                                     undefined      bson -> py
:class:`~bson.code.Code`                 code           both
str                                      symbol         bson -> py
bytes [#bytes]_                          binary         both
:class:`~bson.timestamp.Timestamp`       timestamp      both
:class:`~bson.decimal128.Decimal128`     decimal128     both
:class:`~bson.min_key.MinKey`            min key        both
:class:`~bson.max_key.MaxKey`            max key        both
=======================================  =============  ===================

.. [#int] A Python int will be saved as a BSON int32 or BSON int64 depending
   on its size. A BSON int32 will always decode to a Python int. A BSON
   int64 will always decode to a :class:`~bson.int64.Int64`.
.. [#raw] Decoding a bson object to :class:`~bson.raw_bson.RawBSONDocument` can be
   optionally configured via :attr:`~bson.codec_options.CodecOptions.document_class`.
.. [#dt] datetime.datetime instances are encoded with millisecond precision so
   the microsecond field is truncated.
.. [#dt2] all datetime.datetime instances are encoded as UTC. By default, they
   are decoded as *naive* but timezone aware datetimes are also supported.
   See :doc:`/examples/datetimes` for examples.
.. [#dt3] To enable decoding a bson UTC datetime to a :class:`~bson.datetime_ms.DatetimeMS`
   instance see :ref:`handling-out-of-range-datetimes`.
.. [#uuid] For :py:class:`uuid.UUID` encoding and decoding behavior see :doc:`/examples/uuid`.
.. [#re] :class:`~bson.regex.Regex` instances and regular expression
   objects from ``re.compile()`` are both saved as BSON regular expressions.
   BSON regular expressions are decoded as :class:`~bson.regex.Regex`
   instances.
.. [#bytes] The bytes type is encoded as BSON binary with
   subtype 0. It will be decoded back to bytes.
    )annotationsN)utf_8_decode)utf_8_encode)abc)IOTYPE_CHECKINGAnyBinaryIOCallable	GeneratorIteratorMappingMutableMappingNoReturnOptionalSequenceTupleTypeTypeVarUnioncastoverload)ALL_UUID_SUBTYPESCSHARP_LEGACYJAVA_LEGACYOLD_UUID_SUBTYPESTANDARDUUID_SUBTYPEBinaryUuidRepresentation)Code)DEFAULT_CODEC_OPTIONSCodecOptionsDatetimeConversion_raw_document_class)EPOCH_AWAREEPOCH_NAIVE
DatetimeMS_datetime_to_millis_millis_to_datetime)DBRef)
Decimal128)InvalidBSONInvalidDocumentInvalidStringData)Int64MaxKeyMinKeyObjectId)Regex)RE_TYPESON)	Timestamp)utcRawBSONDocument)_DocumentType_ReadableBuffer)_cbsonTF)<r   r   r   r   r   r   r   r    r!   r"   r#   r+   r,   r-   r.   r/   r0   r2   r4   r6   r7   r8   r9   r:   r;   r&   r'   BSONNUMBSONSTRBSONOBJBSONARRBSONBINBSONUNDBSONOIDBSONBOOBSONDATBSONNULBSONRGXBSONREFBSONCODBSONSYMBSONCWSBSONINTBSONTIMBSONLONBSONDECBSONMINBSONMAXget_data_and_viewgen_list_nameencodedecode
decode_alldecode_iterdecode_file_iteris_validBSONhas_cr$   r(                              	   
                                 z<dz<iz<iBz<qz<IIc                    [        U [        [        45      (       a  U [        U 5      4$ [        U 5      nUR	                  5       U4$ N)
isinstancebytes	bytearray
memoryviewtobytes)dataviews     RC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\bson/__init__.pyrV   rV      s?    $	*++Z%%%dD<<>4    c                f    [        SR                  [        U 5      R                  5       U5      5      e)zUnknown type helper.z\Detected unknown BSON type {!r} for fieldname '{}'. Are you using the latest driver version?)r-   formatchrrX   )element_typeelement_names     r~   _raise_unknown_typer      s/    
	//5vc,6G6N6N6PR^/_ r   c                (    [        X5      S   US-   4$ )z"Decode a BSON int32 to python int.r      )_UNPACK_INT_FROMr|   _viewpositiondummy0dummy1dummy2s         r~   _get_intr     s     D+A.1<<r   c                h    U R                  SU5      n[        XU UR                  S5      S   US-   4$ )z'Decode a BSON 'C' string to python str.    Tr      )index_utf_8_decodeunicode_decode_error_handler)r|   r}   r   optsends        r~   _get_c_stringr     s?    
**Wh
'Cs+T-N-NPTUVWXZ]`aZaaar   c                (    [        X5      S   US-   4$ )z%Decode a BSON double to python float.r      )_UNPACK_FLOAT_FROMr   s         r~   
_get_floatr     s     d-a0(Q,>>r   c                    [        X5      S   nUS-  nUS:  d  X2-
  U:  a  [        S5      eX&-   S-
  nX   S:w  a  [        S5      e[        XU UR                  S5      S   US-   4$ )z#Decode a BSON string to python str.r   r   r   zinvalid string lengthzinvalid end of stringT)r   r-   r   r   )r|   r}   r   obj_endr   dummylengthr   s           r~   _get_stringr     s     d-a0FMHzW'&0122

a
CyA~122s+T-N-NPTUVWXZ]`aZaaar   c                    [        X5      S   nX-   S-
  nXR:  a  [        S5      eX   S:w  a  [        S5      eUS:X  a  X2:w  a  [        S5      eX54$ ! [        R                   a  n[        [	        U5      5      SeSnAff = f)z+Validate and return a BSON document's size.r   Nr   zinvalid object lengthbad eoo)r   structerrorr-   str)r|   r   r   obj_sizeexcr   s         r~   _get_object_sizer   (  s    .#D3A6 

!C
~122yA~)$$1},122= << .#c(#-.s   A B'A<<Bc                   [        XU5      u  pg[        UR                  5      (       a  UR                  XUS-    U5      X&-   4$ [        XUS-   Xt5      nX&-  n[	        UR                  S5      [        5      (       at  SU;   an  [	        UR                  S5      [        [        S5      45      (       a?  [        UR                  S5      UR                  SS5      UR                  SS5      U5      U4$ X4$ )zEDecode a BSON subdocument to opts.document_class or bson.dbref.DBRef.r   r   z$refz$idz$dbN)
r   r%   document_class_elements_to_dictrw   getr   typer+   pop)	r|   r}   r   r   r   r   r   r   objs	            r~   _get_objectr   9  s     %TW=MH4..//##DC!G$<dCXEXYY
D1c
@CH 	3776?C((SLswwu~T$Z'899cggfoswwud';SWWUD=QSVWYabb=r   c                   [        X5      S   nX&-   S-
  nX   S:w  a  [        S5      eUS-  nUS-  n/ nUR                  n	U R                  n
[        nUR
                  R                  nX':  aZ  X   nU
" SU5      S-   n X   " XX#XE5      u  pU(       a%  UR                  [        W5      5      nUb  U" U5      nU	" W5        X':  a  MZ  X'S-   :w  a  [        S5      eXS-   4$ ! [         a    [        X5         Nkf = f)z#Decode a BSON array to python list.r   r   r   r   r   zbad array length)r   r-   appendr   _ELEMENT_GETTERtype_registry_decoder_mapKeyErrorr   r   r   )r|   r}   r   r   r   r   sizer   resultr   r   getterdecoder_mapr   valuecustom_decoders                   r~   
_get_arrayr   N  s    D+A.D
/A
CyA~)$$MH1HCF ]]FJJEF$$11K
.~(+a/	<$2HtOE (__T%[9N)&u-u! .$ 7,--a<  	<;	<s   ?C! !C98C9c                   [        X5      u  pgUS-  nUS:X  a(  [        X5      S   nUS-  nXS-
  :w  a  [        S5      eUnX&-   n	US:  d  X:  a  [        S5      eU[        ;   al  UR                  n
[        XU	 U5      nU
[        R                  :X  d(  U[        :X  a
  U
[        :w  d  U[        :X  a  U
[        :X  a  X4$ UR                  U
5      U	4$ US:X  a  XU	 nX4$ [        XU	 U5      nX4$ )z:Decode a BSON binary to bson.binary.Binary or python UUID.      r   r   z,invalid binary (st 2) - lengths don't match!zbad binary object length)_UNPACK_LENGTH_SUBTYPE_FROMr   r-   r   uuid_representationr   r    UNSPECIFIEDr   r   r   as_uuid)r|   r   r   r   r   r   r   subtypelength2r   uuid_repbinary_valuer   s                r~   _get_binaryr   x  s    2$AOFMH!|"4215Aqj LMM

CzS]455 ##++dC0':+777<'H,@++H0D$$##H-s22 !|c" : tS)73:r   c                *    US-   n[        XU 5      U4$ )z1Decode a BSON ObjectId to bson.objectid.ObjectId.   r5   r|   r   r   r   r   r   r   s          r~   _get_oidr     s"     R-CD#&',,r   c                X    US-   nXU nUS:X  a  SU4$ US:X  a  SU4$ [        SU-  5      e)z.Decode a BSON true/false to python True/False.r   r   Fr`   Tzinvalid boolean value: %r)r-   )r|   r   r   r   r   r   r   boolean_bytes           r~   _get_booleanr     sL     Q,C%Lwcz		 Sy
1L@
AAr   c                <    [        [        X5      S   U5      US-   4$ )z3Decode a BSON datetime to python datetime.datetime.r   r   )r*   _UNPACK_LONG_FROM)r|   r   r   r   r   r   s         r~   	_get_dater     s&     0@CTJHWXLXXr   c                :    [        XX#XE5      u  pb[        U5      U4$ )z%Decode a BSON code to bson.code.Code.)r   r!   )r|   r}   r   r   r   r   codes          r~   	_get_coder     s#     !XSND:xr   c                    U[        X5      S   -   n[        XUS-   XdU5      u  pr[        XX&XE5      u  pX&:w  a  [        S5      e[	        Xx5      U4$ )z-Decode a BSON code_w_scope to bson.code.Code.r   r   z+scope outside of javascript code boundaries)r   r   r   r-   r!   )	r|   r}   r   _obj_endr   r   code_endr   scopes	            r~   _get_code_w_scoper     sa     *4:1==H X\8<XND!$h$UOEGHHh&&r   c                V    [        XX$5      u  pb[        XX$5      u  pr[        Xg5      nX4$ )zCDecode a BSON regex to bson.regex.Regex or a python pattern object.)r   r7   )	r|   r}   r   r   r   r   pattern
bson_flagsbson_res	            r~   
_get_regexr     s5     &d(AG(XDJG(Gr   c                X    [        XX#XE5      u  pb[        XX#XE5      u  pr[        Xg5      U4$ )z7Decode (deprecated) BSON DBPointer to bson.dbref.DBRef.)r   r   r+   )r|   r}   r   r   r   r   
collectionoids           r~   _get_refr     s5     't8dYJTDOMC!8++r   c                <    [        X5      u  pg[        Xv5      US-   4$ )z4Decode a BSON timestamp to bson.timestamp.Timestamp.r   )_UNPACK_TIMESTAMP_FROMr:   )r|   r   r   r   r   r   inc	timestamps           r~   _get_timestampr     s$     ,D;NCY$hl22r   c                :    [        [        X5      S   5      US-   4$ )z(Decode a BSON int64 to bson.int64.Int64.r   r   )r0   r   r   s         r~   
_get_int64r     s#     "421561DDr   c                @    US-   n[         R                  " XU 5      U4$ )z7Decode a BSON decimal128 to bson.decimal128.Decimal128.   )r,   from_bidr   s          r~   _get_decimal128r     s(     R-CtS12C77r   c                
    S U4$ rv    uvwxyzs         r~   <lambda>r         D!9r   c                
    S U4$ rv   r   r   s         r~   r   r     r   r   c                    [        5       U4$ rv   r3   r   s         r~   r   r     
    FHa=r   c                    [        5       U4$ rv   r1   r   s         r~   r   r     r   r   z)dict[int, Callable[..., Tuple[Any, int]]]r   c           
     F    [        S[        R                  " XX4U5      5      $ )NTuple[str, Any, int])r   r@   _element_to_dict)r|   r}   r   r   r   	raw_arrays         r~   r  r    s&     "##DG9M
 	
r   c                   X   nUS-  n[        XX$5      u  prU(       a6  U[        [        5      :X  a#  [        X[	        U 5      5      u  pXqX)S-    U	S-   4$  [
        U   " XX#XG5      u  pUR                  R                  (       a9  UR                  R                  R                  [        W
5      5      nUb  U" U
5      n
UW
U4$ ! [         a    [        Xg5         Npf = f)z Decode a single key, value pair.r   )r   ordrD   r   lenr   r   r   r   r   r   r   )r|   r}   r   r   r   r  r   r   _r   r   r   s               r~   r  r  '  s     ~A!.t8!JW5%dc$i@FAhq!937BB	<-l;HtOE **!//<<@@eMN)&u-UH,,  	<;	<s   C CC_T)boundc                P    [        U 5      u  p[        [        [        XXX4US95      $ )Nr  )rV   r   r  r   )r|   r   r   r   r   r  r}   s          r~   _raw_to_dictr  H  s/     #4(JD
d(TU^_ r   c           	         Uc  UR                  5       nUS-
  nX':  a  [        XX#XFS9u  pnXU'   X':  a  M  X#:w  a  [        S5      eU$ )z#Decode a BSON document into result.r   r  bad object or element length)r   r  r-   )
r|   r}   r   r   r   r   r  r   keyr   s
             r~   r   r   V  sd     ~$$&
A+C
./4 
H s	 .
 899Mr   c           
     z   [        U 5      u  p [        UR                  5      (       a  UR                  X5      $ [        U S[	        U 5      5      u  p4[        S[        XSXA5      5      $ ! [         a    e [         a=    [        R                  " 5       u  p5n[        [        U5      5      R                  U5      Sef = f)z'Decode a BSON string to document_class.r   r>   r   N)rV   r%   r   r   r  r   r   r-   	Exceptionsysexc_infor   with_traceback)r|   r   r}   r  r   	exc_valueexc_tbs          r~   _bson_to_dictr  m  s    "4(JD
Kt2233&&t22!$3t95O%6t1c%PQQ  K"||~f#i.)88@dJKs   *A) .A) )AB:c              #  \   #    U  H"  n[        U5      S -   R                  S5      v   M$     g7f) utf8N)r   rX   ).0is     r~   	<genexpr>r    s&     JkSVf_,,V44ks   *,  c               #     #    [          Sh  vN   [        R                  " S5      n  [        [	        U 5      5      S-   R                  S5      v   M*   NE7f)zGenerate "keys" for encoded lists in the sequence
b"0 ", b"1 ", b"2 ", ...

The first 1000 keys are returned from a pre-built cache. All
subsequent keys are generated on the fly.
Nr  r  r  )_LIST_NAMES	itertoolscountr   nextrX   )counters    r~   rW   rW     sJ      ood#G
4=!F*226::  s   
AAAAc                    [        U [        5      (       a$  SU ;   a  [        S5      e [        U SS5        U S-   $ SU ;   a  [        S5      e[        U 5      S   S-   $ ! [         a    [        SU -  5      Sef = f)z8Make a 'C' string, checking for embedded NUL characters.r   z;BSON keys / regex patterns must not contain a NUL characterNT,strings in documents must be valid UTF-8: %rr  r   )rw   rx   r.   r   UnicodeErrorr/   _utf_8_encodestrings    r~   _make_c_string_checkr+    s    &%  f!"_``	&$-G## V!"_``V$Q''11  	#>G	s   A A6c                    [        U [        5      (       a   [        U SS5        U S-   $ [        U 5      S   S-   $ ! [         a    [	        SU -  5      Sef = f)zMake a 'C' string.NTr   r&  r   )rw   rx   r   r'  r/   r(  r)  s    r~   _make_c_stringr-    sk    &%  	&$-G## V$Q''11  	#>G	s	   : Ac                F    SU ;   a  [        S5      e[        U 5      S   S-   $ )z*Make a 'C' string suitable for a BSON key.r  z*BSON keys must not contain a NUL characterr   r   )r.   r(  r)  s    r~   
_make_namer/    s+    JKK #g--r   c                $    SU -   [        U5      -   $ )zEncode a float.r`   )_PACK_FLOATnamer   r   r   s       r~   _encode_floatr4    s    T>K...r   c                B    SU -   [        [        U5      5      -   S-   U-   $ )zEncode a python bytes.rd   r   )	_PACK_INTr  r2  s       r~   _encode_bytesr7    s&     T>Ic%j11G;eCCr   c                0   [        U5      (       a   SU -   [        [        UR                  5      -   $ SR	                  UR                  5        VVs/ s H  u  pE[        XEX#5      PM     snn5      nSU -   [        [        U5      S-   5      -   U-   S-   $ s  snnf )zEncode a mapping type.rb   r   r   r   )	r%   r   rx   rawjoinitems_element_to_bsonr6  r  )r3  r   
check_keysr   r  valr|   s          r~   _encode_mappingr?    s    5!!~UEII 66688RWR]R]R_`R_hc%c
AR_`aDT>Ic$i!m44t;gEE as   B
c                   [        SU -   S-   5      n[        U5      S-
  nU[        SUR                  X#5      -  nU[        SUR                  X#5      -  nUR
                  b  U[        SUR
                  X#5      -  nUR                  R                  5        H  u  pgU[        XgX#5      -  nM     US-  n[        [        U5      U-
  5      XEUS-   & [        U5      $ )zEncode bson.dbref.DBRef.rb   s       r   s   $ref s   $id s   $db r   )ry   r  _name_value_to_bsonr   iddatabase_DBRef__kwargsr;  r<  r6  rx   )r3  r   r=  r   bufbeginr  r>  s           r~   _encode_dbrefrG    s    
GdN%88
9CHqLE{E,<,<jOOCz588ZFFC~~!":u~~zPP((..0*;; 1 7NC&s3x%'78C	:r   c                    [        5       nSR                  U Vs/ s H  n[        [        U5      XRU5      PM     sn5      nSU -   [	        [        U5      S-   5      -   U-   S-   $ s  snf )zEncode a list/tuple.r   rc   r   r   )rW   r:  rA  r#  r6  r  )r3  r   r=  r   lnameitemr|   s          r~   _encode_listrK    sf     OE88Z_`Z_RV(edMZ_`aDT>Ic$i!m44t;gEE as    A$c                d    [        U5      S   nSU -   [        [        U5      S-   5      -   U-   S-   $ )zEncode a python str.r   ra   r   r   )r(  r6  r  )r3  r   r   r   bvalues        r~   _encode_textrN    s7    5!!$FT>Ic&kAo66?'IIr   c                    UR                   nUS:X  a  [        [        U5      5      U-   nSU -   [        [        U5      U5      -   U-   $ )zEncode bson.binary.Binary.r   rd   )r   r6  r  _PACK_LENGTH_SUBTYPE)r3  r   r   r   r   s        r~   _encode_binaryrQ    sE    mmG!|#e*%-T>0UWEEMMr   c                Z    UR                   n[        R                  " XS9n[        XX#5      $ )zEncode uuid.UUID.)r   )r   r   	from_uuidrQ  )r3  r   r   r   r   binvals         r~   _encode_uuidrU    s+    22eMF$44r   c                &    SU -   UR                   -   $ )zEncode bson.objectid.ObjectId.rf   )binary)r3  r   r   r   s       r~   _encode_objectidrX     s    T>ELL((r   c                6    SU -   U=(       a    S=(       d    S-   $ )z%Encode a python boolean (True/False).rg   r`   r   r   r2  s       r~   _encode_boolrZ    s    T>U.w9'::r   c                :    [        U5      nSU -   [        U5      -   $ zEncode datetime.datetime.rh   )r)   
_PACK_LONGr3  r   r   r   milliss        r~   _encode_datetimer`  
  s      'FT>Jv...r   c                :    [        U5      nSU -   [        U5      -   $ r\  )intr]  r^  s        r~   _encode_datetime_msrc    s    ZFT>Jv...r   c                    SU -   $ )zEncode python None.ri   r   r3  r   r   r   s       r~   _encode_nonerf        T>r   c                l   UR                   nU[        R                  :X  a  SU -   [        UR                  5      -   S-   $ US:X  a  SU -   [        UR                  5      -   S-   $ SnU[        R
                  -  (       a  US-  nU[        R                  -  (       a  US-  nU[        R                  -  (       a  US-  nU[        R                  -  (       a  US	-  nU[        R                  -  (       a  US
-  nU[        R                  -  (       a  US-  nUS-  nSU -   [        UR                  5      -   U-   $ )z*Encode a python regex or bson.regex.Regex.rj   s   u r   r   r      i   l   m   s   u   x)
flagsreUNICODEr+  r   
IGNORECASELOCALE	MULTILINEDOTALLVERBOSE)r3  r   r   r   ro  sflagss         r~   _encode_regexrx    s   KKE

~ 4U]] CChNN	!~ 4U]] CCgMM2== dNF299dNF2<<dNF299dNF2::dNF2::dNF'~ 4U]] CCfLLr   c                   [        U5      n[        U5      nUR                  c  SU -   [        U5      -   U-   $ [	        UR                  SUS5      n[        SU-   [        U5      -   5      nSU -   U-   [        U5      -   U-   U-   $ )zEncode bson.code.Code.rl   Fr   rn   )r-  r  r   r6  _dict_to_bson)r3  r   r   r   cstringcstrlenr   full_lengths           r~   _encode_coder~  5  s    U#G'lG{{~	' 22W<<%++udE:EAK#e*45KT>K')G*<<wFNNr   c                    SUs=::  a  S::  a  O  OSU -   [        U5      -   $  SU -   [        U5      -   $ ! [        R                   a    [	        S5      Sef = f)zEncode a python int.i   iro   rq   &BSON can only handle up to 8-byte intsN)r6  r]  r   r   OverflowErrorr2  s       r~   _encode_intr  @  s`    e)z)~	% 000	TT>Ju$555|| 	T HItS	Ts	   4 !Ac                N    SU -   [        UR                  UR                  5      -   $ )z Encode bson.timestamp.Timestamp.rp   )_PACK_TIMESTAMPr   timer2  s       r~   _encode_timestampr  K  s     T>OEIIuzzBBBr   c                n     SU -   [        U5      -   $ ! [        R                   a    [        S5      Sef = f)zEncode a bson.int64.Int64.rq   r  N)r]  r   r   r  r2  s       r~   _encode_longr  P  s?    P~
5 111<< PDE4OPs    !4c                &    SU -   UR                   -   $ )z"Encode bson.decimal128.Decimal128.rr   )bidr2  s       r~   _encode_decimal128r  X  s    T>EII%%r   c                    SU -   $ )zEncode bson.min_key.MinKey.rs   r   re  s       r~   _encode_minkeyr  ]  rg  r   c                    SU -   $ )zEncode bson.max_key.MaxKey.rt   r   re  s       r~   _encode_maxkeyr  b  rg  r   _type_markerc              #  $   #    U  H  ov   M     g 7frv   r   )r  ts     r~   r  r    s     -9a9s   c                ^   Sn [         [        U5         " XX#5      $ ! [         a     O'[         a    [	        U[
        5      (       d  e Sn Of = f[        USS5      n[	        U[
        5      (       a.  U[        ;   a$  [        U   nU[         [        U5      '   U" XX#5      $ U(       d]  UR                  R                  (       aB  UR                  R                  R                  [        U5      5      n	U	b  [        X	" U5      X#SS9$ [         HB  n
U(       a  M  [	        X5      (       d  M  [         U
   nU[         [        U5      '   U" XX#5      s  $    UR                  R                  nU(       d  Ub  [        X" U5      X#SS9$ U(       a  [        S5      e[        SU< S	[        U5      < 35      e)
z!Encode a single name, value pair.FTr  N)in_custom_call)in_fallback_callr  zcannot encode object: z, of type: )	_ENCODERSr   r   r  rw   rb  getattr_MARKERSr   _encoder_mapr   rA  _BUILT_IN_TYPES_fallback_encoderr.   )r3  r   r=  r   r  r  was_integer_overflowmarkerfunccustom_encoderbasefallback_encoders               r~   rA  rA    s    !	$e%d:DD  $%%%  $$ UND1F&#6X#5!%	$u+D22 d00==++88<<T%[I%&nU+Zd   ##
5(?(?T?D%)Id5k"Z66   ));; 0 <""5):d
 	
 DEE
25);tE{oV
WWs    
A!AAc                    [        U [        5      (       d  [        SU < 35      eU(       a<  U R                  S5      (       a  [        SU < S35      eSU ;   a  [        SU < S35      e[	        U 5      n[        XAX#5      $ )z Encode a single key, value pair.z.documents must have only string keys, key was $zkey z must not start with '$'.z must not contain '.')rw   r   r.   
startswithr/  rA  )r  r   r=  r   r3  s        r~   r<  r<    s{    c3 NsgVWW>>#!D/G"HII#:!D/D"EFFc?DtJ==r   c           	        [        U 5      (       a  [        [        U R                  5      $  / nU(       a%  SU ;   a  UR	                  [        SU S   X5      5        U R                  5        H0  u  pVU(       a  US:w  d  M   UR	                  [        XVX5      5        M2     SR                  U5      n[        [        U5      S-   5      U-   S	-   $ ! [         a  n[        SU  SU 35      UeSnAff = f! [         a    [        SU < 35      Sef = f)
zEncode a document to BSON._ids   _id zInvalid document z | Nz)encoder expected a mapping type but got: r   r   r   )r%   r   rx   r9  r   rA  r;  r<  r.   AttributeError	TypeErrorr:  r6  r  )	docr=  r   	top_levelelementsr  r   errencodeds	            r~   rz  rz    s    3E377##W#OO/
CJ
YZ))+JCuVOO$4S$RS & hhx GS\A%&07:: ' V),=cU#cU*KLRUUV WCC7KLRVVWs0   AC0 ?CC0 
C-C((C--C0 0Dz1codec_options must be an instance of CodecOptionsc                P    [        U[        5      (       d  [        e[        XU5      $ )aV  Encode a document to BSON.

A document can be any mapping type (like :class:`dict`).

Raises :class:`TypeError` if `document` is not a mapping type,
or contains keys that are not instances of :class:`str`. Raises
:class:`~bson.errors.InvalidDocument` if `document` cannot be
converted to :class:`BSON`.

:param document: mapping type representing a document
:param check_keys: check if keys start with '$' or
    contain '.', raising :class:`~bson.errors.InvalidDocument` in
    either case
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionadded:: 3.9
)rw   r#   _CODEC_OPTIONS_TYPE_ERRORrz  )documentr=  codec_optionss      r~   rX   rX     s$    . m\22''}==r   c                    g rv   r   r|   r  s     r~   rY   rY          r   c                    g rv   r   r  s     r~   rY   rY   %  r  r   c                    U=(       d    [         n[        U[        5      (       d  [        e[	        S[        X5      5      $ )aG  Decode BSON to a document.

By default, returns a BSON document represented as a Python
:class:`dict`. To use a different :class:`MutableMapping` class,
configure a :class:`~bson.codec_options.CodecOptions`::

    >>> import collections  # From Python standard library.
    >>> import bson
    >>> from bson.codec_options import CodecOptions
    >>> data = bson.encode({'a': 1})
    >>> decoded_doc = bson.decode(data)
    <type 'dict'>
    >>> options = CodecOptions(document_class=collections.OrderedDict)
    >>> decoded_doc = bson.decode(data, codec_options=options)
    >>> type(decoded_doc)
    <class 'collections.OrderedDict'>

:param data: the BSON to decode. Any bytes-like object that implements
    the buffer protocol.
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionadded:: 3.9
$Union[dict[str, Any], _DocumentType])r"   rw   r#   r  r   r  )r|   r  r   s      r~   rY   rY   *  s5    6 ,D/DDdL))''6d8QRRr   c           	     L   [        U 5      u  p[        U 5      n/ nSnUS-
  n[        UR                  5      n XV:  a  [	        X5      S   nX5-
  U:  a  [        S5      eXX-   S-
  n	X	   S:w  a  [        S5      eU(       a'  UR                  UR                  XU	S-    U5      5        OUR                  [        XUS-   X5      5        XX-  nXV:  a  M  U$ ! [
         a    e [         a=    [        R                  " 5       u  pn[        [        U5      5      R                  U5      Sef = f)z)Decode a BSON data to multiple documents.r   r   zinvalid object sizer   r   N)rV   r  r%   r   r   r-   r   r   r  r  r  r   r  )r|   r   r}   data_lendocsr   r   use_rawr   r   r  r  r  s                r~   _decode_allr  L  s*   "4(JD4yH "DH
Q,C!$"5"56GKn'7:H"X-!"788)A-G}!!),,D//!0LdST-d(Q,VW H n   K"||~f#i.)88@dJKs   BC C AD#c                    g rv   r   r  s     r~   rZ   rZ   n  r  r   c                    g rv   r   r  s     r~   rZ   rZ   s       r   c                t    Uc  [        U [        5      $ [        U[        5      (       d  [        e[        X5      $ )a  Decode BSON data to multiple documents.

`data` must be a bytes-like object implementing the buffer protocol that
provides concatenated, valid, BSON-encoded documents.

:param data: BSON data
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionchanged:: 3.9
   Supports bytes-like objects that implement the buffer protocol.

.. versionchanged:: 3.0
   Removed `compile_re` option: PyMongo now always represents BSON regular
   expressions as :class:`~bson.regex.Regex` objects. Use
   :meth:`~bson.regex.Regex.try_compile` to attempt to convert from a
   BSON regular expression to a Python regular expression object.

   Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
   `codec_options`.
)r  r"   rw   r#   r  r  s     r~   rZ   rZ   z  s6    0 4!677m\22''t++r   c                   [        UR                  5      (       a  0 nOUR                  5       nU R                  5        HF  u  pEXA;   a8  X   S:X  a  [        U R                  U5      U   X4'   M/  [        XQU   U5      X4'   MB  XSU'   MH     U$ )Nr   )r%   r   r;  r  r9  _decode_selective)rawdocfieldsr  r  r  r   s         r~   r  r    s     =7788   **,lln
={a(]CCH,#; H % Jr   c                J   Sn[        U 5      n[        X![        U5      5      u  p4US-  n/ nUR                  nXS-
  :  aD  X!   S:w  a  US-  nX!   S:w  a  M  US-  n[        X!U5      u  psU" X!X-    5        X-  nXS-
  :  a  MD  X:w  a  [	        S5      eSR                  U5      $ )Nr   r   r   r  r   )rz   r   r  r   r-   r:  )r|   r   r}   r  r   buffersr   r   s           r~   _array_of_documents_to_bufferr    s    HdDdc$i8FAMH "G^^F
1W
n!MH n!A&ts;tx234 1W
 89988Gr   c                    U R                  S5      nU(       d  gS H:  nUR                  U5      nU(       d  M  [        U5      nU(       a  U/X'   M6  / X'   M<     g)z=Convert raw array of documents to a stream of BSON documents.cursorN)
firstBatch	nextBatch)r   r  )r  r  r  batchr|   s        r~   &_convert_raw_document_lists_to_streamsr    sP    \\(#F*

3,U3&FKFK +r   c                    UR                   R                  (       d  [        X5      $ U(       d  [        XR                  SS95      $ SSKJn  UR                  USS9n[        X5      n[        UUU5      /$ )a  Decode BSON data to a single document while using user-provided
custom decoding logic.

`data` must be a string representing a valid, BSON-encoded document.

:param data: BSON data
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions` with user-specified type
    decoders. If no decoders are found, this method is the same as
    ``decode_all``.
:param fields: Map of document namespaces where data that needs
    to be custom decoded lives or None. For example, to custom decode a
    list of objects in 'field1.subfield1', the specified value should be
    ``{'field1': {'subfield1': 1}}``. If ``fields``  is an empty map or
    None, this method is the same as ``decode_all``.

:return: Single-member list containing the decoded document.

.. versionadded:: 3.8
N)r   r   r<   )r   r   )r   r   rZ   with_optionsbson.raw_bsonr=   r  r  )r|   r  r  r=   internal_codec_options_docs         r~   _decode_all_selectiver    s    . &&33$..$ : : : NOO .<I<V<V&d =W = 6D	
 r   c                    g rv   r   r  s     r~   r[   r[     r  r   c                    g rv   r   r  s     r~   r[   r[     r  r   c              #     #    U=(       d    [         n[        U[        5      (       d  [        eSn[	        U 5      S-
  nX4:  a-  [        X5      S   nXX5-    nX5-  n[        Xb5      v   X4:  a  M,  gg7f)a  Decode BSON data to multiple documents as a generator.

Works similarly to the decode_all function, but yields one document at a
time.

`data` must be a string of concatenated, valid, BSON-encoded
documents.

:param data: BSON data
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionchanged:: 3.0
   Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
   `codec_options`.

.. versionadded:: 2.8
r   r   N)r"   rw   r#   r  r  r   r  )r|   r  r   r   r   r   r  s          r~   r[   r[     sr     * 11DdL))''H
d)a-C
.#D3A68#67H++ .s   A*A0.A0c                    g rv   r   file_objr  s     r~   r\   r\   5  r  r   c                    g rv   r   r  s     r~   r\   r\   <  r  r   c              #    #    U=(       d    [         n U R                  S5      nU(       d  g[        U5      S:w  a  [        S5      e[	        US5      S   S-
  nX0R                  [        SU5      5      -   n[        XR5      v   Mq  7f)a  Decode bson data from a file to multiple documents as a generator.

Works similarly to the decode_all function, but reads from the file object
in chunks and parses bson in chunks, yielding one document at a time.

:param file_obj: A file object containing BSON data.
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionchanged:: 3.0
   Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
   `codec_options`.

.. versionadded:: 2.8
r   zcut off in middle of objsizer   N)r"   readr  r-   r   maxr  )r  r  r   	size_datar   r  s         r~   r\   r\   C  s     & 11D
!q)	^q <==#Iq1!4q8}}SH-=>>H++ s   BBc                    [        U [        5      (       d  [        S[        U 5       35      e [	        U [
        5        g! [         a     gf = f)zCheck that the given string represents valid :class:`BSON` data.

Raises :class:`TypeError` if `bson` is not an instance of
:class:`bytes`. Returns ``True``
if `bson` is valid :class:`BSON`, ``False`` otherwise.

:param bson: the data to be validated
z:BSON data must be an instance of a subclass of bytes, not TF)rw   rx   r  r   r  r"   r  )bsons    r~   r]   r]   c  sQ     dE""TUYZ^U_T`abbd12 s   ? 
AAc                  \    \ rS rSrSr\S\4         SS jj5       r\4   S	S jjrSr	g)
r^   iv  zBSON (Binary JSON) data.

.. warning:: Using this class to encode and decode BSON adds a performance
   cost. For better performance use the module level functions
   :func:`encode` and :func:`decode` instead.
Fc                &    U " [        XU5      5      $ )a  Encode a document to a new :class:`BSON` instance.

A document can be any mapping type (like :class:`dict`).

Raises :class:`TypeError` if `document` is not a mapping type,
or contains keys that are not instances of
:class:`str'. Raises :class:`~bson.errors.InvalidDocument`
if `document` cannot be converted to :class:`BSON`.

:param document: mapping type representing a document
:param check_keys: check if keys start with '$' or
    contain '.', raising :class:`~bson.errors.InvalidDocument` in
    either case
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionchanged:: 3.0
   Replaced `uuid_subtype` option with `codec_options`.
)rX   )clsr  r=  r  s       r~   rX   BSON.encode~  s    4 6(>??r   c                    [        X5      $ )a\  Decode this BSON data.

By default, returns a BSON document represented as a Python
:class:`dict`. To use a different :class:`MutableMapping` class,
configure a :class:`~bson.codec_options.CodecOptions`::

    >>> import collections  # From Python standard library.
    >>> import bson
    >>> from bson.codec_options import CodecOptions
    >>> data = bson.BSON.encode({'a': 1})
    >>> decoded_doc = bson.BSON(data).decode()
    <type 'dict'>
    >>> options = CodecOptions(document_class=collections.OrderedDict)
    >>> decoded_doc = bson.BSON(data).decode(codec_options=options)
    >>> type(decoded_doc)
    <class 'collections.OrderedDict'>

:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`.

.. versionchanged:: 3.0
   Removed `compile_re` option: PyMongo now always represents BSON
   regular expressions as :class:`~bson.regex.Regex` objects. Use
   :meth:`~bson.regex.Regex.try_compile` to attempt to convert from a
   BSON regular expression to a Python regular expression object.

   Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
   `codec_options`.
)rY   )selfr  s     r~   rY   BSON.decode  s    @ d**r   r   N)
r  z
Type[BSON]r  Mapping[str, Any]r=  boolr  CodecOptions[Any]returnr^   )r  r  r  dict[str, Any])
__name__
__module____qualname____firstlineno____doc__classmethodr"   rX   rY   __static_attributes__r   r   r~   r^   r^   v  sx      !+@	@@#@ @ )	@
 
@ @8 2G +. +	 +  +r   r^   c                     [         $ )zIs the C extension installed?)_USE_Cr   r   r~   r_   r_     s    Mr   c                     [         R                  R                  5       (       a  [         R                  R                  5         gg)z!Releases the ObjectID lock child.N)r6   	_inc_locklockedreleaser   r   r~   _after_forkr    s.      """"$ #r   register_at_fork)after_in_child)r|   r	   r  zTuple[Any, memoryview])r   rb  r   r   r  r   )r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  Tuple[int, int])
r|   r	   r}   r	   r   rb  r   r  r  Tuple[str, int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[float, int])r|   r	   r}   r	   r   rb  r   rb  r   r  r   r	   r  r  )r|   r	   r   rb  r   rb  r  r  )r|   r	   r}   r	   r   rb  r   rb  r   r  r   r	   r  Tuple[Any, int])r|   r	   r}   r	   r   rb  r   rb  r   r  r   r   r  r   )r|   r	   r   r	   r   rb  r   rb  r   r  r   r	   r  z$Tuple[Union[Binary, uuid.UUID], int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[ObjectId, int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[bool, int])r|   r	   r   r	   r   rb  r   rb  r   r  r   r	   r  z0Tuple[Union[datetime.datetime, DatetimeMS], int])r|   r	   r}   r	   r   rb  r   rb  r   r  r   r   r  Tuple[Code, int])r|   r	   r}   r	   r   rb  r   rb  r   r  r   r   r  r  )r|   r	   r}   r	   r   rb  r   r	   r   r  r   r	   r  zTuple[Regex[Any], int])r|   r	   r}   r	   r   rb  r   rb  r   r  r   r   r  zTuple[DBRef, int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[Timestamp, int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[Int64, int])r|   r	   r   r	   r   rb  r   r	   r   r	   r   r	   r  zTuple[Decimal128, int])F)r|   r	   r}   r	   r   rb  r   rb  r   r  r  r  r  r  )r|   r	   r   rb  r   rb  r   zCodecOptions[RawBSONDocument]r   r  r  r  r  r  )NF)r|   r	   r}   r	   r   rb  r   rb  r   r  r   r	   r  r  r  r	   )r|   r	   r   CodecOptions[_DocumentType]r  r>   )r  zGenerator[bytes, None, None])r*  zUnion[str, bytes]r  rx   )r*  r   r  rx   )
r3  rx   r   floatr   r	   r   r	   r  rx   )
r3  rx   r   rx   r   r	   r   r	   r  rx   )
r3  rx   r   r	   r=  r  r   r  r  rx   )
r3  rx   r   r+   r=  r  r   r  r  rx   )
r3  rx   r   zSequence[Any]r=  r  r   r  r  rx   )
r3  rx   r   r   r   r	   r   r	   r  rx   )
r3  rx   r   r   r   r	   r   r	   r  rx   )
r3  rx   r   z	uuid.UUIDr   r	   r   r  r  rx   )
r3  rx   r   r6   r   r	   r   r	   r  rx   )
r3  rx   r   r  r   r	   r   r	   r  rx   )
r3  rx   r   zdatetime.datetimer   r	   r   r	   r  rx   )
r3  rx   r   r(   r   r	   r   r	   r  rx   )
r3  rx   r   r	   r   r	   r   r	   r  rx   )
r3  rx   r   z
Regex[Any]r   r	   r   r	   r  rx   )
r3  rx   r   r!   r   r	   r   r  r  rx   )
r3  rx   r   rb  r   r	   r   r	   r  rx   )
r3  rx   r   r	   r   r	   r   r	   r  rx   )
r3  rx   r   r,   r   r	   r   r	   r  rx   )FF)r3  rx   r   r	   r=  r  r   r  r  r  r  r  r  rx   )
r  r	   r   r	   r=  r  r   r  r  rx   )T)
r  r	   r=  r  r   r  r  r  r  rx   )r  r  r=  r  r  r  r  rx   rv   )r|   r?   r  Noner  r  )r|   r?   r  r  r  r>   )r|   r?   r  %Optional[CodecOptions[_DocumentType]]r  r  )r|   r?   r   r  r  list[_DocumentType])r|   r?   r  r  r  zlist[dict[str, Any]])r|   r?   r  r  r  r  )r|   r?   r  r  r  z0Union[list[dict[str, Any]], list[_DocumentType]])r  r	   r  r	   r  r  r  r>   )r|   zUnion[memoryview, bytes]r  rx   )r  r	   r  r  )r|   r	   r  r  r  r	   r  r  )r|   rx   r  r  r  Iterator[dict[str, Any]])r|   rx   r  r  r  Iterator[_DocumentType])r|   rx   r  r  r  8Union[Iterator[dict[str, Any]], Iterator[_DocumentType]])r  Union[BinaryIO, IO[bytes]]r  r  r  r  )r  r
  r  r  r  r  )r  r
  r  r  r  r	  )r  rx   r  r  )r  r  )r  r  )r  
__future__r   datetimer!  osrp  r   r  uuidcodecsr   r   r   r(  collectionsr   _abctypingr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   bson.binaryr   r   r   r   r   r   r   r    	bson.coder!   bson.codec_optionsr"   r#   r$   r%   bson.datetime_msr&   r'   r(   r)   r*   
bson.dbrefr+   bson.decimal128r,   bson.errorsr-   r.   r/   
bson.int64r0   bson.max_keyr2   bson.min_keyr4   bson.objectidr6   
bson.regexr7   bson.sonr8   r9   bson.timestampr:   bson.tz_utilr;   r  r=   bson.typingsr>   r?   r  r@   r  ImportError__all__rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   Structunpack_fromr   unpack_UNPACK_INTr   r   r   r   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   __annotations__r  r   r  r  r   r  packr1  r6  rP  r]  r  tupleranger   rW   r+  r-  r/  r4  r7  r?  rG  rK  rN  rQ  rU  rX  rZ  r`  rc  rf  rx  r~  r  r  r  r  r  r  r  rx   dictr  rb  listr   UUIDr  r  _typhasattrr  r  rA  r<  rz  r  r  rX   rY   r  rZ   r  r  r  r  r[   r\   r]   r^   r_   r  r  r   r   r~   <module>r2     s*  8r #   	 	  
  0 0 #    *	 	 	     & G G    "  ! $  -;F=~ 



















 ]]4(44 mmD!((==&22 $mmE2>> MM$'33 u-99  =
==%(=25=?B=LO==b?
??%(?25??B?LO??b
bb$'b25b=NbWZbb"
$'25=NWZ*' 
' ' $'' 25' =N' ^a' ' T"
""%("36">O"Y\")"J-
--%(-25-?B-LO--
B

B
B%(
B25
B?B
BLO
B
BY
YY%(Y25Y=NYX[Y5Y 
  $' 25 =N ^a  	'
	'	'$'	'36	'>O	'_b	'	'
$'14<MWZ,
,,$',25,=N,^a,,3
33%(3253?B3LO33E
EE%(E25E?BELOEE8
88%(8258?B8LO88>L*>L+> L+> L*	>
 L+> L4> L(> L,> L)> L4> L*> L(> L)> L+> L#>  L(!>" L.#>$ L*L/L8L8+>: 2 
  


 
 	

  
 
 

*  --- - 	-
  - - 
-< TS12 
  (	
   ( 

  	
    	.K  
((M mmD!&&MM$$$	}}U+00 ]]4 %%
--&++JeDkJJ;2$2./
DF"F
F%F37F?PF
FJN5)
;
//
M4OTC
P&

,	= ' #	
 	/ 
=  	,  
< 	J 	II| N 
< 	,  
=!" N#$ N	=] "LL/5	< Dt^$$&/o""# 
 -9-- !"AX
AXAX AX 	AX
 AX AX AXH> LP;	;;&7;DH;
;. 
((M &&YZ 
 '<>>> %> 	>: 
 
 
 

 SWS
S*OS)SDK< 
$$K 
 
 

*E 
 SW,
,*O,5,B-H.* 
$*$H$H! *
*9*CF**Z 
 
 
 

 IM ,
 , E ,= ,F 
@D(9= 
 
(9T 
 <@,(,8, >,@&D+5 D+N
% 2!"" {3	 #e)  Fs   2^6 6__