Ë
    Ìi_J  ã            	       óÂ  — d dl Z d dl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 d dlmZmZmZmZ d dlmZ g d¢Zej*                  Z G d„ d	«      Z e«       Z	  G d
„ d«      Zdedefd„Zde	eeeef   defd„Z G d„ de«      Zdedefd„Zdedefd„Z ddœdededefd„Z!dededefd„Z"dedee   fd„Z#dedee   fd „Z$ddœdededeeef   fd!„Z%d"ed#edefd$„Z&y)%é    N)Úpartial)ÚJSONEncoder)	ÚDictÚListÚOptionalÚUnionÚcastÚAnyÚTypeÚCallableÚTuple)ÚdatetimeÚdateÚtimeÚ	timedelta)Útimezone)ÚNULLÚAzureJSONEncoderÚis_generated_modelÚas_attribute_dictÚattribute_listÚTypeHandlerRegistryÚget_backcompat_attr_namec                   ó   — e Zd ZdZdefd„Zy)Ú_NullzTo create a Falsy objectÚreturnc                  ó   — y)NF© ©Úselfs    úY/var/www/html/strategist-ai/venv/lib/python3.12/site-packages/azure/core/serialization.pyÚ__bool__z_Null.__bool__   s   € Øó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úboolr"   r   r#   r!   r   r      s   „ Ù"ð˜$ô r#   r   c            
       ó0  — e Zd ZdZdd„Zdeeeege	f   f   deeege
eef   f   geege
eef   f   f   fd„Zdeeeege	f   f   deeee
eef   gef   geee
eef   gef   f   fd„Zdedeeege
eef   f      fd	„Zd
edeee
eef   gef      fd„Zy)r   zUA registry for custom serializers and deserializers for specific types or conditions.r   Nc                 óX   — i | _         i | _        g | _        g | _        i | _        i | _        y ©N)Ú_serializer_typesÚ_deserializer_typesÚ_serializer_predicatesÚ_deserializer_predicatesÚ_serializer_cacheÚ_deserializer_cacher   s    r!   Ú__init__zTypeHandlerRegistry.__init__-   s2   € Ø79ˆÔØ9;ˆÔ ØTVˆÔ#ØVXˆÔ%àACˆÔØCEˆÕ r#   Ú	conditionc                 óœ   ‡ ‡— dt         t        gt        t        t        f   f   dt         t        gt        t        t        f   f   fˆˆ fd„}|S )aã  Decorator to register a serializer.

        The handler function is expected to take a single argument, the object to serialize,
        and return a dictionary representation of that object.

        Examples:

        .. code-block:: python

            @registry.register_serializer(CustomModel)
            def serialize_single_type(value: CustomModel) -> dict:
                return value.to_dict()

            @registry.register_serializer(lambda x: isinstance(x, BaseModel))
            def serialize_with_condition(value: BaseModel) -> dict:
                return value.to_dict()

            # Called manually for a specific type
            def custom_serializer(value: CustomModel) -> Dict[str, Any]:
                return {"custom": value.custom}

            registry.register_serializer(CustomModel)(custom_serializer)

        :param condition: A type or a callable predicate function that takes an object and returns a bool.
        :type condition: Union[Type, Callable[[Any], bool]]
        :return: A decorator that registers the handler function.
        :rtype: Callable[[Callable[[Any], Dict[str, Any]]], Callable[[Any], Dict[str, Any]]]
        :raises TypeError: If the condition is neither a type nor a callable.
        Úhandler_funcr   c                 óä   •— t        ‰t        «      r| ‰j                  ‰<   n4t        ‰«      r‰j                  j                  ‰| f«       nt        d«      ‚‰j                  j                  «        | S ©Nz:Condition must be a type or a callable predicate function.)	Ú
isinstanceÚtyper,   Úcallabler.   ÚappendÚ	TypeErrorr0   Úclear©r5   r3   r    s    €€r!   Ú	decoratorz:TypeHandlerRegistry.register_serializer.<locals>.decoratorW   sb   ø€ Ü˜)¤TÔ*Ø4@�×&Ñ& yÒ1Ü˜)Ô$Ø×+Ñ+×2Ñ2°I¸|Ð3LÕMäÐ \Ó]Ð]à×"Ñ"×(Ñ(Ô*ØÐr#   )r   r
   r   Ústr©r    r3   r?   s   `` r!   Úregister_serializerz'TypeHandlerRegistry.register_serializer6   sN   ù€ ðB		 ¤H¬c¨U´D¼¼c¸±NÐ-BÑ$Cð 		 ÌÔRUÐQVÔX\Ô]`ÔbeÐ]eÑXfÐQfÑHgö 		 ð Ðr#   c                 ó°   ‡ ‡— dt         t        t        t        t        f   gt        f   dt         t        t        t        t        f   gt        f   fˆˆ fd„}|S )a<  Decorator to register a deserializer.

        The handler function is expected to take two arguments: the target type and the data dictionary,
        and return an instance of the target type.

        Examples:

        .. code-block:: python

            @registry.register_deserializer(CustomModel)
            def deserialize_single_type(cls: Type[CustomModel], data: dict) -> CustomModel:
                return cls(**data)

            @registry.register_deserializer(lambda t: issubclass(t, BaseModel))
            def deserialize_with_condition(cls: Type[BaseModel], data: dict) -> BaseModel:
                return cls(**data)

            # Called manually for a specific type
            def custom_deserializer(cls: Type[CustomModel], data: Dict[str, Any]) -> CustomModel:
                return cls(custom=data["custom"])

            registry.register_deserializer(CustomModel)(custom_deserializer)

        :param condition: A type or a callable predicate function that takes an object and returns a bool.
        :type condition: Union[Type, Callable[[Any], bool]]
        :return: A decorator that registers the handler function.
        :rtype: Callable[[Callable[[Type, Dict[str, Any]], Any]], Callable[[Type, Dict[str, Any]], Any]]
        :raises TypeError: If the condition is neither a type nor a callable.
        r5   r   c                 óä   •— t        ‰t        «      r| ‰j                  ‰<   n4t        ‰«      r‰j                  j                  ‰| f«       nt        d«      ‚‰j                  j                  «        | S r7   )	r8   r9   r-   r:   r/   r;   r<   r1   r=   r>   s    €€r!   r?   z<TypeHandlerRegistry.register_deserializer.<locals>.decorator…   sb   ø€ Ü˜)¤TÔ*Ø6B�×(Ñ(¨Ò3Ü˜)Ô$Ø×-Ñ-×4Ñ4°iÀÐ5NÕOäÐ \Ó]Ð]à×$Ñ$×*Ñ*Ô,ØÐr#   )r   r   r   r@   r
   rA   s   `` r!   Úregister_deserializerz)TypeHandlerRegistry.register_deserializerd   sT   ù€ ðB		 ¤H¬d´D¼¼c¸±NÐ-CÄSÐ-HÑ$Ið 		 ÌhÔX\Ô^bÔcfÔhkÐckÑ^lÐWmÔorÐWrÑNsö 		 ð Ðr#   Úobjc                 ó   — t        |«      }|| j                  v r| j                  |   S | j                  j                  t        |«      «      }|s | j                  D ]  \  }} ||«      sŒ|} n || j                  |<   |S )aë  Gets the appropriate serializer for an object.

        It first checks the type dictionary for a direct type match.
        If no match is found, it iterates through the predicate list to find a match.

        Results of the lookup are cached for performance based on the object's type.

        :param obj: The object to serialize.
        :type obj: any
        :return: The serializer function if found, otherwise None.
        :rtype: Optional[Callable[[Any], Dict[str, Any]]]
        )r9   r0   r,   Úgetr.   )r    rF   Úobj_typeÚhandlerÚ	predicateÚpred_handlers         r!   Úget_serializerz"TypeHandlerRegistry.get_serializer’   s‰   € ô ˜“9ˆØ�t×-Ñ-Ñ-Ø×)Ñ)¨(Ñ3Ð3à×(Ñ(×,Ñ,¬T°#«YÓ7ˆÙØ+/×+FÑ+Fò Ñ'�	˜<Ù˜S•>Ø*�GÙðð
 ,3ˆ×Ñ˜xÑ(Øˆr#   Úclsc                 ó  — || j                   v r| j                   |   S | j                  j                  |«      }|s | j                  D ]  \  }} ||«      sŒ|} n |rt	        ||«      nd| j                   |<   | j                   |   S )aX  Gets the appropriate deserializer for a class.

        It first checks the type dictionary for a direct type match.
        If no match is found, it iterates through the predicate list to find a match.

        Results of the lookup are cached for performance based on the class.

        :param cls: The class to deserialize.
        :type cls: type
        :return: A deserializer function bound to the specified class that takes a dictionary and returns
            an instance of that class, or None if no deserializer is found.
        :rtype: Optional[Callable[[Dict[str, Any]], Any]]
        N)r1   r-   rH   r/   r   )r    rN   rJ   rK   rL   s        r!   Úget_deserializerz$TypeHandlerRegistry.get_deserializer­   s•   € ð �$×*Ñ*Ñ*Ø×+Ñ+¨CÑ0Ð0à×*Ñ*×.Ñ.¨sÓ3ˆÙØ+/×+HÑ+Hò Ñ'�	˜<Ù˜S•>Ø*�GÙðñ
 BI¬°¸Ô(=Èdˆ× Ñ  Ñ%Ø×'Ñ'¨Ñ,Ð,r#   )r   N)r$   r%   r&   r'   r2   r   r   r   r
   r(   r   r@   rB   rE   r   rM   rP   r   r#   r!   r   r   *   s/  „ Ù_óFð,Ø˜t X¨s¨e°T¨kÑ%:Ð:Ñ;ð,à	�8˜S˜E 4¨¨S¨¡>Ð1Ñ2Ð3°X¸s¸eÀTÈ#ÈsÈ(Á^Ð>SÑ5TÐTÑ	Uó,ð\,Ø˜t X¨s¨e°T¨kÑ%:Ð:Ñ;ð,à	�8˜T 4¨¨S¨¡>Ð2°CÐ7Ñ8Ð9¸8ÀTÈ4ÐPSÐUXÐPXÉ>ÐDZÐ\_ÐD_Ñ;`Ð`Ñ	aó,ð\ #ð ¨(°8¸S¸EÀ4ÈÈSÈÁ>Ð<QÑ3RÑ*Só ð6- Dð -¨X°hÀÀSÈ#ÀXÁÐ?OÐQTÐ?TÑ6UÑ-Vô -r#   r   Útdr   c                 óV  — | j                  «       }t        |d«      \  }}t        |d«      \  }}t        |d«      \  }}t        t        t        |||f«      «      \  }}}t        |d«      }d}|rd|z  }d}|xs |}|r|dj                  |«      z  }|xs |}|r|dj                  |«      z  }	 |j                  «       rd	j                  t	        |«      «      }nd
|z  }|j                  d«      }|dj                  |«      z  }d|z   |z   S # t        $ r d	j                  |«      }Y Œ8w xY w)au  Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S'

    Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython

    :param td: The timedelta object to convert
    :type td: datetime.timedelta
    :return: An ISO 8601 formatted string representing the timedelta object
    :rtype: str
    é<   é   é   Ú z%sDÚTz{:02}Hz{:02}Mz{:02}z%09.6fÚ0z{}SÚP)
Útotal_secondsÚdivmodÚlistÚmapÚintÚroundÚformatÚ
is_integerÚrstripÚAttributeError)	rQ   ÚsecondsÚminutesÚhoursÚdaysÚdate_strÚtime_strÚbigger_existsÚseconds_strings	            r!   Ú_timedelta_as_isostrrl   É   sN  € ð ×ÑÓ €GÜ˜g rÓ*Ñ€GˆWÜ˜G RÓ(�N€Eˆ7Ü˜ Ó#�K€Dˆ%ä¤¤C¨$°°wÐ)?Ó @ÓAÑ€Dˆ%�Ü�G˜QÓ€Gð €HÙØ˜4‘<ˆð €Hð Ò% €MÙØ�H—O‘O EÓ*Ñ*ˆð "Ò, W€MÙØ�H—O‘O GÓ,Ñ,ˆð	1Ø×ÑÔØ$Ÿ^™^¬C°«LÓ9‰Nð &¨Ñ/ˆNà+×2Ñ2°3Ó7ˆNð �—‘˜^Ó,Ñ,€Hà�‰>˜HÑ$Ð$øô ò 1Ø Ÿ™¨Ó0Šð1ús   Â.AD ÄD(Ä'D(Údtc                 óÎ  — t        | d«      r‚t        | d«      rvt        t        | «      } | j                  s%| j	                  t
        ¬«      j                  «       }n#| j                  t
        «      j                  «       }|j	                  dd«      S 	 t        t        t        t        f   | «      } | j                  «       S # t        $ r t        t        | «      } t        | «      cY S w xY w)aC  Converts a datetime.(datetime|date|time|timedelta) object into an ISO 8601 formatted string.

    :param dt: The datetime object to convert
    :type dt: datetime.datetime or datetime.date or datetime.time or datetime.timedelta
    :return: An ISO 8601 formatted string representing the datetime object
    :rtype: str
    ÚyearÚhour)Útzinfoz+00:00ÚZ)Úhasattrr	   r   rq   ÚreplaceÚTZ_UTCÚ	isoformatÚ
astimezoner   r   r   rc   r   rl   )rm   Úiso_formatteds     r!   Ú_datetime_as_isostrry      s¹   € ô ˆr�6Ôœw r¨6Ô2Ü”(˜BÓˆà�yŠyØŸJ™J¬f˜JÓ5×?Ñ?ÓA‰MàŸM™M¬&Ó1×;Ñ;Ó=ˆMà×$Ñ$ X¨sÓ3Ð3ð(Ü”%œœd˜
Ñ# RÓ(ˆØ�|‰|‹~Ðøäò (Ü”)˜RÓ ˆÜ# BÓ'Ò'ð(ús   Â,B= Â=$C$Ã#C$c                   ó,   ‡ — e Zd ZdZdedefˆ fd„Zˆ xZS )r   zHA JSON encoder that's capable of serializing datetime objects and bytes.Úor   c                 óÒ   •— t        |t        t        f«      r#t        j                  |«      j                  «       S 	 t        |«      S # t        $ r Y nw xY wt        t        | �+  |«      S )zçOverride the default method to handle datetime and bytes serialization.
        :param o: The object to serialize.
        :type o: any
        :return: A JSON-serializable representation of the object.
        :rtype: any
        )r8   ÚbytesÚ	bytearrayÚbase64Ú	b64encodeÚdecodery   rc   Úsuperr   Údefault)r    r{   Ú	__class__s     €r!   rƒ   zAzureJSONEncoder.default  sc   ø€ ô �aœ%¤Ð+Ô,Ü×#Ñ# AÓ&×-Ñ-Ó/Ð/ð	Ü& qÓ)Ð)øÜò 	Ùð	úäÔ% tÑ4°QÓ7Ð7s   ¼
A Á	AÁA)r$   r%   r&   r'   r
   rƒ   Ú__classcell__)r„   s   @r!   r   r     s   ø„ ÙRð8˜ð 8 ÷ 8ñ 8r#   r   rF   c                 óJ   — t        t        | dd«      xs t        | d«      «      S )zÇCheck if the object is a generated SDK model.

    :param obj: The object to check.
    :type obj: any
    :return: True if the object is a generated SDK model, False otherwise.
    :rtype: bool
    Ú	_is_modelFÚ_attribute_map)r(   Úgetattrrs   )rF   s    r!   r   r   /  s%   € ô ”˜˜[¨%Ó0ÒR´G¸CÐAQÓ4RÓSÐSr#   Úpc                 óB   — 	 | j                   dgk(  S # t        $ r Y yw xY w)z¢Check if an attribute is readonly.

    :param any p: The property to check.
    :return: True if the property is readonly, False otherwise.
    :rtype: bool
    ÚreadF)Ú_visibilityrc   )rŠ   s    r!   Ú_is_readonlyrŽ   :  s*   € ðØ�}‰}  Ñ(Ð(øÜò Ùðús   ‚ ’	�F©Úexclude_readonlyÚvr�   c          	      óR  ‡— | �t        | t        «      ry t        | t        t        t        f«      r t        | «      ˆfd„| D «       «      S t        | t        «      r/| j                  «       D ��ci c]  \  }}|t        |‰¬«      “Œ c}}S t        | «      rt        | ‰¬«      S | S c c}}w )Nc              3   ó8   •K  — | ]  }t        |‰¬ «      –— Œ y­w)r�   N)Ú_as_attribute_dict_value)Ú.0Úxr�   s     €r!   ú	<genexpr>z+_as_attribute_dict_value.<locals>.<genexpr>K  s   øè ø€ ÒaÐZ[Ô/°ÐDT×UÐUÑaùs   ƒr�   )r8   r   r\   ÚtupleÚsetr9   ÚdictÚitemsr”   r   r   )r‘   r�   ÚdkÚdvs    `  r!   r”   r”   G  s™   ø€ Ø€y”J˜q¤%Ô(ØÜ�!”dœE¤3Ð'Ô(ØŒt�A‹wÓaÐ_`ÔaÓaÐaÜ�!”TÔØbc×biÑbiÓbk×lÑX^ÐXZÐ\^�Ô,¨RÐBRÔSÑSÓlÐlÜFXÐYZÔF[Ô˜QÐ1AÔBÐbÐabÐbùó ms   Á-B#Ú
rest_fieldÚdefault_attr_namec                 óF   — 	 | j                   xs |S # t        $ r |cY S w xY w)a  Get the backcompat name for an attribute.

    :param any rest_field: The rest field to get the backcompat name from.
    :param str default_attr_name: The default attribute name to use if no backcompat name
    :return: The backcompat name.
    :rtype: str
    )Ú_original_tsp_namerc   )rž   rŸ   s     r!   Ú_get_backcompat_namer¢   Q  s.   € ð!Ø×,Ñ,ÒAÐ0AÐAøÜò !Ø Ò ð!ús   ‚ ’ Ÿ c           	      óp  — d}	 t        | t        d„ t        | «      D «       «      d«      }|€y| j                  j                  «       D ]O  \  }}	 t        |j                  j                  j                  «       «      j                  t        |«      «      r|c S ŒQ y# t        $ r Y yw xY w# t        $ r Y Œmw xY w)zìGet the name of the flattened attribute in a generated TypeSpec model if one exists.

    :param any obj: The object to check.
    :return: The name of the flattened attribute if it exists, otherwise None.
    :rtype: Optional[str]
    Nc              3   ó*   K  — | ]  }d |v sŒ|–— Œ y­w)Ú__flattened_itemsNr   )r•   Úas     r!   r—   z+_get_flattened_attribute.<locals>.<genexpr>h  s   è ø€ Ò+\°!ÐCVÐZ[ÒC[¬AÑ+\ùs   ‚	Œ)r‰   ÚnextÚdirÚStopIterationÚ_attr_to_rest_fieldr›   r™   Ú_class_typeÚkeysÚintersectionrc   )rF   Úflattened_itemsÚkr‘   s       r!   Ú_get_flattened_attributer°   _  sÀ   € ð €OðÜ! #¤tÑ+\´s¸3³xÔ+\Ó'\Ð^bÓcˆð ÐØà×'Ñ'×-Ñ-Ó/ò ‰ˆˆ1ð	Ü�1—=‘=×4Ñ4×9Ñ9Ó;Ó<×IÑIÌ#ÈoÓJ^Ô_Ø’ð `ðð øô ò Ùðûô ò 	áð	ús$   „&B ÁAB)Â	B&Â%B&Â)	B5Â4B5c                 ód  — t        | «      st        d«      ‚t        | d«      r#t        | j                  j                  «       «      S t        | «      }g }| j                  j                  «       D ]@  \  }}||k(  r%|j                  t        |j                  «      «       Œ0|j                  |«       ŒB |S )zÂGet a list of attribute names for a generated SDK model.

    :param obj: The object to get attributes from.
    :type obj: any
    :return: A list of attribute names.
    :rtype: List[str]
    z$Object is not a generated SDK model.rˆ   )r   r<   rs   r\   rˆ   r¬   r°   rª   r›   Úextendr   r«   r;   )rF   Úflattened_attributeÚretvalÚ	attr_namerž   s        r!   r   r   y  s¢   € ô ˜cÔ"ÜÐ>Ó?Ð?ÜˆsÐ$Ô%ä�C×&Ñ&×+Ñ+Ó-Ó.Ð.Ü2°3Ó7ÐØ€FØ!$×!8Ñ!8×!>Ñ!>Ó!@ò %Ñˆ	�:Ø )Ò+Ø�M‰Mœ.¨×)?Ñ)?Ó@ÕAà�M‰M˜)Õ$ð	%ð
 €Mr#   c                ó¦  ‡— t        | «      st        d«      ‚t        | d«      r| j                  | ¬«      S 	 i }t	        «       }i }t        | «      }| j                  j                  «       D ]}  \  }}|r&t        |«      r|j                  |j                  «       ||k(  r<|j                  j                  j                  «       D ]  \  }}	|||	j                  <   Œ Œo|||j                  <   Œ | j                  «       D ]§  \  Š}
|r‰|v rŒ‰|k(  r9|
j                  «       D ]%  \  }}	t        |	|¬«      ||j                  ||«      <   Œ' ŒKd}	 t        ˆfd„| j                  j                  «       D «       «      j                   }|r|
nt        |
|¬«      ||j                  ‰‰«      <   Œ© |S # t"        $ r Y Œ3w xY w# t$        $ r}t        d«      |‚d}~ww xY w)a  Convert an object to a dictionary of its attributes.

    Made solely for backcompatibility with the legacy `.as_dict()` on msrest models.

    .. deprecated::1.35.0
        This function is added for backcompat purposes only.

    :param any obj: The object to convert to a dictionary
    :keyword bool exclude_readonly: Whether to exclude readonly properties
    :return: A dictionary containing the object's attributes
    :rtype: dict[str, any]
    :raises TypeError: If the object is not a generated model instance
    ú*Object must be a generated model instance.rˆ   )Úkeep_readonlyr�   Fc              3   óB   •K  — | ]  }|j                   ‰k(  sŒ|–— Œ y ­wr+   )Ú
_rest_name)r•   Úrfr¯   s     €r!   r—   z$as_attribute_dict.<locals>.<genexpr>¾  s"   øè ø€ ò 3Ø!ÈÏÉÐZ[ÓI[œñ3ùs   ƒ˜N)r   r<   rs   Úas_dictr™   r°   rª   r›   rŽ   Úaddrº   r«   r”   rH   r§   ÚvaluesÚ_is_multipart_file_inputr©   rc   )rF   r�   ÚresultÚreadonly_propsÚrest_to_attrr³   rµ   rž   ÚfkÚfvr‘   Úis_multipart_file_inputÚexcr¯   s                @r!   r   r   �  sþ  ø€ ô ˜cÔ"ÜÐDÓEÐEÜˆsÐ$Ô%à�{‰{Ð-=Ð)=ˆ{Ó>Ð>ð'OàˆÜ›ˆð ˆÜ6°sÓ;ÐØ%(×%<Ñ%<×%BÑ%BÓ%Dò 		@Ñ!ˆI�zá¤L°Ô$<à×"Ñ" :×#8Ñ#8Ô9Ø" iÒ/Ø(×4Ñ4×HÑH×NÑNÓPò 5‘F�B˜Ø24�L §¡Ò/ñ5ð 7@�˜Z×2Ñ2Ò3ð		@ð —I‘I“Kò 	‰DˆAˆqÙ A¨Ñ$7ØØÐ'Ò'ØŸg™g›iò w‘F�B˜Ü7OÐPRÐeuÔ7v�F˜<×+Ñ+¨B°Ó3Ò4ñwð +0Ð'ðÜ.2ó 3Ø%(×%<Ñ%<×%CÑ%CÓ%Eô3ó /ç.Ñ.ð ,ñ 1‘AÔ6NÈqÐcsÔ6tð �|×'Ñ'¨¨1Ó-Ò.ð	ð$ ˆøô %ò Ùðûô ò OäÐDÓEÈ3ÐNûðOús<   ¸DF6 Å	6F'Å?'F6 Æ'	F3Æ0F6 Æ2F3Æ3F6 Æ6	GÆ?GÇGÚmodelrµ   c                 ó@  — t        | «      st        d«      ‚t        | «      }| j                  j	                  «       D ]_  \  }}||k(  rt        ||«      c S ||k(  sŒ|j                  j                  j	                  «       D ]  \  }}||k(  sŒt        ||«      c c S  Œa |S )aÁ  Get the backcompat attribute name for a given attribute.

    This function takes an attribute name and returns the backcompat name (original TSP name)
    if one exists, otherwise returns the attribute name itself.

    :param any model: The model instance.
    :param str attr_name: The attribute name to get the backcompat name for.
    :return: The backcompat attribute name (original TSP name) or the attribute name itself.
    :rtype: str
    r·   )r   r<   r°   rª   r›   r¢   r«   )rÇ   rµ   r³   Úfield_attr_namerž   rÃ   rÄ   s          r!   r   r   Í  s«   € ô ˜eÔ$ÜÐDÓEÐEô 3°5Ó9ÐØ',×'@Ñ'@×'FÑ'FÓ'Hò 8Ñ#ˆ˜à˜iÒ'ä'¨
°IÓ>Ò>ð  /Ó1Ø$×0Ñ0×DÑD×JÑJÓLò 8‘��BØ˜“?ä/°°BÓ7Ô7ñ8ð8ð Ðr#   )'r   Ú	functoolsr   Újsonr   Útypingr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   Ú__all__Úutcru   r   r   r   r@   rl   ry   r   r(   r   rŽ   r”   r¢   r°   r   r   r   r   r#   r!   ú<module>rÏ      sx  ðó Ý Ý ß P× PÕ Pß 4Ó 4Ý ò€ð 
�‰€÷ñ ñ ƒw€ð÷\-ñ \-ð~4%˜Yð 4%¨3ó 4%ðn(˜E (¨D°$¸	Ð"AÑBð (Àsó (ô88�{ô 8ð&T˜Cð T Dó Tð
�Cð 
˜Dó 
ð BGò c ð c¸$ð cÈ3ó cð! Sð !¸Sð !ÀSó !ð #ð ¨(°3©-ó ð4˜ð   S¡	ó ð. =Bò :O˜3ð :O°Tð :OÀdÈ3ÐPSÈ8Ánó :Oðz Cð °Cð ¸Cô r#   