Ë
    ÒÍ:j¯  ã                   ó¨   — d dl Z d dlZd dlZd dlmZ d dlmZmZ dedefd„Z	 G d„ deej                  eef      «      Z G d	„ d
eeeef      «      Zy)é    N)ÚMutableMapping)ÚGetterÚSetterÚkeyÚreturnc                 ó„   — t        j                  dd| «      j                  «       }|r|d   j                  «       rd|z   }|S )Nz[^A-Za-z0-9_]Ú_r   )ÚreÚsubÚupperÚisdigit)r   Úresults     úz/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/opentelemetry/propagators/_envcarrier.pyÚ_normalize_keyr      s>   € Ü�V‰VÐ$ c¨3Ó/×5Ñ5Ó7€FÙ�&˜‘)×#Ñ#Ô%Ø�v‘ˆØ€Mó    c                   óˆ   — e Zd ZdZd„ Zdej                  eef   dedee   dz  fd„Z	dej                  eef   dee   fd„Z
y)	ÚEnvironmentGettera±  Getter implementation for extracting context and baggage from environment variables.

    EnvironmentGetter creates a normalized lookup from the current environment
    variables at initialization time and provides simple data access without validation.

    Per the OpenTelemetry specification, environment variables are treated as immutable
    within a process. For environments where context-carrying environment variables
    change between logical requests (e.g., AWS Lambda's _X_AMZN_TRACE_ID), create a
    new EnvironmentGetter instance at the start of each request.

    Example usage:
        getter = EnvironmentGetter()
        traceparent = getter.get({}, "traceparent")
    c                 ó�   — t         j                  j                  «       D ��ci c]  \  }}t        |«      |“Œ c}}| _        y c c}}w )N)ÚosÚenvironÚitemsr   Úcarrier)ÚselfÚkÚvs      r   Ú__init__zEnvironmentGetter.__init__#   s;   € ô .0¯Z©Z×-=Ñ-=Ó-?÷(
Ù%) Q¨ŒN˜1Ó˜qÑ ó(
ˆ�ùó (
s   ¢Ar   r   r   Nc                 óV   — | j                   j                  t        |«      «      }|€y|gS )aI  Get a value from the environment carrier for the given key.

        Args:
            carrier: Not used; maintained for interface compatibility with Getter[CarrierT]
            key: The key to look up (case-insensitive)

        Returns:
            A list with a single string value if the key exists, None otherwise.
        N)r   Úgetr   )r   r   r   Úvals       r   r   zEnvironmentGetter.get*   s,   € ð �l‰l×Ñœ~¨cÓ2Ó3ˆØˆ;ØØˆuˆr   c                 óH   — t        | j                  j                  «       «      S )zðGet all keys from the environment carrier.

        Args:
            carrier: Not used; maintained for interface compatibility with Getter[CarrierT]

        Returns:
            List of all environment variable keys (normalized).
        )Úlistr   Úkeys)r   r   s     r   r"   zEnvironmentGetter.keys;   s   € ô �D—L‘L×%Ñ%Ó'Ó(Ð(r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚtypingÚMappingÚstrr!   r   r"   © r   r   r   r      sc   „ ñò
ðØ—~‘~ c¨3 hÑ/ðØ69ðà	ˆc‰�TÑ	óð"	)˜FŸN™N¨3°¨8Ñ4ð 	)¸¸c¹ô 	)r   r   c                   ó2   — e Zd ZdZdeeef   dededdfd„Zy)ÚEnvironmentSettera�  Setter implementation for building environment variable dictionaries.

    EnvironmentSetter builds a dictionary of environment variables that
    can be passed to utilities like subprocess.run()

    Example usage:
        setter = EnvironmentSetter()
        env_vars = {}
        setter.set(env_vars, "traceparent", "00-trace-id-span-id-01")
        subprocess.run(myCommand, env=env_vars)
    r   r   Úvaluer   Nc                 ó    — ||t        |«      <   y)zôSet a value in the carrier dictionary for the given key.

        Args:
            carrier: Dictionary to store environment variables
            key: The key to set (will be converted to uppercase)
            value: The value to set
        N)r   )r   r   r   r-   s       r   ÚsetzEnvironmentSetter.setT   s   € ð (-ˆ”˜sÓ#Ò$r   )r#   r$   r%   r&   r   r)   r/   r*   r   r   r,   r,   G   s5   „ ñ
ð
-Ø% c¨3 hÑ/ð
-Ø69ð
-ØBEð
-à	ô
-r   r,   )r   r
   r'   Úcollections.abcr   Ú!opentelemetry.propagators.textmapr   r   r)   r   r(   r   r,   r*   r   r   ú<module>r2      sb   ðó 
Û 	Û Ý *ç <ð˜ð  ó ô1)˜˜vŸ~™~¨c°3¨hÑ7Ñ8ô 1)ôh-˜˜~¨c°3¨hÑ7Ñ8õ -r   