
    K:gI                     r   U d Z ddlZddlZddlZddlmZmZmZ ddlmZ ddl	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ ddlmZm Z  dd	l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) dd
l*m+Z+m,Z,m-Z- ddl.m/Z0 ddl1m2Z2m3Z3 e
rddl4m5Z5 ee6ed   f   Z7ee8d<    ed      Z9 edd      Z: ed      Z; ed      Z< ed      Z= ed      Z> G d dee;e<e>f   ej~                        Z@ G d dee;e<f   e@e;e<e<f         ZA ede0j                        ZC G d deeC         ZDe@e9e9df   ZEee8d <   e@e9e9e9f   ZFee8d!<   eAe9e9f   ZGee8d"<   e@eeef   ZHee8d#<    ed$ee@eeef            ZId%eId&eIfd'ZJd%eId&eIfd(ZKd)eLd&eeIgeIf   fd*ZMd%eId&eIfd+ZN G d, d-eFeL         ZO eMd.d/       G d0 d1eOeDe0j                                  ZQ eMd2       G d3 d4eOeDe0j                                  ZS G d5 d6eOeDe0j                           ZU eMd7d8       G d9 d:eOeDe0j                                  ZW eMd;       G d< d=eOeDe0j                                  ZY eMd>       G d? d@eOeDe0j                                  Z[ eMdAdB       G dC dDe@eLeLdf   eDe0j                                  Z] eMdEdF       G dG dHeOeDe0j                                  Z_ eMdEdFd7d8       G dI dJeOeDee0j                  e0j                  f                   Z` eMdKdL       G dM dNeOeDe0j                                  Zb G dO dPeEe9         Zc G dQ dReceedeef            Zf G dS dTeced         Zg G dU dVecee         Zh eMdWdX       G dY dZefeDe0j                                  Zj eMdWdX       G d[ d\egeDe0j                                  Zk eMdWdX       G d] d^eheDe0j                                  Zl eMd_       G d` dae@emememf   eDe0j                                  Zo eMdbdc       G dd deegeDe0j                                  Zq eMdfdg       G dh diefeDe0j                                  Zs eMdjdk       G dl dmefeDe0j                                  Zu eMdn       G do dpegeDe0j                                  Zw G dq dre@eLedf         Zx eMds       G dt duexeDe0j                                  Zz eMdvdw       G dx dye@eLedf   eDe0j                                  Z| eMdzd{       G d| d}e@ededf   eDe0j                                  Z~ G d~ dee;e<e=f   e@ee;   ee<   e=f         Z G d dee9e9e3e9   f         Z G d de      Zej                  Z eMdd       G d dee:   ee)e:e3e:   f   eDe0j                                  Z G d dee:   e@eeL   e:df   eDe0j                           Z G d deEe9         Z eMd       G d dee"   eDe0j                                  Z eMdd       G d dee#ee#e(f   e2f   eDe0j                     e2e             Z eMd       G d dee$   eDe0j                                  Z eMd      eN G d dee%   eGe%   eDe0j                                         Z eMd       G d deee&e'f      eDe0j                                   Z eMd      eN G d dee&   eGe&   eDe0j$                                         Z eMd      eN G d dexeAeLef   eDe0j(                                         Z eMd      eN G d dee&   eDe0j,                                         Z eMd       G d dexeDe0j0                                  Z eMd       G d dee9   eDe0j4                                  Z eMdd       G d deee&e'f      eDe0j8                     e             Z eMdd       G d deeL   eDe0j<                     eL             Z eMdd      eN G d degeGed   eDe0j@                                         ZeN G d deeGe"                ZeN G d deeGe$                ZeN G d deeGee&e'f                   ZeN G d deqeGed                ZeN G d deseGeedeef                   ZeN G dÄ de|eAeLef                ZeN G dń dezeAeLef                ZeN G dǄ de~eAedef                ZeN G dɄ deQeGeL                ZeN G d˄ deleGee                ZeN G d̈́ dekeGed                ZeN G dτ dejeGeedeef                   ZeN G dф deueGeedeef                   ZeN G dӄ deYeGeL                ZeN G dՄ deweGed                ZeN G dׄ de[eGeL                ZeN G dل de]eAeLeLf                ZeN G dۄ de`eGeL                ZeN G d݄ de_eGeL                ZeN G d߄ deWeGeL                ZeN G d debeGeL                Z e       jq                         D  ch c]/  \  } } e|e6      r! e|e@      r|e@ur| jw                  d      s|1 c}} ZeeeH      e8d<   eD ch c]  }|jz                  s| c}ZeeeH      e8d<   i dededededeodceqdededesde|dezde~deQdeSdededei dedeUde`dedededededejdeud eYdewde[dedede`de]debiZeeLeeH   f   e8d<   eD ci c]-  }|ejq                         D ch c]  \  }}||k(  s| c}}/ c}}}ZeeeH   eeL   f   e8d	<   g d
Zyc c}} w c c}w c c}}w c c}}}w (  a"  
Fields define how you'll interact with your data when using the :doc:`orm`.

Internally these are implemented as `descriptors <https://docs.python.org/3/howto/descriptor.html>`_,
which allows us to define methods and type annotations for getting and setting attribute values.

>>> from pyairtable.orm import Model, fields
>>> class Contact(Model):
...     class Meta:
...         ...
...     name = fields.TextField("Name")
...     is_registered = fields.CheckboxField("Registered")
...
>>> contact = Contact(name="George", is_registered=True)
>>> assert contact.name == "George"
>>> reveal_type(contact.name)  # -> str
>>> contact.to_record()
{
    "id": recS6qSLw0OCA6Xul",
    "createdTime": "2021-07-14T06:42:37.000Z",
    "fields": {
        "Name": "George",
        "Registered": True,
    }
}
    N)datedatetime	timedelta)Enum)TYPE_CHECKINGAnyCallableClassVarDictGenericListLiteralOptionalSetTupleTypeTypeVarUnioncastoverload)Self)	TypeAlias)formulasutils)
AITextDictAttachmentDictBarcodeDict
ButtonDictCollaboratorDictCollaboratorEmailDictCreateAttachmentDictRecordId)MissingValueErrorMultipleValuesErrorUnsavedRecordError)schema)AttachmentsListChangeTrackingListModel)
_ClassInfo.r+   TT_Linkedr*   )boundT_APIT_ORM
T_ORM_List	T_Missingc            	       $   e Zd ZU dZdZee   ed<   dZee	   ed<   dZ
eed<   dZeed      ed	<   dZee   ed
<   	 	 d'dededee   ddfdZde	deddfdZedefd       Zedddee	   defd       Zedddee	   deeef   fd       Zded   dee	   deeeef   fdZdddee   ddfdZd(dZde	de	fdZde	de	fdZde	ddfdZd)dZ defdZ!de"e#ee	f      fdZ$de	dd fd!Z%de	dd fd"Z&de	dd fd#Z'de	dd fd$Z(de	dd fd%Z)de	dd fd&Z*y)*FieldaE  
    A generic class for an Airtable field descriptor that will be
    included in an ORM model.

    Type-checked subclasses should provide three type parameters:

        * ``T_API``, indicating the JSON-serializable type returned by the API
        * ``T_ORM``, indicating the type used to store values internally
        * ``T_Missing``, indicating the type of value returned if the field is empty

    Subclasses should also define ``valid_types`` as a type
    or tuple of types, which will be used to validate the type
    of field values being set via this descriptor.
     valid_typesNmissing_valueFreadonlyr*   _model_attribute_name
field_namevalidate_typereturnc                 4    || _         || _        ||| _        yy)a  
        Args:
            field_name: The name of the field in Airtable.
            validate_type: Whether to raise a TypeError if anything attempts to write
                an object of an unsupported type as a field value. If ``False``, you
                may encounter unpredictable behavior from the Airtable API.
            readonly: If ``True``, any attempt to write a value to this field will
                raise an ``AttributeError``. Each field implements appropriate default
                values, but you may find it useful to mark fields as readonly if you
                know that the access token your code uses does not have permission
                to modify specific fields.
        N)r;   r<   r8   )selfr;   r<   r8   s       R/var/www/html/lionshead/venv/lib/python3.12/site-packages/pyairtable/orm/fields.py__init__zField.__init__v   s'    $ %* $DM      ownernamec                      || _         || _        y)zM
        Called when an instance of Field is created within a class.
        N)r9   r:   )r?   rC   rD   s      r@   __set_name__zField.__set_name__   s     #rB   c                     | j                   r1| j                  r%| j                   j                   d| j                   S | j                  dS )z
        Describes the field for the purpose of logging an error message.
        Handles an edge case where a field is created directly onto a class
        that already exists; in those cases, __set_name__ is not called.
        .z field)r9   r:   __name__r;   r?   s    r@   _descriptionzField._description   sH     ;;4//kk**+1T-A-A,BCC//$F++rB   instancec                      y Nr5   r?   rL   rC   s      r@   __get__zField.__get__       EHrB   c                      y rN   r5   rO   s      r@   rP   zField.__get__   s     #&rB   c                     |s| S 	 |j                   | j                     }|t	        t
        | j                        S t	        t        |      S # t        t        f$ r t	        t
        | j                        cY S w xY wrN   )_fieldsr;   KeyErrorAttributeErrorr   r2   r7   r0   )r?   rL   rC   values       r@   rP   zField.__get__   su     K	7$$T__5E =	4#5#566E5!!	 .) 	7	4#5#566	7s   A )A76A7rW   c                    | j                          | j                  r|| j                  |       t        |d      si |_        ||j                  | j
                  <   t        |d      rd|j                  | j
                  <   y y )NrT   _changedT)_raise_if_readonlyr<   valid_or_raisehasattrrT   r;   rY   r?   rL   rW   s      r@   __set__zField.__set__   ss    !%"3&x+!H,1)8Z(15Hdoo. )rB   c                 2    t        d| j                         )Nzcannot delete )rV   rK   )r?   rL   s     r@   
__delete__zField.__delete__   s    ~d.?.?-@ABBrB   c                     |S )zK
        Calculate the value which should be persisted to the API.
        r5   r?   rW   s     r@   to_record_valuezField.to_record_value   	     rB   c                     |S )zX
        Convert a value from the API into the value's internal representation.
        r5   rb   s     r@   to_internal_valuezField.to_internal_value   rd   rB   c           	          | j                   rQt        || j                         s:t        | j                  j                   d| j                    dt        |             yy)zV
        Validate the type of the given value and raise TypeError if invalid.
         value must be ; got N)r6   
isinstance	TypeError	__class__rI   typerb   s     r@   r[   zField.valid_or_raise   s`     Jud6F6F$G>>**+?4;K;K:LFSWX]S^R_`  %HrB   c                 L    | j                   rt        | j                   d      y )Nz is read-only)r8   rV   rK   rJ   s    r@   rZ   zField._raise_if_readonly   s'    == D$5$5#6m!DEE rB   c                     t        | j                        g}|| j                         D cg c]  \  }}| d| c}}z  }| j                  j                  dz   dj                  |      z   dz   S c c}}w )N=(, ))reprr;   _repr_fieldsrl   rI   join)r?   argskeyvals       r@   __repr__zField.__repr__   ss    T__%&D4E4E4GH4GjsCC5#!4GHH~~&&,tyy>DD Is   A0c                 :    d| j                   fd| j                  fgS )Nr8   r<   )r8   r<   rJ   s    r@   ru   zField._repr_fields   s&    'd001
 	
rB   zformulas.Comparisonc                 .    t        j                  | |      S )zX
        Build an :class:`~pyairtable.formulas.EQ` comparison using this field.
        )r   EQrb   s     r@   eqzField.eq        {{4''rB   c                 .    t        j                  | |      S )zX
        Build an :class:`~pyairtable.formulas.NE` comparison using this field.
        )r   NErb   s     r@   nezField.ne   r   rB   c                 .    t        j                  | |      S )zW
        Build a :class:`~pyairtable.formulas.GT` comparison using this field.
        )r   GTrb   s     r@   gtzField.gt   r   rB   c                 .    t        j                  | |      S )zX
        Build an :class:`~pyairtable.formulas.LT` comparison using this field.
        )r   LTrb   s     r@   ltzField.lt  r   rB   c                 .    t        j                  | |      S )zX
        Build a :class:`~pyairtable.formulas.GTE` comparison using this field.
        )r   GTErb   s     r@   gtez	Field.gte       ||D%((rB   c                 .    t        j                  | |      S )zY
        Build an :class:`~pyairtable.formulas.LTE` comparison using this field.
        )r   LTErb   s     r@   ltez	Field.lte  r   rB   )TN)rL   r*   r=   N)r=   N)+rI   
__module____qualname____doc__r6   r
   r+   __annotations__r7   r   r8   boolr9   r   r   r:   strrA   rF   propertyrK   r   SelfTyperP   r   r0   r2   r^   r`   rc   rf   r[   rZ   rz   r   r   ru   r~   r   r   r   r   r   r5   rB   r@   r4   r4   W   sV     )+K*%* $(M8C=' Hd '+FHT']#* &*OXc])
 ##'	%% % 4.	%
 
%4$# $S $T $ ,c , , HHT#YH8H H &&(,S	&	ui	 & &" )"26s)"	x	)	*"6 6 6D 6CS S s s C D FE# E

d5c?3 
( ( 5 (( ( 5 (( ( 5 (( ( 5 () )!6 )) )!6 )rB   r4   )	metaclassc                        e Zd ZdZedddee   defd       Zedddee   de	fd       Zde
d   dee   deee	f   f fd	Zddd
e
e	   ddf fdZ xZS )_Requires_API_ORMa"  
    A mix-in for a Field class which indicates two things:

    1. It should never receive a null value from the Airtable API.
    2. It should never allow other code to set it as None (or the empty string).

    If either of those conditions occur, the field will raise an exception.
    rL   NrC   r=   c                      y rN   r5   rO   s      r@   rP   z_Requires_API_ORM.__get__  rQ   rB   r*   c                      y rN   r5   rO   s      r@   rP   z_Requires_API_ORM.__get__!  rQ   rB   c                 f    t         |   ||      }||dk(  rt        | j                   d      |S )N z received an empty value)superrP   r#   rK   )r?   rL   rC   rW   rl   s       r@   rP   z_Requires_API_ORM.__get__$  s?     %0=ERK#t'8'8&99Q$RSSrB   rW   c                 ^    |dv rt        | j                   d      t        |   ||       y )N)Nr   z does not accept empty values)r#   rK   r   r^   r?   rL   rW   rl   s      r@   r^   z_Requires_API_ORM.__set__,  s3    J#t'8'8&99V$WXX%(rB   )rI   r   r   r   r   r   r   r   rP   r0   r   r   r^   __classcell__rl   s   @r@   r   r     s     HHT#YH8H HHHS	HeH H )26s)	x	) ) )D ) )rB   r   T_FieldSchemac                       e Zd ZdZdefdZy)_FieldSchemaz\
    A mix-in for a Field class which indicates that its field has a particular schema.
    r=   c                 *   t        | t              st        d      | j                  st        | j                   d      t        t        | j                  j                  j                  j                         j                  | j                              S )z:
        Retrieve the schema for the given field.
        z1field_schema() must be called on a Field instancez was not defined on a Model)rj   r4   RuntimeErrorr9   rK   r   r   metatabler&   fieldr;   rJ   s    r@   field_schemaz_FieldSchema.field_schema:  su     $&RSS{{$"3"3!44OPQQ4;;++1188:@@Q
 	
rB   N)rI   r   r   r   r   r   r5   rB   r@   r   r   5  s    

m 

rB   r   _BasicField_BasicFieldWithMissingValue	_RequiresAnyFieldT_Fieldclsr=   c                    | }t        |j                        dkD  rV|j                  sJ|j                  d   }|t        u rt	        |  d      t        |j                        dkD  r|j                  sJ|j                  | _        | S )zQ
    Reuses the class's first parent class's docstring if it's undocumented.
       z needs a docstring)len__mro__r   r4   r   )r   from_clss     r@   _use_inherited_docstringr   Y  s     H
h
!
#H,<,<##A&u#&89:: h
!
#H,<,< ""CKJrB   c                     t        |        | j                  r*t        j                  dd| j                  xs d      | _        | S )zJ
    Modifies the class docstring to indicate read-only vs. writable.
    z)Accepts (?:only )?((?:[^.`]+|`[^`]+`)+)\.zRead only. Returns \1.r   )r   r8   resubr   )r   s    r@   _maybe_readonly_docstringr   f  s<     S!
||ff8%KK2

 JrB   	refs_tagsc                     t        |       dk(  r(| d   | d   j                         j                  dd      f} t        |       dk(  rdnd}d|j                  d	 t	        | d
d
d   | dd
d         D              z  dt
        dt
        ffd}|S )z
    Appends the class docstring with a link to the Airtable API documentation for the field type.
    If the class is undocumented, reuses the class's first parent class's docstring.
    r   r    r      z and rr   z'For more about this field type, see %s.c              3   4   K   | ]  \  }}d | d| d  yw)`z6 <https://airtable.com/developers/web/api/field-model#z>`__Nr5   ).0reftags      r@   	<genexpr>z'_field_api_docstring.<locals>.<genexpr>|  s-      H>JS# C5Fse4P>s   N   r   r=   c                 `    t        |        t        |        t        j                  |        | S rN   )r   r   r   _append_docstring_text)r   	link_texts    r@   _wrapperz&_field_api_docstring.<locals>._wrapper  s(     %!#&$$S)4
rB   )r   lowerreplacerv   zipr   )r   joinerr   r   s      @r@   _field_api_docstringr   t  s    
 9~q\9Q<#5#5#7#?#?R#HI	I!+WF9FKK Hi!ni1o>H = I
g '  OrB   c                     t        |        t        |        d}| j                  s|dz  }|dz  }t        j                  | |       | S )z
    Appends the class's docstring so that it includes a note about required values.
    If the class is undocumented, reuses the class's first parent class's docstring.
    z&If the Airtable API returns ``null``, z6or if a caller sets this field to ``None`` or ``''``, zDthis field raises :class:`~pyairtable.exceptions.MissingValueError`.)r   r   r8   r   r   )r   appends     r@   _required_value_docstringr     sK    
 S!c"5F<<JJ
TTF	  f-JrB   c                       e Zd ZdZdZeZy)_StringFieldzX
    Accepts ``str``.
    Returns ``""`` instead of ``None`` if the field is empty.
    r   N)rI   r   r   r   r7   r   r6   r5   rB   r@   r   r     s    
 MKrB   r   Email	emailtextc                       e Zd Zy)
EmailFieldNrI   r   r   r5   rB   r@   r   r         rB   r   zSync sourcec                       e Zd ZdZy)ExternalSyncSourceFieldTNrI   r   r   r8   r5   rB   r@   r   r     	    
 HrB   r   c                       e Zd ZdZdZy)ManualSortFieldz
    Read-only. Returns ``""`` instead of ``None`` if the field is empty.

    The ``manualSort`` field type is used to define a manual sort order for a list view.
    Its use or behavior via the API is not documented.
    TNrI   r   r   r   r8   r5   rB   r@   r   r     s     HrB   r   z	Long textmultilinetextc                       e Zd Zy)MultilineTextFieldNr   r5   rB   r@   r   r     r   rB   r   Phonec                       e Zd Zy)PhoneNumberFieldNr   r5   rB   r@   r   r     r   rB   r   z	Rich textc                       e Zd Zy)RichTextFieldNr   r5   rB   r@   r   r     r   rB   r   zSingle selectselectc                       e Zd ZdZeZy)SelectFieldz
    Represents a single select dropdown field. Accepts ``str`` or ``None``.

    This will return ``None`` if no value is set, and will only return ``""``
    if an empty dropdown option is available and selected.
    N)rI   r   r   r   r   r6   r5   rB   r@   r   r     s     KrB   r   zSingle line text
simpletextc                       e Zd Zy)SingleLineTextFieldNr   r5   rB   r@   r   r     r   rB   r   c                       e Zd Zy)	TextFieldNr   r5   rB   r@   r   r         
 	rB   r   Urlurltextc                       e Zd Zy)UrlFieldNr   r5   rB   r@   r   r     r   rB   r   c                   ,     e Zd ZdZdeddf fdZ xZS )_NumericFieldBasezU
    Base class for Number, Float, and Integer. Shares a common validation rule.
    rW   r=   Nc           	          t        |t              r:t        | j                  j                   d| j
                   dt        |             t        | !  |       y )Nrh   ri   )	rj   r   rk   rl   rI   r6   rm   r   r[   r?   rW   rl   s     r@   r[   z _NumericFieldBase.valid_or_raise  sW    eT">>**+?4;K;K:LFSWX]S^R_`  	u%rB   )rI   r   r   r   r   r[   r   r   s   @r@   r   r     s     &C &D & &rB   r   c                       e Zd ZdZeefZy)_NumberFieldzW
    Number field with unspecified precision. Accepts either ``int`` or ``float``.
    N)rI   r   r   r   intfloatr6   r5   rB   r@   r   r      s     ,KrB   r   c                       e Zd ZdZeZy)_IntegerFieldzK
    Number field with integer precision. Accepts only ``int`` values.
    N)rI   r   r   r   r   r6   r5   rB   r@   r  r    s     KrB   r  c                       e Zd ZdZeZy)_FloatFieldzM
    Number field with decimal precision. Accepts only ``float`` values.
    N)rI   r   r   r   r   r6   r5   rB   r@   r  r    s     KrB   r  Numberdecimalorintegernumberc                       e Zd Zy)NumberFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)IntegerFieldNr   r5   rB   r@   r	  r	    r   rB   r	  c                       e Zd Zy)
FloatFieldNr   r5   rB   r@   r  r  &  r   rB   r  Checkboxc                       e Zd ZdZdZeZy)CheckboxFieldz\
    Accepts ``bool``.
    Returns ``False`` instead of ``None`` if the field is empty.
    FN)rI   r   r   r   r7   r   r6   r5   rB   r@   r  r  +  s    
 MKrB   r  Countcountc                       e Zd ZdZy)
CountFieldTNr   r5   rB   r@   r  r  6  s    HrB   r  Currencycurrencynumberc                       e Zd Zy)CurrencyFieldNr   r5   rB   r@   r  r  ;  r   rB   r  Percentpercentnumberc                       e Zd Zy)PercentFieldNr   r5   rB   r@   r  r  @  r   rB   r  Ratingc                   ,     e Zd ZdZdeddf fdZ xZS )RatingFieldz<
    Accepts ``int`` values that are greater than zero.
    rW   r=   Nc                 D    t         |   |       |dk  rt        d      y )Nr   zrating cannot be below 1)r   r[   
ValueErrorr   s     r@   r[   zRatingField.valid_or_raiseK  s(    u%19788 rB   )rI   r   r   r   r   r[   r   r   s   @r@   r  r  E  s     9C 9D 9 9rB   r  c                   4    e Zd ZdZeZdedefdZdedefdZy)_DatetimeFieldzm
    Accepts only `datetime <https://docs.python.org/3/library/datetime.html#datetime-objects>`_ values.
    rW   r=   c                 ,    t        j                  |      S )zb
        Convert a ``datetime`` into an ISO 8601 string, e.g. "2014-09-05T12:34:56.000Z".
        )r   datetime_to_iso_strrb   s     r@   rc   z_DatetimeField.to_record_value]  s     ((//rB   c                 ,    t        j                  |      S )zb
        Convert an ISO 8601 string, e.g. "2014-09-05T07:00:00.000Z" into a ``datetime``.
        )r   datetime_from_iso_strrb   s     r@   rf   z _DatetimeField.to_internal_valuec  s     **511rB   N)	rI   r   r   r   r   r6   r   rc   rf   r5   rB   r@   r!  r!  V  s4     K0X 0# 02s 2x 2rB   r!  zDate and timec                       e Zd Zy)DatetimeFieldNr   r5   rB   r@   r'  r'  j  r   rB   r'  Datedateonlyc                   4    e Zd ZdZeZdedefdZdedefdZy)	DateFieldze
    Accepts only `date <https://docs.python.org/3/library/datetime.html#date-objects>`_ values.
    rW   r=   c                 ,    t        j                  |      S )zP
        Convert a ``date`` into an ISO 8601 string, e.g. "2014-09-05".
        )r   date_to_iso_strrb   s     r@   rc   zDateField.to_record_valuew  s     $$U++rB   c                 ,    t        j                  |      S )zP
        Convert an ISO 8601 string, e.g. "2014-09-05" into a ``date``.
        )r   date_from_iso_strrb   s     r@   rf   zDateField.to_internal_value}  s     &&u--rB   N)	rI   r   r   r   r   r6   r   rc   rf   r5   rB   r@   r+  r+  o  s4     K,T ,c ,.s .t .rB   r+  Durationdurationnumberc                   >    e Zd ZdZeZdedefdZdee	ef   defdZ
y)DurationFieldz
    Duration field. Accepts only `timedelta <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_ values.
    rW   r=   c                 "    |j                         S )zC
        Convert a ``timedelta`` into a number of seconds.
        )total_secondsrb   s     r@   rc   zDurationField.to_record_value  s     ""$$rB   c                     t        |      S )zC
        Convert a number of seconds into a ``timedelta``.
        )seconds)r   rb   s     r@   rf   zDurationField.to_internal_value  s     ''rB   N)rI   r   r   r   r   r6   r   rc   r   r   rf   r5   rB   r@   r3  r3    s=     K%Y %5 %(uS%Z'8 (Y (rB   r3  c                       e Zd ZU dZeZee   ed<   e	ee
      ed<   deddf fdZeddd	ee   defd
       Zeddd	ee   defd       Zde	d   d	ee   deeef   fdZddde	ee
      ddf fdZdddefdZdeddf fdZ xZS )_ListFieldBaseat  
    Generic type for a field that stores a list of values.
    Not for direct use; should be subclassed by concrete field types (below).

    Generic type parameters:
        * ``T_API``: The type of value returned by the Airtable API.
        * ``T_ORM``: The type of value stored internally.
        * ``T_ORM_List``: The type of list object that will be returned.
    
list_classcontains_typekwargsr=   Nc                    |j                  dd       | _        |j                  dt              | _        | j                  r2t	        | j                  t
              st        d| j                         t	        | j                  t
              st        d| j                         t        | j                  t              st        d| j                         t        | $  di |S )Nr;  r:  z$contains_type= expected a type, got z!list_class= expected a type, got z3list_class= expected Type[ChangeTrackingList], got r5   )
popr;  r(   r:  rj   rm   rk   
issubclassr   __init_subclass__)r   r<  rl   s     r@   r@  z _ListFieldBase.__init_subclass__  s    "JJ=L2DEZ0A0A4%HB3CTCTBUVWW#..$/??OPQQ#..*<=EcnnEUV  w(2622rB   rL   rC   c                      y rN   r5   rO   s      r@   rP   z_ListFieldBase.__get__  rQ   rB   r*   c                      y rN   r5   rO   s      r@   rP   z_ListFieldBase.__get__  s    JMrB   c                 ,    |s| S | j                  |      S rN   )_get_list_valuerO   s      r@   rP   z_ListFieldBase.__get__  s     K##H--rB   rW   c                 
   t        |t              rbt        || j                        sLt        | j                  t              sJ t	        | j                  t
              sJ | j                  || |      }t        |   ||       y N)r   model)rj   listr:  rm   r?  r(   r   r^   r   s      r@   r^   z_ListFieldBase.__set__  se    eT":eT__+Mdoot444doo/ABBBOOEXOFE%(rB   c                 j   |j                   j                  | j                        }|g }t        || j                        sLt        | j                  t
              sJ t        | j                  t              sJ | j	                  || |      }||j                   | j                  <   t        t        |      S rF  )
rT   getr;   rj   r:  rm   r?  r(   r   r1   r]   s      r@   rD  z_ListFieldBase._get_list_value  s      $$T__5=E %1doot444doo/ABBBOOEXOFE
 -2)J&&rB   c           	          t         |   |       | j                  rB|D ]<  }t        || j                        rt	        d| j                   dt        |              y y Nz	expected ri   )r   r[   r;  rj   rk   rm   r?   rW   objrl   s      r@   r[   z_ListFieldBase.valid_or_raise  s[    u%!#t'9'9:#i0B0B/C6$s)$UVV  rB   )rI   r   r   r   rH  r6   r   r1   r   r   r0   r   r@  r   r   rP   r   r   r^   rD  r[   r   r   s   @r@   r9  r9    s    KZ  DK((
3 3 3 HHT#YH8H HMMS	MjM M. ).26s).	x#	$.) )e0E )$ )' 'J '(WC WD W WrB   r9  c                       e Zd ZdZy)
_ListFieldz
    Generic type for a field that stores a list of values.
    Not for direct use; should be subclassed by concrete field types (below).
    NrI   r   r   r   r5   rB   r@   rP  rP    s    rB   rP  c                       e Zd Z e       Zy)_LinkFieldOptionsN)rI   r   r   objectLinkSelfr5   rB   r@   rS  rS    s	    xHrB   rS  zLink to another record
foreignkeyc                   z    e Zd ZU dZeeeej                     e	e
   f   ed<   dZee   ed<   	 	 	 ddedeeeej                     e	e
   f   dedee   d	ef
 fd
Zede	e
   fd       Zdeeeef      fdZdddddd	ee   dee   ddf fdZdddee
   f fdZdeeee
f      dee   fdZdeddf fdZ xZS )	LinkFieldz
    Represents a MultipleRecordLinks field. Returns and accepts lists of Models.

    Can also be used with a lookup field that pulls from a MultipleRecordLinks field,
    provided the field is created with ``readonly=True``.
    _linked_modelN_max_retriever;   rG  r<   r8   lazyc                     ddl m} |t        j                  u sCt	        |t
              s3t	        |t              rt        ||      st        dt        |             t        | )  |||       || _        || _        y)aA  
        Args:
            field_name: Name of the Airtable field.
            model:
                Model class representing the linked table. There are a few options:

                1. You can provide a ``str`` that is the fully qualified module and class name.
                   For example, ``"your.module.Model"`` will import ``Model`` from ``your.module``.
                2. You can provide a ``str`` that is *just* the class name, and it will be imported
                   from the same module as the model class.
                3. You can provide the sentinel value :data:`~LinkSelf`, and the link field
                   will point to the same model where the link field is created.

            validate_type: Whether to raise a TypeError if attempting to write
                an object of an unsupported type as a field value. If ``False``, you
                may encounter unpredictable behavior from the Airtable API.
            readonly: If ``True``, any attempt to write a value to this field will
                raise an ``AttributeError``. This will not, however, prevent any
                modification of the list object returned by this field.
            lazy: If ``True``, this field will return empty objects with only IDs;
                call :meth:`~pyairtable.orm.Model.fetch` to retrieve values.
        r   r)   z&expected str, Model, or LinkSelf; got r<   r8   N)pyairtable.ormr*   rS  rU  rj   r   rm   r?  rk   r   rA   rY  _lazy)r?   r;   rG  r<   r8   r[  r*   rl   s          r@   rA   zLinkField.__init__  sp    < 	) &///%%5$'Jue,DDT%[MRSS=8T"
rB   r=   c                 b   t        | j                  t              r| j                  j                  d      \  }}}|s:| j                  t        | j                   d      | j                  j                  }t        j                  |      }t        ||      }t        t        t           |      | _        | j                  S | j                  t        j                  u rJ| j                  t        | j                   d      t        t        t           | j                        | _        | j                  S )z
        Resolve a :class:`~pyairtable.orm.Model` class based on
        the ``model=`` constructor parameter to this field instance.
        rH   z not created on a Model)rj   rY  r   
rpartitionr9   r   rK   r   	importlibimport_modulegetattrr   r   r-   rS  rU  )r?   modpath_clsnamemodr   s         r@   linked_modelzLinkField.linked_model@  s    d((#."&"4"4"?"?"DGQ;;&&$*;*;)<<S'TUU++00))'2C#w'C!%d8nc!:D !!! #4#=#=={{""d&7&7%88O#PQQ!%d8ndkk!BD!!!rB   c                 n    d| j                   fd| j                  fd| j                  fd| j                  fgS )NrG  r<   r8   r[  )rY  r<   r8   r_  rJ   s    r@   ru   zLinkField._repr_fieldsW  s@    d(()d001'TZZ 	
 	
rB   r[  memoizerL   r*   rl  c          	         | j                   r:t        || j                         s$t        dt        |       d| j                          ||n| j                  }t
        
|   |      x}syi }|d| j                   D cg c]  }t        |t              s| c}x}rL| j                  j                  t        t        t           |      ||       D ci c]  }|j                  | }}|j                         5  |d| j                   D 	cg c]'  }	t        |	t              r|t        t        |	         n|	) c}	|d| j                   ddd       yc c}w c c}w c c}	w # 1 sw Y   yxY w)a`  
        Populates the field's value for the given instance. This allows you to
        control how linked models are loaded, depending on your need, without
        having to decide at the time of field or model construction.

        Args:
            instance: An instance of this field's :class:`~pyairtable.orm.Model` class.
            lazy: |kwarg_orm_lazy|
            memoize: |kwarg_orm_memoize|

        Usage:

            .. code-block:: python

                from pyairtable.orm import Model, fields as F

                class Book(Model):
                    class Meta: ...

                class Author(Model):
                    class Meta: ...
                    books = F.LinkField("Books", Book)

                author = Author.from_id("reculZ6qSLw0OCA61")
                Author.books.populate(author, lazy=True, memoize=False)
        zpopulate() got z; expected N)rl  fetch)r9   rj   r   rm   r_  r   rD  rZ  r"   ri  from_idsr   r   iddisable_tracking)r?   rL   r[  rl  recordsnew_recordsvnew_record_idsrecordrW   rl   s             r@   populatezLinkField.populate_  s   B ;;z(DKK@!$x.!1T[[MJ  'tTZZ 728<<< 3!3!34
4!
1h8OA4
 
> 

 #//88h8##8 9 F 		6!   %%' %%9t'9'9:- ;E "%2  Xu 56 ;-G(d(() ('
- ('s0   =EEE8E
,E6EEE'c                 D    | j                  |       t        | 	  |      S )av  
        Unlike most other field classes, LinkField does not store its internal
        representation (T_ORM) in instance._fields after Model.from_record().
        They will first be stored as a list of IDs.

        We defer creating Model objects until they're requested for the first
        time, so we can avoid infinite recursion during to_internal_value().
        )rw  r   rD  )r?   rL   rl   s     r@   rD  zLinkField._get_list_value  s!     	hw&x00rB   rW   c                 v   t        d |D              rt        t        t           |      S |D cg c]  }t	        |t              r| }}| j                  |       t        d |D              st        | j                   d      |D cg c]   }t	        |t              r|n|j                  " c}S c c}w c c}w )zT
        Build the list of record IDs which should be persisted to the API.
        c              3   <   K   | ]  }t        |t                y wrN   )rj   r   )r   rt  s     r@   r   z,LinkField.to_record_value.<locals>.<genexpr>  s     15az!S!5   c              3   <   K   | ]  }|j                           y wrN   )exists)r   rv  s     r@   r   z,LinkField.to_record_value.<locals>.<genexpr>  s     9v6==?r{  z contains an unsaved record)	allr   r   r   rj   r[   r%   rK   rp  )r?   rW   rt  rr  s       r@   rc   zLinkField.to_record_value  s     1511S	5)) $>e:a+=1e>G$999 %(9(9'::U%VWW;@A5aZ3'QTT15AA ? Bs   B1B1	%B6c           	          t         |   |       |D ]<  }t        || j                        rt	        d| j                   dt        |              y rL  )r   r[   rj   ri  rk   rm   rM  s      r@   r[   zLinkField.valid_or_raise  sM    u%Cc4#4#45)D,=,=+>fT#YK PQQ rB   )TNF)rI   r   r   r   r   r   r   rS  rU  r   r-   r   rZ  r   r   r   rA   r   ri  r   r   r   ru   rw  r(   rD  rc   r[   r   r   s   @r@   rX  rX    sq    g&7&@&@A4>QRR#'M8C=' ##')) S'"3"<"<=tH~MN) 	)
 4.) )V "d8n " ",
d5c?3 
  $"&BB tn	B
 $B 
BH
1 
14Fx4P 
1BT%X*>%? BDI B*RC RD R RrB   rX  c                   p    e Zd ZdZ ej
                  ej                  d      	 	 	 	 ddede	ee
ej                     ee   f   dedee   d	ed
ef fd       Zdeeeef      fdZedddee   defd       Zedddee   dee   fd       Zded   dee   de	eee   f   fdZdddee   ddfdZdededdf fdZdee	eef      dee   fdZ ej
                  ej6                        dddddd	ee   dee   ddfd       Ze ej
                  ej:                        dee   fd              Z xZS )SingleLinkFielda  
    Represents a MultipleRecordLinks field which we assume will only ever contain one link.
    Returns and accepts a single instance of the linked model, which will be converted to/from
    a list of IDs when communicating with the Airtable API.

    See `Link to another record <https://airtable.com/developers/web/api/field-model#foreignkey>`__.

    .. warning::

        If Airtable returns multiple IDs for a SingleLinkField and you modify the field value,
        only the first ID will be saved to the API once you call ``.save()``. The other IDs will be lost.

    By default, a SingleLinkField will ignore the 2nd...Nth IDs if it receives multiple IDs from the API.
    This behavior can be overridden by passing ``raise_if_many=True`` to the constructor.

    .. code-block:: python

        from pyairtable.orm import Model, fields as F

        class Book(Model):
            class Meta: ...

            author = F.SingleLinkField("Author", Person)
            editor = F.SingleLinkField("Editor", Person, raise_if_many=True)

    Given the model configuration above and the data below,
    one field will silently return a single value,
    while the other field will throw an exception.

    .. code-block:: python

        >>> book = Book.from_record({
        ...     "id": "recZ6qSLw0OCA61ul",
        ...     "createdTime": ...,
        ...     "fields": {
        ...         "Author": ["reculZ6qSLw0OCA61", "rec61ulZ6qSLw0OCA"],
        ...         "Editor": ["recLw0OCA61ulZ6qS", "recOCA61ulZ6qSLw0"],
        ...     }
        ... })
        >>> book.author
        <Person id='reculZ6qSLw0OCA61'>
        >>> book.editor
        Traceback (most recent call last):
          ...
        MultipleValues: Book.editor got more than one linked record

    z    raise_if_many: If ``True``, this field will raise a :class:`~pyairtable.orm.fields.MultipleValues` exception upon being accessed if the underlying field contains multiple values.)r   Nr;   rG  r<   r8   r[  raise_if_manyc                     t         |   |||       || _        t        t           |||||      | _        d| j
                  _        y )Nr]  )r<   r8   r[  r   )r   rA   _raise_if_manyrX  r-   _link_fieldrZ  )r?   r;   rG  r<   r8   r[  r  rl   s          r@   rA   zSingleLinkField.__init__   sR    " 	=8T+$X.'
 *+&rB   r=   c                     d| j                   j                  fd| j                  fd| j                  fd| j                   j                  fd| j
                  fgS )NrG  r<   r8   r[  r  )r  rY  r<   r8   r_  r  rJ   s    r@   ru   zSingleLinkField._repr_fields  s\    d&&445d001'T%%++,d112
 	
rB   rL   rC   c                      y rN   r5   rO   s      r@   rP   zSingleLinkField.__get__&  rQ   rB   r*   c                      y rN   r5   rO   s      r@   rP   zSingleLinkField.__get__)  s    RUrB   c                    |s| S | j                   rMt        |j                  j                  | j                        xs g       dkD  rt        | j                   d      | j                  j                  ||      }	 |d   S # t        $ r Y y w xY w)Nr   z  got more than one linked recordr   )
r  r   rT   rJ  r;   r$   rK   r  rP   
IndexError)r?   rL   rC   linkss       r@   rP   zSingleLinkField.__get__,  s     K3x'7'7';';DOO'L'RPR#SVW#W%$$%%EF    ((59	8O 		s   ;B   	BBrW   c                 J    |d n|g}| j                   j                  ||       y rN   )r  r^   )r?   rL   rW   valuess       r@   r^   zSingleLinkField.__set__;  s%    UG  62rB   rD   c                 ^    t         |   ||       | j                  j                  ||       y rN   )r   rF   r  )r?   rC   rD   rl   s      r@   rF   zSingleLinkField.__set_name__?  s(    UD)%%eT2rB   c                 8    | j                   j                  |      S rN   )r  rc   rb   s     r@   rc   zSingleLinkField.to_record_valueC  s    //66rB   rk  rl  c                @    | j                   j                  |||       y )Nrk  )r  rw  )r?   rL   r[  rl  s       r@   rw  zSingleLinkField.populateF  s     	!!(w!GrB   c                 .    | j                   j                  S rN   )r  ri  rJ   s    r@   ri  zSingleLinkField.linked_modelP  s     ,,,rB   )TNFF)rI   r   r   r   r   docstring_fromrX  rA   r   r   r   rS  rU  r   r-   r   r   r   r   r   ru   r   r   rP   r^   rF   rc   rw  r   ri  r   r   s   @r@   r  r    s3   
.` UP ##'#++ S'"3"<"<=tH~MN+ 	+
 4.+ + ++*
d5c?3 
 HHT#YH8H HUUS	Uhx>PU U )26s)	x(++	,3 30B 3t 33# 3S 3T 37T%X*>%? 7DI 7 U),,-
  $"&HH tn	H
 $H 
H .H U)001-d8n - 2 -rB   r  c                       e Zd ZdZeZy)
_DictFieldz
    Generic field type that stores a single dict. Not for use via API;
    should be subclassed by concrete field types (below).
    N)rI   r   r   r   dictr6   r5   rB   r@   r  r  V  s    
 KrB   r  zAI Textc                       e Zd ZdZdZy)AITextFieldz2
    Read-only field that returns a ``dict``.
    TNr   r5   rB   r@   r  r  _  s     HrB   r  Attachmentsmultipleattachmentc                       e Zd ZdZy)AttachmentsFieldz
    Accepts a list of :class:`~pyairtable.api.types.AttachmentDict` or
    :class:`~pyairtable.api.types.CreateAttachmentDict`.
    NrQ  r5   rB   r@   r  r  h  s    rB   r  )r:  r;  Barcodec                       e Zd ZdZy)BarcodeFieldzG
    Accepts a list of :class:`~pyairtable.api.types.BarcodeDict`.
    NrQ  r5   rB   r@   r  r  w  s    rB   r  Buttonc                       e Zd ZdZdZy)ButtonFieldzS
    Read-only field that returns a :class:`~pyairtable.api.types.ButtonDict`.
    TNr   r5   rB   r@   r  r  ~       HrB   r  Collaboratorc                       e Zd ZdZy)CollaboratorFieldz
    Accepts a :class:`~pyairtable.api.types.CollaboratorDict` or
    :class:`~pyairtable.api.types.CollaboratorEmailDict`.
    NrQ  r5   rB   r@   r  r    s    
rB   r  z
Created byc                       e Zd ZdZdZy)CreatedByFieldzD
    Returns a :class:`~pyairtable.api.types.CollaboratorDict`.
    TNr   r5   rB   r@   r  r    r  rB   r  zCreated timec                       e Zd ZdZy)CreatedTimeFieldTNr   r5   rB   r@   r  r    s	     HrB   r  zLast modified byc                       e Zd ZdZdZy)LastModifiedByFieldzO
    Read-only. Returns a :class:`~pyairtable.api.types.CollaboratorDict`.
    TNr   r5   rB   r@   r  r    s    
 HrB   r  zLast modified timec                       e Zd ZdZy)LastModifiedTimeFieldTNr   r5   rB   r@   r  r    r   rB   r  Lookupc                       e Zd ZdZdZy)LookupFielda  
    Generic field class for a lookup, which returns a list of values.

    pyAirtable does not inspect field configuration at runtime or during type checking.
    If you use mypy, you can declare which type(s) the lookup returns:

    >>> from pyairtable.orm import fields as F
    >>> class MyTable(Model):
    ...     Meta = fake_meta()
    ...     lookup = F.LookupField[str]("My Lookup")
    ...
    >>> rec = MyTable.first()
    >>> rec.lookup
    ["First value", "Second value", ...]
    TNr   r5   rB   r@   r  r    s      HrB   r  zMultiple collaboratorsmulticollaboratorc                       e Zd ZdZy)MultipleCollaboratorsFieldz
    Accepts a list of :class:`~pyairtable.api.types.CollaboratorDict` or
    :class:`~pyairtable.api.types.CollaboratorEmailDict`.
    NrQ  r5   rB   r@   r  r    s    rB   r  )r;  zMultiple selectmultiselectc                       e Zd ZdZy)MultipleSelectFieldz$
    Accepts a list of ``str``.
    NrQ  r5   rB   r@   r  r    s    rB   r  zAuto number
autonumberc                       e Zd ZdZy)AutoNumberFieldTNr   r5   rB   r@   r  r    s	     HrB   r  c                       e Zd Zy)RequiredAITextFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredBarcodeFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredCollaboratorFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredCountFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredCurrencyFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredDateFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredDatetimeFieldNr   r5   rB   r@   r  r    r   rB   r  c                       e Zd Zy)RequiredDurationFieldNr   r5   rB   r@   r  r  #  r   rB   r  c                       e Zd Zy)RequiredEmailFieldNr   r5   rB   r@   r  r  (  r   rB   r  c                       e Zd Zy)RequiredFloatFieldNr   r5   rB   r@   r  r  -  r   rB   r  c                       e Zd Zy)RequiredIntegerFieldNr   r5   rB   r@   r  r  2  r   rB   r  c                       e Zd Zy)RequiredNumberFieldNr   r5   rB   r@   r  r  7  r   rB   r  c                       e Zd Zy)RequiredPercentFieldNr   r5   rB   r@   r  r  <  r   rB   r  c                       e Zd Zy)RequiredPhoneNumberFieldNr   r5   rB   r@   r  r  A  r   rB   r  c                       e Zd Zy)RequiredRatingFieldNr   r5   rB   r@   r  r  F  r   rB   r  c                       e Zd Zy)RequiredRichTextFieldNr   r5   rB   r@   r  r  K  r   rB   r  c                       e Zd Zy)RequiredSelectFieldNr   r5   rB   r@   r  r  P  r   rB   r  c                       e Zd Zy)RequiredTextFieldNr   r5   rB   r@   r  r  U  r   rB   r  c                       e Zd Zy)RequiredSingleLineTextFieldNr   r5   rB   r@   r  r  Z  r   rB   r  c                       e Zd Zy)RequiredMultilineTextFieldNr   r5   rB   r@   r  r  _  r   rB   r  c                       e Zd Zy)RequiredUrlFieldNr   r5   rB   r@   r  r  d  r   rB   r  rf  
ALL_FIELDSREADONLY_FIELDSaiText
autoNumberbarcodebuttoncheckbox	createdBycreatedTimecurrencyr   dateTimedurationemailexternalSyncSourceformulalastModifiedBylastModifiedTimelookup
manualSortmultilineTextmultipleAttachmentsmultipleCollaboratorsmultipleLookupValuesmultipleRecordLinksmultipleSelectsnumberpercentphoneNumberratingrichTextrollupsingleCollaboratorsingleLineTextsingleSelecturlFIELD_TYPES_TO_CLASSESFIELD_CLASSES_TO_TYPES)@r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r+  r'  r3  r   r   r4   r  r	  r  r  rX  rU  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  r   r   )r   abcrb  r   r   r   r   enumr   typingr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   typing_extensionsr   r   r   
pyairtabler   r   pyairtable.api.typesr   r   r   r   r   r    r!   r"   pyairtable.exceptionsr#   r$   r%   pyairtable.modelsr&   Spyairtable.orm.listsr'   r(   r^  r*   rm   r+   r   r,   r-   r/   r0   r1   r2   ABCMetar4   r   FieldSchemar   r   r   r   r   r   r   r   r   r   r   r   r   EmailFieldSchemar   ExternalSyncSourceFieldSchemar   ManualSortFieldSchemar   MultilineTextFieldSchemar   PhoneNumberFieldSchemar   RichTextFieldSchemar   SingleSelectFieldSchemar   SingleLineTextFieldSchemar   r   UrlFieldSchemar   r   r   r   r   r  r  NumberFieldSchemar  r	  r  r   CheckboxFieldSchemar  CountFieldSchemar  CurrencyFieldSchemar  PercentFieldSchemar  RatingFieldSchemar  r!  DateTimeFieldSchemar'  DateFieldSchemar+  DurationFieldSchemar3  r9  rP  rS  rU  MultipleRecordLinksFieldSchemarX  r  r  AITextFieldSchemar  MultipleAttachmentsFieldSchemar  r  BarcodeFieldSchemar  ButtonFieldSchemar  SingleCollaboratorFieldSchemar  CreatedByFieldSchemar  CreatedTimeFieldSchemar  LastModifiedByFieldSchemar  LastModifiedTimeFieldSchemar  MultipleLookupValuesFieldSchemar   MultipleCollaboratorsFieldSchemar  MultipleSelectsFieldSchemar  AutoNumberFieldSchemar  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  varsitemsrj   r?  
startswithr  r8   r  NotImplementedr  r  __all__)rD   field_classr   rx   ry   s   00000r@   <module>r;     s  6   	 . .     & / ' &	 	 	 
 * D$ dE*;$<<=
I =CL:W-\"
K 	z)GE5)+, z)z)u-uUE55H/I )< q}}=
7=) 
& q!Tz*Y *).q!Qw Y 7(A.	9 . CcM*) * )4c3m(<#=
>
' 
g 
7 w S Xwi6H-I ,7 w (.s3  g{+	|A,>,>? 	 ,	 m$,q>>? %lL1H1H$I  k?3	|A4N4N'O 	 4	 g	|\!2J2J%K 	 	 k"	L,q/D/D"E 	 #	 ox0%S$'a6O6O)P  1 (,7	,Q5P5P(Q 	 8	 (,_U	q22A4N4NNOP	 V	 eY'	|\!*:*:; 	 (	&A &$U3:%67 %c* #E*  h 89	,Q-@-@ A 	 :	 h 89	=,q/B/B"C 	 :	 h 89	l1+>+>? 	 :	 j!E$d*+\!:O:O-P  " gw'Q-?-? @  ( j"23	L,q/D/D"E 	 4	 i1	<a.B.B!C 	 2	 h9-a.A.A!B 9  9 2U3$./ 2( o&	NL1F1F$G 	 '	 fj).c4o&Q5F5F(G . *.( j"23(E#y$./a>S>S1T ( 4(2QWE5*$%	$u+tE{J
./QWh1&8&; ;<  
 %% .=FRH8$	&
 112FR >FRRH-H	$s)Xt
#$112H-VQ  i *Z(,q7J7J*K  ! m%9:n.BBC_T 112 ; i :k*L9M9M,N  ! h	zj$$%	   	 n%u%'<<=>001 & l#	 ''(	  $	 n%c8m$))*  & () ,q/J/J"K  * *+L!>!>? , h*Q-a.O.O!P   ( .0CDu%'<<=>334 E '7sO\!">">?s 8 m\2cN(()  3 	+y'< 	 	 	<;)? 	 	 	e$&;;<=	 	 	Ys^ 	 	 	M9U3:5F+G 	 	 		#4S$Y#? 	 	 	M+<S(]+K 	 	 	M+<S)^+L 	 	 	Ys^ 	 	 	Yu%5 	 	 	<3 	 	 	+ysEz1B'C 	 	 	<5e3D)E 	 	 	/3 	 	 	+y~ 	 	 	M9S> 	 	 	+'8c'B 	 	 		9S> 	 	 	"5y~ 	 	 	!3Ys^ 	 	 	x3 	 	 "V\\^#+k+t$;&5 OOC  +#
CX  8B'RzS\\z'RT(^$ R$5k$5/$5 |$5 k	$5
 $5 Z$5 $5 #$5 $5 I$5 $5 $5 Z$5 1$5 ~$5  )!$5" -#$5$ k%$5& /'$5( Y)$5* ++$5, 7-$5. K/$50 91$52 *3$54 k5$56 |7$58 #9$5: k;$5< =$5> n?$5@ +A$5B iC$5D KE$5F 
8G$5 S$x.01 $X :  6 < < >	M >*3#*# >	MM: T(^SX56 8AA# (Sp 
N:s0   4l!$l'7l'l2-l,;l,?l2,l2