Ë
    ÍÍ:j÷_  ã                   ó:  — d dl Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm	Z	 dd	lm
Z
 dd
lmZmZmZ  e	«       Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      ZdZ G d„ de«      Zy)é    Né   )Úcompat)Úencode)Únumber_types)Úpacker)Úmemoryview_type)ÚNumpyRequiredForThisFeatureÚimport_numpy)Ú
range_func)ÚSOffsetTFlagsÚUOffsetTFlagsÚVOffsetTFlagsc                   ó   — e Zd ZdZy)ÚOffsetArithmeticErrorz¢Error caused by an Offset arithmetic error.

  Probably caused by bad writing of fields. This is considered an unreachable
  situation in normal circumstances.
  N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úh/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/flatbuffers/builder.pyr   r   !   s   „ ñð r   r   c                   ó   — e Zd ZdZy)ÚIsNotNestedErrorzUError caused by using a Builder to write Object data when not inside

  an Object.
  Nr   r   r   r   r   r   +   ó   „ ñð
 r   r   c                   ó   — e Zd ZdZy)ÚIsNestedErrorz_Error caused by using a Builder to begin an Object when an Object is

  already being built.
  Nr   r   r   r   r   r   4   r   r   r   c                   ó   — e Zd ZdZy)ÚStructIsNotInlineErrorzeError caused by using a Builder to write a Struct at a location that

  is not the current Offset.
  Nr   r   r   r   r   r   =   r   r   r   c                   ó   — e Zd ZdZy)ÚBuilderSizeErrorzUError caused by causing a Builder to exceed the hardcoded limit of 2

  gigabytes.
  Nr   r   r   r   r!   r!   F   r   r   r!   c                   ó   — e Zd ZdZy)ÚBuilderNotFinishedErrorz=Error caused by not calling `Finish` before calling `Output`.Nr   r   r   r   r#   r#   O   s   „ ÙEàr   r#   c                   ó   — e Zd ZdZy)ÚEndVectorLengthMismatchedzdThe number of elements passed to EndVector does not match the number

  specified in StartVector.
  Nr   r   r   r   r%   r%   U   r   r   r%   é   c                   ó�  — e Zd ZdZdZ	 dZdAd„Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdBd„ZdCd„ZdCd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdBd„ZdBd„ZdBd„Zd„ Z d „ Z!d!„ Z"d"„ Z#d#„ Z$d$„ Z%d%„ Z&d&„ Z'd'„ Z(d(„ Z)d)„ Z*d*„ Z+d+„ Z,d,„ Z-d-„ Z.d.„ Z/d/„ Z0d0„ Z1d1„ Z2d2„ Z3d3„ Z4d4„ Z5d5„ Z6d6„ Z7d7„ Z8d8„ Z9d9„ Z:d:„ Z;d;„ Z<d<„ Z=d=„ Z>d>„ Z?d?„ Z@d@„ ZAy)DÚBuildera|  A Builder is used to construct one or more FlatBuffers.

  Typically, Builder objects will be used from code generated by the `flatc`
  compiler.

  A Builder constructs byte buffers in a last-first manner for simplicity and
  performance during reading.

  Internally, a Builder is a state machine for creating FlatBuffer objects.

  It holds the following internal state:
      - Bytes: an array of bytes.
      - current_vtable: a list of integers.
      - vtables: a hash of vtable entries.

  Attributes:
    Bytes: The internal `bytearray` for the Builder.
    finished: A boolean determining if the Builder has been finalized.
  )ÚBytesÚcurrent_vtableÚheadÚminalignÚ	objectEndÚvtablesÚnestedÚforceDefaultsÚfinishedÚvectorNumElemsÚsharedStringsl        c                 ó  — d|cxk  rt         j                  k  sn d}t        |«      ‚t        |«      | _        d| _        t        j                  |«      | _        d| _	        d| _
        i | _        d| _        d| _        d| _        d| _        y)z_Initializes a Builder of size `initial_size`.

    The internal buffer is grown as needed.
    r   z;flatbuffers: Cannot create Builder larger than 2 gigabytes.Nr   F)r(   ÚMAX_BUFFER_SIZEr!   Ú	bytearrayr)   r*   r   Úpy_typer+   r,   r-   r.   r/   r0   r3   r1   )ÚselfÚinitialSizeÚmsgs      r   Ú__init__zBuilder.__init__�   s€   € ð �Ô7¤× 7Ñ 7Ô7ØI€cÜ˜SÓ!Ð!ä˜;Ó'€D„Jà€DÔÜ×%Ñ% kÓ2€D„IØ€D„MØ€D„NØ€D„LØ€D„KØ€DÔØ€DÔà€D…Mr   c                 ó¶   — d | _         t        | j                  «      | _        d| _        d | _        i | _        d| _        d| _        d | _	        d | _
        d| _        y )Nr   F)r*   Úlenr)   r+   r,   r-   r.   r/   r0   r3   r2   r1   ©r8   s    r   ÚClearzBuilder.Clear¦   sT   € à€DÔÜ�D—J‘J“€D„IØ€D„MØ€D„NØ€D„LØ€D„KØ€DÔØ€DÔØ€DÔà€D…Mr   c                 ó`   — | j                   s
t        «       ‚| j                  | j                  d S )a�  Return the portion of the buffer that has been used for writing data.

    This is the typical way to access the FlatBuffer data inside the
    builder. If you try to access `Builder.Bytes` directly, you would need
    to manually index it with `Head()`, since the buffer is constructed
    backwards.

    It raises BuilderNotFinishedError if the buffer has not been finished
    with `Finish`.
    N)r1   r#   r)   r+   r>   s    r   ÚOutputzBuilder.Output´   s)   € ð �=Š=Ü#Ó%Ð%à�:‰:�d—i‘i�kÐ"Ð"r   c                 ór   — | j                  «        dg|z  | _        | j                  «       | _        d| _        y)z=StartObject initializes bookkeeping for writing a new object.r   TN)ÚassertNotNestedr*   ÚOffsetr-   r/   )r8   Ú	numfieldss     r   ÚStartObjectzBuilder.StartObjectÆ   s4   € ð 	×ÑÔð ˜# 	™/€DÔØ—[‘[“]€D„NØ€D…Kr   c           	      óÂ  — | j                  d«       | j                  «       }g }d}t        | j                  «      D ]"  }|dk(  r|rŒ||z
  }d}|j	                  |«       Œ$ t        j                  || j                  z
  «      }|j	                  |«       t        |«      }| j                  j                  |«      }|�€ƒt        | j                  «      dz
  }d}d}|dk\  rAd}	| j                  |   }|dz  }|dk(  r|r|dz  }Œ(||z
  }	d}| j                  |	«       |dk\  rŒA| j                  t        j                  |«      «       t        | j                  «      |z
  t        z   }
|
t        j                  j                   z  }
| j                  t        j                  |
«      «       t#        j                  t        | j$                  «      |z
  «      }t'        j(                  t*        j,                  | j$                  |t#        j                  | j                  «       |z
  «      «       | j                  «       | j                  |<   n™t#        j                  t        | j$                  «      |z
  «      }t        j                  |«      | _        t'        j(                  t*        j,                  | j$                  | j1                  «       t#        j                  ||z
  «      «       d| _        |S )a”  WriteVtable serializes the vtable for the current object, if needed.

    Before writing out the vtable, this checks pre-existing vtables for
    equality to this one. If an equal vtable is found, point the object to
    the existing vtable and return.

    Because vtable values are sensitive to alignment of object data, not
    all logically-equal vtables will be deduplicated.

    A vtable has the following format:
      <VOffsetT: size of the vtable in bytes, including this value>
      <VOffsetT: size of the object in bytes, including the vtable offset>
      <VOffsetT: offset for a field> * N, where N is the number of fields
                 in the schema for this type. Includes deprecated fields.
    Thus, a vtable is made of 2 + N elements, each VOffsetT bytes wide.

    An object has the following format:
      <SOffsetT: offset to this object's vtable (may be negative)>
      <byte: data>+
    r   TFNr   )ÚPrependSOffsetTRelativerD   Úreversedr*   Úappendr   r7   r-   Útupler.   Úgetr=   ÚPrependVOffsetTr   ÚVtableMetadataFieldsÚNÚ	bytewidthr   r)   r   ÚWriter   Úsoffsetr+   ÚHead)r8   ÚobjectOffsetÚvtKeyÚtrimÚelemÚ
objectSizeÚ	vt2OffsetÚiÚtrailingÚoffÚvBytesÚobjectStarts               r   ÚWriteVtablezBuilder.WriteVtableÐ   s€  € ð0 	× Ñ  Ô#à—;‘;“=€Là€EØ€DÜ˜×,Ñ,Ó-ò ˆØ	�ŠÙØ
à˜dÑ"ˆØˆà‡l�l�4Õðô ×&Ñ& |°d·n±nÑ'DÓE€JØ	‡L�L�ÔÜ�%‹L€Eà—‘× Ñ  Ó'€IØÑô
 ˆd×!Ñ!Ó
" QÑ
&€aØ€hØ€dØ�ŠFØˆØ×"Ñ" 1Ñ%ˆØ	ˆQ‰ˆà�1Š9ÙØ˜‰MˆHØð ˜tÑ#ˆ#Øˆ$à×Ñ˜SÔ!ð �‹Fð( ×Ñœ=×0Ñ0°Ó<Ô=ô �4×&Ñ&Ó'¨(Ñ2Ô5IÑI€fØ”—‘×)Ñ)Ñ)€fØ
×Ñœ=×0Ñ0°Ó8Ô9ô "×)Ñ)¬#¨d¯j©j«/¸LÑ*HÓI€kÜ‡l�lÜ
�.‰.Ø
�*‰*Ø
Ü
×
Ñ
 §¡£°Ñ <Ó
=ô	ð !ŸK™K›M€d‡l�l�5Òô "×)Ñ)¬#¨d¯j©j«/¸LÑ*HÓI€kÜ×'Ñ'¨Ó4€d„iô ‡l�lÜ
�.‰.Ø
�*‰*Ø
�)‰)‹+Ü
×
Ñ
 	¨LÑ 8Ó
9ô	ð €DÔØÐr   c                 óP   — | j                  «        d| _        | j                  «       S )z>EndObject writes data necessary to finish object construction.F)ÚassertNestedr/   r_   r>   s    r   Ú	EndObjectzBuilder.EndObject>  s$   € à×ÑÔØ€D„KØ×ÑÓÐr   c                 óF  — t        | j                  «      t        j                  k(  rd}t	        |«      ‚t        t        | j                  «      dz  t        j                  «      }|dk(  rd}t        |«      }| j                  ||t        | j                  «      z
  d || _        y)z�Doubles the size of the byteslice, and copies the old data towards

    the end of the new buffer (since we build the buffer backwards).
    z2flatbuffers: cannot grow buffer beyond 2 gigabytesr&   r   r   N)r=   r)   r(   r5   r!   Úminr6   )r8   r:   ÚnewSizeÚbytes2s       r   ÚGrowByteBufferzBuilder.GrowByteBufferD  s„   € ô
 ˆ4�:‰:ƒœ'×1Ñ1Ò1Ø@€cÜ˜SÓ!Ð!ä”#�d—j‘j“/ AÑ%¤w×'>Ñ'>Ó?€GØ�!‚|Ø€gÜ�wÓ€FØ*.¯*©*€Fˆ7”S˜Ÿ™“_Ñ$Ð&Ð'Ø€D…Jr   c                 ó   — | j                   S )z“Get the start of useful data in the underlying byte buffer.

    Note: unlike other functions, this value is interpreted as from the
    left.
    )r+   r>   s    r   rS   zBuilder.HeadV  s   € ð �9‰9Ðr   c                 óF   — t        | j                  «      | j                  z
  S )z)Offset relative to the end of the buffer.)r=   r)   r+   r>   s    r   rD   zBuilder.Offseta  s   € äˆt�z‰z‹?˜TŸY™YÑ&Ð&r   c                 ót   — |dk  ry| j                   |z
  }d|z  | j                  || j                    || _         y)z'Pad places zeros at the current offset.r   Nó    )r+   r)   )r8   ÚnÚnew_heads      r   ÚPadzBuilder.Pade  s8   € àˆA‚vØØ�y‰y˜1‰}€HØ'.°¡{€D‡J�Jˆx˜$Ÿ)™)Ð$Ø€D…Ir   c                 óN  — || j                   kD  r|| _         | j                  }t        | j                  «      }||z
  |z    dz   }||dz
  z  }||z   |z   }||k  r5|}| j	                  «        t        | j                  «      }|||z
  z  }||k  rŒ5|| _        | j                  |«       y)a4  Prep prepares to write an element of `size` after `additional_bytes`

    have been written, e.g. if you write a string, you need to align
    such the int length field is aligned to SizeInt32, and the string
    data follows it directly.
    If all you need to do is align, `additionalBytes` will be 0.
    r   N)r,   r+   r=   r)   rg   rn   )r8   ÚsizeÚadditionalBytesr+   Úbuf_lenÚ	alignSizeÚneededÚ
oldBufSizes           r   ÚPrepzBuilder.Prepm  s¶   € ð ˆd�m‰mÒØ€d„mð �9‰9€DÜ�$—*‘*‹o€GØ˜T‘> OÑ3Ð4¸Ñ9€IØ�˜‘Ñ€Ið ˜Ñ Ñ/€FØ
�Š-Ø€jØ
×ÑÔÜ�D—J‘J“€gØ
ˆg˜
Ñ"Ñ"€dð	 �‹-ð
 €D„IØ‡H�HˆYÕr   c                 ó  — | j                  t        j                  j                  d«       || j	                  «       k  sd}t        |«      ‚| j	                  «       |z
  t        j                  j                  z   }| j                  |«       y)z]PrependSOffsetTRelative prepends an SOffsetT, relative to where it

    will be written.
    r   ú%flatbuffers: Offset arithmetic error.N)rv   rO   r   rP   rD   r   ÚPlaceSOffsetT©r8   r\   r:   Úoff2s       r   rH   zBuilder.PrependSOffsetTRelative‹  óg   € ð 	‡I�IŒa�o‰o×'Ñ'¨Ô+Ø�4—;‘;“=Ò Ø3€cÜ! #Ó&Ð&Ø�;‰;‹=˜3Ñ¤§¡×!:Ñ!:Ñ:€DØ×Ñ�tÕr   c                 ó  — | j                  t        j                  j                  d«       || j	                  «       k  sd}t        |«      ‚| j	                  «       |z
  t        j                  j                  z   }| j                  |«       y)z]Prepends an unsigned offset into vector data, relative to where it

    will be written.
    r   rx   N)rv   rO   r   rP   rD   r   ÚPlaceUOffsetTrz   s       r   ÚPrependUOffsetTRelativezBuilder.PrependUOffsetTRelative›  r|   r   c                 óâ   — | j                  «        d| _        || _        | j                  t        j
                  j                  ||z  «       | j                  |||z  «       | j                  «       S )zäStartVector initializes bookkeeping for writing a new vector.

    A vector has the following format:
      - <UOffsetT: number of elements in this vector>
      - <T: data>+, where T is the type of elements of this vector.
    T)rC   r/   r2   rv   rO   ÚUint32FlagsrP   rD   )r8   ÚelemSizeÚnumElemsÚ	alignments       r   ÚStartVectorzBuilder.StartVectorª  s[   € ð 	×ÑÔØ€D„KØ"€DÔØ‡I�IŒa�m‰m×%Ñ% x°(Ñ':Ô;Ø‡I�Iˆi˜ HÑ,Ô-Ø�;‰;‹=Ðr   Nc                 ó  — | j                  «        d| _        |r5t        j                  dt        d¬«       || j
                  k7  r
t        «       ‚| j                  | j
                  «       d| _        | j                  «       S )z>EndVector writes data necessary to finish vector construction.FznumElems is deprecated.r&   )Ú
stacklevelN)	ra   r/   ÚwarningsÚwarnÚDeprecationWarningr2   r%   r~   rD   )r8   rƒ   s     r   Ú	EndVectorzBuilder.EndVector»  so   € ð 	×ÑÔà€D„Kñ Ü‡m�mÐ-Ô/AÈaÕPØ	�T×(Ñ(Ò	(Ü'Ó)Ð)ð 	×Ñ�t×*Ñ*Ô+Ø€DÔØ�;‰;‹=Ðr   c                 ó¬   — | j                   si | _         n|| j                   v r| j                   |   S | j                  |||«      }|| j                   |<   |S )zoCreateSharedString checks if the string is already written to the buffer

    before calling CreateString.
    )r3   ÚCreateString)r8   ÚsÚencodingÚerrorsr\   s        r   ÚCreateSharedStringzBuilder.CreateSharedStringÍ  s]   € ð ×ÒØ€dÕØ	
ˆd× Ñ Ñ	 Ø×Ñ Ñ"Ð"à
×
Ñ
˜A˜x¨Ó
0€CØ€D×Ñ�qÑà€Jr   c                 ó>  — | j                  «        d| _        t        |t        j                  «      r|j                  ||«      }n(t        |t        j                  «      r|}nt        d«      ‚t        |«      }| j                  t        j                  j                  |dz   t        j                  j                  z  «       | j                  dt        j                  «       | j                  |z
  }|| _        || j                   |||z    || _        | j%                  «       S )z>CreateString writes a null-terminated byte string as a vector.Tz!non-string passed to CreateStringr   r   )rC   r/   Ú
isinstancer   Ústring_typesr   Úbinary_typesÚ	TypeErrorr=   rv   rO   r   rP   Ú
Uint8FlagsÚPlacer+   r)   r2   r‹   )r8   rŽ   r�   r�   ÚxÚpayload_lenrm   s          r   r�   zBuilder.CreateStringÝ  sß   € ð 	×ÑÔà€D„Kô �!”V×(Ñ(Ô)Ø
�(‰(�8˜VÓ
$�aÜ	�A”v×*Ñ*Ô	+Ø
�aäÐ9Ó:Ð:ä�a“&€KØ‡I�IŒa�o‰o×'Ñ'¨+¸©/¼Q¿\¹\×=SÑ=SÑ)SÔTØ‡J�Jˆq”!—,‘,Ôà�y‰y˜;Ñ&€HØ€D„IØ45€D‡J�Jˆx˜( [Ñ0Ð1à%€DÔØ�>‰>ÓÐr   c                 ó˜  — | j                  «        d| _        t        |t        j                  «      st        d«      ‚t        |«      }| j                  t        j                  j                  |t        j                  j                  z  «       | j                  |z
  }|| _        || j                  |||z    || _        | j                  «       S )z"CreateString writes a byte vector.Tz*non-byte vector passed to CreateByteVector)rC   r/   r“   r   r•   r–   r=   rv   rO   r   rP   r—   r+   r)   r2   r‹   )r8   r™   Údata_lenrm   s       r   ÚCreateByteVectorzBuilder.CreateByteVector÷  s¤   € ð 	×ÑÔà€D„Kô �aœ×,Ñ,Ô-ÜÐBÓCÐCä�1‹v€HØ‡I�IŒa�o‰o×'Ñ'¨´A·L±L×4JÑ4JÑ)JÔKØ�y‰y˜8Ñ#€HØ€D„IØ12€D‡J�Jˆx˜( XÑ-Ð.à"€DÔØ�>‰>ÓÐr   c                 óŒ  — t         €t        d«      ‚t        |t         j                  «      st	        d«      ‚|j
                  j                  dvrt	        d«      ‚|j                  dkD  rt	        d«      ‚| j                  |j                  |j                  |j
                  j                  «       |j
                  j                  d   dk(  r|}n|j                  d	¬
«      }|j                  d¬«      }t        |«      }| j                   |z
  }|| _        || j"                  |||z    |j                  | _        | j'                  «       S )z7CreateNumpyVector writes a numpy array into the buffer.zNumpy was not found.z-non-numpy-ndarray passed to CreateNumpyVector)ÚbrZ   ÚuÚfz4numpy-ndarray holds elements of unsupported datatyper   z4multidimensional-ndarray passed to CreateNumpyVectorr   ú<F)ÚinplaceÚC)Úorder)Únpr	   r“   Úndarrayr–   ÚdtypeÚkindÚndimr…   Úitemsizerp   r„   ÚstrÚbyteswapÚtobytesr=   r+   r)   r2   r‹   )r8   r™   Úx_lendÚpayloadrš   rm   s         r   ÚCreateNumpyVectorzBuilder.CreateNumpyVector  s  € ô 
€zä'Ð(>Ó?Ð?ä�aœŸ™Ô$ÜÐEÓFÐFà‡w�w‡|�|Ð/Ñ/ÜÐLÓMÐMà‡v�v�‚zÜÐLÓMÐMà×Ñ�Q—Z‘Z §¡¨¯©×):Ñ):Ô;ð 	‡w�w‡{�{�1�~˜ÒØ�fà�z‰z %ˆzÓ(€fð �n‰n 3ˆnÓ'€Gô �g“,€KØ�y‰y˜;Ñ&€HØ€D„IØ4;€D‡J�Jˆx˜( [Ñ0Ð1àŸ&™&€DÔØ�>‰>ÓÐr   c                 ó0   — | j                   s
t        «       ‚y)z7Check that we are in the process of building an object.N)r/   r   r>   s    r   ra   zBuilder.assertNested0  s   € ð �;Š;ÜÓÐð r   c                 ó0   — | j                   r
t        «       ‚y)zkCheck that no other objects are being built while making this object.

    If not, raise an exception.
    N)r/   r   r>   s    r   rC   zBuilder.assertNotNested6  s   € ð ‡{‚{Ü‹OÐð r   c                 óŒ   — t        j                  |t         j                  «       || j                  «       k7  rd}t	        |«      ‚y)z“Structs are always stored inline, so need to be created right

    where they are used. You'll get this error if you created it
    elsewhere.
    zkflatbuffers: Tried to write a Struct at an Offset that is different from the current Offset of the Builder.N)rO   Úenforce_numberr   rD   r   )r8   Úobjr:   s      r   ÚassertStructIsInlinezBuilder.assertStructIsInline?  sC   € ô ×Ñ�Sœ!Ÿ/™/Ô*Ø
ˆd�k‰k‹mÒðAð 
ô # 3Ó'Ð'ð r   c                 ó^   — | j                  «        | j                  «       | j                  |<   y)zSSlot sets the vtable key `voffset` to the current location in the

    buffer.
    N)ra   rD   r*   )r8   Úslotnums     r   ÚSlotzBuilder.SlotN  s&   € ð
 	×ÑÔØ#'§;¡;£=€D×Ñ˜Ò r   c                 ól  — t        j                  |t         j                  «       t         j                  j                  }|�|t         j                  j                  z  }|r|t         j                  j                  z  }| j                  | j                  |«       |�ž| j                  t         j                  j                  t        j                  «       t         j                  j                  d|«      }t        t        j                  dz
  dd«      D ]%  }| j                  ||   t         j                  «       Œ' | j                  |«       |rWt        | j                   «      | j"                  z
  }t        j                  |t         j                  «       | j%                  |«       d| _        | j"                  S )ú=Finish finalizes a buffer, pointing to the given `rootTable`.z>BBBBr   éÿÿÿÿT)rO   rµ   r   rP   Ú
Int32Flagsrv   r,   r   ÚFILE_IDENTIFIER_LENGTHÚstructÚunpackÚranger˜   r—   r   r=   r)   r+   ÚPrependInt32r1   )r8   Ú	rootTableÚ
sizePrefixÚfile_identifierÚprepSizerZ   rp   s          r   Ú__FinishzBuilder.__FinishX  s8  € ä×Ñ�Y¤§¡Ô0ä�‰×(Ñ(€HØÐ"Ø”!—,‘,×(Ñ(Ñ(€hÙØ”!—,‘,×(Ñ(Ñ(€hØ‡I�Iˆd�m‰m˜XÔ&àÐ"Ø
‡i�i”—‘×)Ñ)¬6×+HÑ+HÔIô
 Ÿ™Ÿ™¨°ÓA€oÜ”V×2Ñ2°QÑ6¸¸BÓ?ò 5ˆ!à�
‰
�? 1Ñ%¤q§|¡|Õ4ð5ð 	× Ñ  Ô+ÙÜ�—‘‹_˜tŸy™yÑ(€dÜ×Ñ�tœQŸ\™\Ô*Ø
×Ñ˜ÔØ€D„MØ�9‰9Ðr   c                 ó*   — | j                  |d|¬«      S )r¼   F©rÆ   ©Ú_Builder__Finish©r8   rÄ   rÆ   s      r   ÚFinishzBuilder.Finishv  s   € à�=‰=˜ E¸?ˆ=ÓKÐKr   c                 ó*   — | j                  |d|¬«      S )z_Finish finalizes a buffer, pointing to the given `rootTable`,

    with the size prefixed.
    TrÊ   rË   rÍ   s      r   ÚFinishSizePrefixedzBuilder.FinishSizePrefixedz  s   € ð
 �=‰=˜ D¸/ˆ=ÓJÐJr   c                 ó`   — | j                  |j                  d«       | j                  ||«       y )Nr   )rv   rP   r˜   )r8   Úflagsr\   s      r   ÚPrependzBuilder.Prepend‚  s"   € Ø‡I�Iˆe�o‰o˜qÔ!Ø‡J�Jˆs�EÕr   c                 óÔ   — |�t        j                  ||«       |�t        j                  ||«       ||k7  s| j                  r'|�$| j                  ||«       | j	                  |«       y y y ©N)rO   rµ   r0   rÓ   rº   )r8   rÒ   Úor™   Úds        r   ÚPrependSlotzBuilder.PrependSlot†  s`   € Ø€}Ü×Ñ�q˜%Ô Ø€}Ü×Ñ�q˜%Ô ØˆA‚v�$×$Ò$¨¨Ø
‡l�l�5˜!ÔØ
‡i�i�…lð *7Ð$r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   Ú	BoolFlags©r8   Úargss     r   ÚPrependBoolSlotzBuilder.PrependBoolSlot�  ó   € Ø€D×Ñ”Q—[‘[Ð( 4Ô(r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   ©rØ   rO   r—   rÛ   s     r   ÚPrependByteSlotzBuilder.PrependByteSlot’  ó   € Ø€D×Ñ”Q—\‘\Ð) DÔ)r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   rà   rÛ   s     r   ÚPrependUint8SlotzBuilder.PrependUint8Slot•  râ   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   ÚUint16FlagsrÛ   s     r   ÚPrependUint16SlotzBuilder.PrependUint16Slot˜  ó   € Ø€D×Ñ”Q—]‘]Ð* TÔ*r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   r�   rÛ   s     r   ÚPrependUint32SlotzBuilder.PrependUint32Slot›  rè   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   ÚUint64FlagsrÛ   s     r   ÚPrependUint64SlotzBuilder.PrependUint64Slotž  rè   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   Ú	Int8FlagsrÛ   s     r   ÚPrependInt8SlotzBuilder.PrependInt8Slot¡  rÞ   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   Ú
Int16FlagsrÛ   s     r   ÚPrependInt16SlotzBuilder.PrependInt16Slot¤  râ   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   r¾   rÛ   s     r   ÚPrependInt32SlotzBuilder.PrependInt32Slot§  râ   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   Ú
Int64FlagsrÛ   s     r   ÚPrependInt64SlotzBuilder.PrependInt64Slotª  râ   r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   ÚFloat32FlagsrÛ   s     r   ÚPrependFloat32SlotzBuilder.PrependFloat32Slot­  ó   € Ø€D×Ñ”Q—^‘^Ð+ dÔ+r   c                 óF   —  | j                   t        j                  g|¢­Ž  y rÕ   )rØ   rO   ÚFloat64FlagsrÛ   s     r   ÚPrependFloat64SlotzBuilder.PrependFloat64Slot°  rü   r   c                 ól   — ||k7  s| j                   r#| j                  |«       | j                  |«       yy)zÈPrependUOffsetTRelativeSlot prepends an UOffsetT onto the object at

    vtable slot `o`. If value `x` equals default `d`, then the slot will
    be set to zero and no other data will be written.
    N)r0   r   rº   )r8   rÖ   r™   r×   s       r   ÚPrependUOffsetTRelativeSlotz#Builder.PrependUOffsetTRelativeSlot³  s1   € ð 	ˆA‚v�×#Ò#Ø
×"Ñ" 1Ô%Ø
‡i�i�…lð $r   c                 óœ   — t        j                  |t         j                  «       ||k7  r#| j                  |«       | j	                  |«       yy)zºPrependStructSlot prepends a struct onto the object at vtable slot `o`.

    Structs are stored inline, so nothing additional is being added. In
    generated code, `d` is always 0.
    N)rO   rµ   r   r·   rº   )r8   Úvr™   r×   s       r   ÚPrependStructSlotzBuilder.PrependStructSlot¾  s=   € ô ×Ñ�QœŸ™Ô(ØˆA‚vØ
×Ñ Ô"Ø
‡i�i�…lð r   c                 óD   — | j                  t        j                  |«       y)zTPrepend a `bool` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rÚ   ©r8   r™   s     r   ÚPrependBoolzBuilder.PrependBoolÌ  ó   € ð
 	‡L�L”—‘˜aÕ r   c                 óD   — | j                  t        j                  |«       y)zTPrepend a `byte` to the Builder buffer.

    Note: aligns and checks for space.
    N©rÓ   rO   r—   r  s     r   ÚPrependBytezBuilder.PrependByteÓ  ó   € ð
 	‡L�L”—‘˜qÕ!r   c                 óD   — | j                  t        j                  |«       y)zVPrepend an `uint8` to the Builder buffer.

    Note: aligns and checks for space.
    Nr
  r  s     r   ÚPrependUint8zBuilder.PrependUint8Ú  r  r   c                 óD   — | j                  t        j                  |«       y)zWPrepend an `uint16` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   ræ   r  s     r   ÚPrependUint16zBuilder.PrependUint16á  ó   € ð
 	‡L�L”—‘ Õ"r   c                 óD   — | j                  t        j                  |«       y)zWPrepend an `uint32` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   r�   r  s     r   ÚPrependUint32zBuilder.PrependUint32è  r  r   c                 óD   — | j                  t        j                  |«       y)zWPrepend an `uint64` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rì   r  s     r   ÚPrependUint64zBuilder.PrependUint64ï  r  r   c                 óD   — | j                  t        j                  |«       y)zUPrepend an `int8` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rï   r  s     r   ÚPrependInt8zBuilder.PrependInt8ö  r  r   c                 óD   — | j                  t        j                  |«       y)zVPrepend an `int16` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rò   r  s     r   ÚPrependInt16zBuilder.PrependInt16ý  r  r   c                 óD   — | j                  t        j                  |«       y)zVPrepend an `int32` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   r¾   r  s     r   rÃ   zBuilder.PrependInt32  r  r   c                 óD   — | j                  t        j                  |«       y)zVPrepend an `int64` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   r÷   r  s     r   ÚPrependInt64zBuilder.PrependInt64  r  r   c                 óD   — | j                  t        j                  |«       y)zWPrepend a `float32` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rú   r  s     r   ÚPrependFloat32zBuilder.PrependFloat32  ó   € ð
 	‡L�L”—‘ Õ#r   c                 óD   — | j                  t        j                  |«       y)zWPrepend a `float64` to the Builder buffer.

    Note: aligns and checks for space.
    N)rÓ   rO   rþ   r  s     r   ÚPrependFloat64zBuilder.PrependFloat64  r  r   c                 ó   — || _         y)zûIn order to save space, fields that are set to their default value

    don't get serialized into the buffer. Forcing defaults provides a
    way to manually disable this optimization. When set to `True`, will
    always serialize default values.
    N)r0   )r8   r0   s     r   ÚForceDefaultszBuilder.ForceDefaults   s   € ð '€DÕr   c                 óD   — | j                  t        j                  |«       y rÕ   )rÓ   rO   r   r  s     r   rM   zBuilder.PrependVOffsetT,  s   € Ø‡L�L”—‘ !Õ$r   c                 óÈ   — t        j                  ||«       | j                  |j                  z
  }|| _        t	        j
                  |j                  | j                  ||«       y)zkPlace prepends a value specified by `flags` to the Builder,

    without checking for available space.
    N)rO   rµ   r+   rP   r   rQ   Úpacker_typer)   )r8   r™   rÒ   rm   s       r   r˜   zBuilder.Place/  sI   € ô ×Ñ�Q˜ÔØ�y‰y˜5Ÿ?™?Ñ*€HØ€D„IÜ
‡L�L�×"Ñ" D§J¡J°¸!Õ<r   c                 ó  — t        j                  |t         j                  «       | j                  t         j                  j                  z
  }|| _        t        j                  t        j                  | j                  ||«       y)zWPlaceVOffsetT prepends a VOffsetT to the Builder, without checking

    for space.
    N)
rO   rµ   r   r+   rP   r   rQ   r   Úvoffsetr)   ©r8   r™   rm   s      r   ÚPlaceVOffsetTzBuilder.PlaceVOffsetT:  óQ   € ô
 ×Ñ�QœŸ™Ô(Ø�y‰yœ1Ÿ?™?×4Ñ4Ñ4€HØ€D„IÜ
‡L�L”—‘ §¡¨X°qÕ9r   c                 ó  — t        j                  |t         j                  «       | j                  t         j                  j                  z
  }|| _        t        j                  t        j                  | j                  ||«       y)zWPlaceSOffsetT prepends a SOffsetT to the Builder, without checking

    for space.
    N)
rO   rµ   r   r+   rP   r   rQ   r   rR   r)   r)  s      r   ry   zBuilder.PlaceSOffsetTD  r+  r   c                 ó  — t        j                  |t         j                  «       | j                  t         j                  j                  z
  }|| _        t        j                  t        j                  | j                  ||«       y)zWPlaceUOffsetT prepends a UOffsetT to the Builder, without checking

    for space.
    N)
rO   rµ   r   r+   rP   r   rQ   r   Úuoffsetr)   r)  s      r   r~   zBuilder.PlaceUOffsetTN  r+  r   )i   rÕ   )zutf-8Ústrict)Br   r   r   r   Ú	__slots__r5   r;   r?   rA   rF   r_   rb   rg   rS   rD   rn   rv   rH   r   r…   r‹   r‘   r�   r�   r±   ra   rC   r·   rº   rÌ   rÎ   rÐ   rÓ   rØ   rÝ   rá   rä   rç   rê   rí   rð   ró   rõ   rø   rû   rÿ   r  r  r  r  r  r  r  r  r  r  rÃ   r  r  r!  r#  rM   r˜   r*  ry   r~   r   r   r   r(   r(   c   sK  „ ñð*€)ðð
 €/óò.ò#ò$òlò\òò$ò'òòò<ò òó"ó$ó ò4ò("òJòò(ò1óó<LóKòòò)ò*ò*ò+ò+ò+ò)ò*ò*ò*ò,ò,ò	ò
ò!ò"ò"ò#ò#ò#ò!ò"ò"ò"ò$ò$ò'ò%ò	=ò:ò:ó:r   r(   )rˆ   Ú r   r   r   rO   r   r   r	   r
   r   r   r   r   r¦   ÚRuntimeErrorr   r   r   r   r!   r#   r%   rN   Úobjectr(   r   r   r   ú<module>r4     s–   ðó å Ý Ý Ý Ý #ß =Ý ß GÑ Gáƒ^€ô˜Lô ô�|ô ô�Lô ô˜\ô ô�|ô ô˜lô ô ô ð Ð ôs:ˆfõ s:r   