
    {bj              	       ~    S SK r SSSSS.r0 \ESS0ErS\S	\\\4   S
\4S jrSS\S\\\4   S-  S
\\\4   4S jjrg)    N
	"\)ntr   r   $valueescapesreturnc                 <   ^ [         R                  " SU4S jU 5      $ )a>  Expand backslash escapes in a single left-to-right pass.

Processing in one pass (rather than chained `str.replace` calls) ensures an escaped
backslash (`\\`) is consumed as a unit and cannot merge with the following character,
e.g. `\\n` is a backslash followed by `n`, not a newline. Unknown escapes are kept as-is.
z\\(.)c                 d   > TR                  U R                  S5      U R                  S5      5      $ )N   r   )getgroup)matchr   s    ڙ/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/stt/lib/python3.13/site-packages/huggingface_hub/utils/_dotenv.py<lambda>_unescape.<locals>.<lambda>   s!    '++ekk!nekkRSn*U    )resub)r
   r   s    `r   	_unescaper      s     66(UW\]]r   
dotenv_strenvironc                    0 n[         R                  " S[         R                  5      nU R                  5        GHH  nUR	                  5       nU(       a  UR                  S5      (       a  M3  UR                  U5      nU(       d  MM  UR                  S5      nSnUR                  S5      (       a  UR                  S5      =(       d    UR                  S5      =(       d    SnUR	                  5       nUR                  S	5      (       a*  UR                  S	5      (       a  [        USS
 [        5      nOFUR                  S5      (       a  UR                  S5      (       a  USS
 nOUb  UR                  U5      nUc  GMD  XrU'   GMK     U$ )z
Parse a DOTENV-format string and return a dictionary of key-value pairs.
Handles quoted values, comments, export keyword, and blank lines.
a  
        ^\s*
        (?:export[^\S\n]+)?               # optional export
        ([A-Za-z_][A-Za-z0-9_]*)          # key
        (?:
            [^\S\n]*
            (=)                           # equal sign
            (?:
                [^\S\n]*
                (                         # quoted value
                    '(?:\\'|[^'])*'       # single-quoted
                    | \"(?:\\\"|[^\"])*\" # double-quoted
                )
                [^\S\n]*(?:\#[^\n\r]*)?   # inline comment (needs no preceding whitespace after a quote)
                |
                (?:[^\S\n]+(?!\#))?       # whitespace after '=' also separates an inline comment
                (                         # unquoted value (may contain '#')
                    [^\n\r]*?
                )
                (?:[^\S\n]+\#[^\n\r]*)?   # inline comment (must be preceded by whitespace)
            )
            |
            [^\S\n]*(?:\#[^\n\r]*)?       # bare key (no '='), with an optional inline comment
        )$
    #r   N          r   ')r   compileVERBOSE
splitlinesstrip
startswithr   r   endswithr   _DOUBLE_QUOTE_ESCAPESr   )	r   r   envline_patternliner   keyvalraw_vals	            r   load_dotenvr1      s7   
 C::	2 	

5L: %%'zz|ts++""4(5++a.CC{{1~~++a.@EKKN@bmmo>>#&&3<<+<+<#C"I/DEC^^C((S\\#->->a)C$kk#&C1 (4 Jr   )N)r   _ESCAPESr*   strdictr   r1    r   r   <module>r6      s    	
 Ds$7.8.S#. ^S ^4S> ^c ^=C =$sCx.4*? =4PSUXPX> =r   