Ë
    daºi‘*  ã                   óˆ   — d dl Z d dlZ e j                  e«      Zd„ Zdd„Zd„ Zd„ Zdd„Z	d„ Z
d„ Zdd	„Zd
„ Zdd„Zd„ Zd„ Zy)é    Nc                 óD   — d}t        j                  |t        | «      «      S )zž
    >>> is_email('username@example.com')
    True
    >>> is_email('example.com')
    False
    >>> is_email('firstname.lastname@domain.co.uk')
    True
    z0^[A-Za-z0-9\.\+_-]+@[A-Za-z0-9\._-]+\.[a-zA-Z]*$)ÚreÚmatchÚstr)ÚelementÚemail_regexs     úG/var/www/timesheet/venv/lib/python3.12/site-packages/atlassian/utils.pyÚis_emailr
      s   € ð F€KÜ�8‰8�K¤ W£Ó.Ð.ó    c                 ó   — |s| }d| › d|› d�S )zu
    >>> html_email('username@example.com')
    '<a href="mailto:username@example.com">username@example.com</a>'
    z<a href="mailto:z">z</a>© )ÚemailÚtitles     r	   Ú
html_emailr      s!   € ñ Øˆà˜e˜W B u g¨TÐ2Ð2r   c                 ó<  — d}| D ]‘  }t        |t        «      r_|j                  d«      r,t        |j                  d«      |j                  dd«      «      }n"|j                  d«      r|j                  d«      }t	        |«      rt        ||«      }|d|› d�z  }Œ“ |dz   S )a  
    >>> html_list(['example.com', 'admin1@example.com', 'admin2@example.com'])
    '<ul>
        <li>example.com</li>
        <li><a href="mailto:admin1@example.com">admin1@example.com</a></li>
        <li><a href="mailto:admin2@example.com">admin2@example.com</a></li>
    </ul>'
    z<ul>r   ÚnameNz<li>z</li>z</ul>)Ú
isinstanceÚdictÚgetr   r
   )ÚdataÚhtmlÚitems      r	   Ú	html_listr   !   sš   € ð €DØò 	#ˆÜ�dœDÔ!Ø�x‰x˜Ô Ü! $§(¡(¨7Ó"3°T·X±X¸fÀdÓ5KÓL‘Ø—‘˜&Ô!Ø—x‘x Ó'�ä�DŒ>Ü˜d DÓ)ˆDØ�$�t�f˜EÐ"Ñ"‰ð	#ð �'‰>Ðr   c                 óp   — d}| D ]+  }|j                  dd«      j                  «       }|d|› d�z  }Œ- |dz   S )aM  
    >>> html_table_header_row(['administrators', 'key', 'leader', 'project'])
    '\n\t<tr><th>Administrators</th><th>Key</th><th>Leader</th><th>Project</th></tr>'
    >>> html_table_header_row(['key', 'project', 'leader', 'administrators'])
    '\n\t<tr><th>Key</th><th>Project</th><th>Leader</th><th>Administrators</th></tr>'
    ú
	<tr>Ú_ú ú<th>ú</th>ú</tr>)Úreplacer   )r   r   Úthr   s       r	   Úhtml_table_header_rowr#   8   sP   € ð €DØò $ˆØ—
‘
˜3 Ó$×*Ñ*Ó,ˆØ�$�u�g˜UÐ#Ñ#‰ð$ð �'‰>Ðr   c                 óî   — d}|r'|d|j                  dd«      j                  «       › d�z  }|D ]A  }| |   }t        |t        «      rt	        |«      }t        |«      rt        |«      }|d|› d�z  }ŒC |dz   S )	a$  
    >>> headers = ['administrators', 'key', 'leader', 'project']
    >>> data = {'key': 'DEMO', 'project': 'Demonstration',
                'leader': 'leader@example.com',
                'administrators': ['admin1@example.com', 'admin2@example.com']}
    >>> html_row_with_ordered_headers(data, headers)
    '\n\t<tr><td><ul>
                        <li><a href="mailto:admin1@example.com">admin1@example.com</a></li>
                        <li><a href="mailto:admin2@example.com">admin2@example.com</a></li>
                    </ul></td><td>DEMO</td><td>leader@example.com</td><td>Demonstration</td></tr>'
    >>> headers = ['key', 'project', 'leader', 'administrators']
    >>> html_row_with_ordered_headers(data, headers)
    '\n\t<tr><td>DEMO</td><td>Demonstration</td>
                <td>leader@example.com</td><td>
                <ul>
                    <li><a href="mailto:admin1@example.com">admin1@example.com</a></li>
                    <li><a href="mailto:admin2@example.com">admin2@example.com</a></li>
                </ul></td></tr>'
    r   r   r   r   r   z<td>z</td>r    )r!   r   r   Úlistr   r
   r   )r   Úcol_headersÚ
row_headerr   Úheaderr   s         r	   Úhtml_row_with_ordered_headersr)   F   s“   € ð( €DÙØ�$�z×)Ñ)¨#¨sÓ3×9Ñ9Ó;Ð<¸EÐBÑBˆØò &ˆØ�v‘,ˆÜ�gœtÔ$Ü Ó(ˆGä�GÔÜ  Ó)ˆGØ�$�w�i˜uÐ%Ñ%‰ð&ð �'‰>Ðr   c                 óX   — d}|t        |«      z  }| D ]  }|t        ||«      z  }Œ |dz   S )a|  
    >>> ordering = ['administrators', 'key', 'leader', 'project']
    >>> data = [         {'key': 'DEMO', 'project': 'Demo project', 'leader': 'lead@example.com',             'administrators': ['admin@example.com', 'root@example.com']},]
    >>> html_table_from_dict(data, ordering)
    '<table>
        <tbody>\n
            <tr>
                <th>Administrators</th>
                <th>Key</th>
                <th>Leader</th>
                <th>Project</th>
            </tr>\n
        <tr>
            <td>
                <ul>
                    <li><a href="mailto:admin@example.com">admin@example.com</a></li>
                    <li><a href="mailto:root@example.com">root@example.com</a></li>
                </ul>
            </td>
            <td>DEMO</td>
            <td>lead@example.com</td>
            <td>Demo project</td>
        </tr>\n
        </tbody>
    </table>'
    >>> ordering = ['key', 'project', 'leader', 'administrators']
    >>> html_table_from_dict(data, ordering)
    '<table>
        <tbody>\n
            <tr>
                <th>Key</th>
                <th>Project</th>
                <th>Leader</th>
                <th>Administrators</th>
            </tr>\n
            <tr>
                <td>DEMO</td>
                <td>Demo project</td>
                <td>lead@example.com</td>
                <td>
                    <ul>
                        <li><a href="mailto:admin@example.com">admin@example.com</a></li>
                        <li><a href="mailto:root@example.com">root@example.com</a></li>
                    </ul>
                </td>
            </tr>\n
        </tbody>
    </table>'
    ú<table><tbody>ú
</tbody></table>)r#   r)   )r   Úorderingr   Úrows       r	   Úhtml_table_from_dictr/   h   sG   € ðh €DØÔ! (Ó+Ñ+€DØò =ˆØÔ-¨c°8Ó<Ñ<‰ð=àÐ&Ñ&Ð&r   c                 ó¶   — d}dg}|j                  |«       |t        |«      z  }t        | j                  «       «      D ]  \  }}|t	        |||«      z  }Œ |dz   S )aÒ  
    >>> ordering = ['manager', 'admin', 'employee_count']
    >>>     data = {
        'project_A': {'manager': 'John', 'admin': 'admin1@example.com', 'employee_count': '4'},
        'project_B': {'manager': 'Jane', 'admin': 'admin2@example.com', 'employee_count': '7'}
    }
    >>> html_table_from_nested_dict(data, ordering)
    <table>
        <tbody>
            <tr>
                <th></th>
                <th>Manager</th>
                <th>Admin</th>
                <th>Employee Count</th>
            </tr>
            <tr>
                <th>Project A</th>
                <td>John</td>
                <td><a href="mailto:admin1@example.com">admin1@example.com</a></td>
                <td>4</td>
            </tr>
            <tr>
                <th>Project B</th>
                <td>Jane</td>
                <td><a href="mailto:admin2@example.com">admin2@example.com</a></td>
                <td>7</td>
            </tr>
        </tbody>
    </table>
    r+   Ú r,   )Úextendr#   r%   Úitemsr)   )r   r-   r   Ú
header_rowr'   r.   s         r	   Úhtml_table_from_nested_dictr5   £   sq   € ð@ €Dà�€JØ×Ñ�hÔØÔ! *Ó-Ñ-€Dä §
¡
£Ó-ò I‰ˆ
�CØÔ-¨c°8¸ZÓHÑH‰ðIð Ð&Ñ&Ð&r   c                 ó0   — |sd}dj                  || ¬«      S )zS
    Wrap into code block macro
    :param code:
    :param lang:
    :return:
    r1   a                  <ac:structured-macro ac:name="code" ac:schema-version="1">
                    <ac:parameter ac:name="language">{lang}</ac:parameter>
                    <ac:plain-text-body><![CDATA[{code}]]></ac:plain-text-body>
                </ac:structured-macro>
            )ÚlangÚcode©Úformat)r8   r7   s     r	   Úblock_code_macro_confluencer;   Ï   s&   € ñ Øˆð	÷ �f�$˜T€fÓ"ð#r   c                 ó&   — dj                  | ¬«      S )z<
    Wrap into html macro
    :param text:
    :return:
    zÎ                <ac:structured-macro ac:name="html" ac:schema-version="1">
                    <ac:plain-text-body><![CDATA[{text}]]></ac:plain-text-body>
                </ac:structured-macro>
            ©Útextr9   r=   s    r	   Úhtml_code__macro_confluencer?   â   s   € ð	÷
 �f�$€fÓðr   c                 ó0   — |sd}dj                  || ¬«      S )z‘
    Wrap into code block macro
    :param text:
    :param nopanel: (bool) True or False Removes the panel around the content.
    :return:
    Fa                  <ac:structured-macro ac:name="noformat" ac:schema-version="1">
                    <ac:parameter ac:name="nopanel">{nopanel}</ac:parameter>
                    <ac:plain-text-body><![CDATA[{text}]]></ac:plain-text-body>
                </ac:structured-macro>
            )Únopanelr>   r9   )r>   rA   s     r	   Únoformat_code_macro_confluencerB   ñ   s&   € ñ Øˆð	÷ �f�W 4€fÓ(ð)r   c                 ó  — | sy| }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd	«      }|j                  d
d«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  dd«      }|j                  d d!«      }|j                  d"d#«      }|j                  d$d%«      }|j                  d&d'«      }|j                  d(d)«      }|j                  d*d+«      }|j                  d,d-«      }|j                  d.d/«      }|j                  d0d1«      }|j                  d2d3«      }|j                  d4d5«      }|j                  d6d7«      }|j                  d8d9«      }|j                  d:d;«      }|j                  d<d=«      }|j                  d>d?«      }|j                  d@dA«      }|j                  dBdC«      }|j                  dDdE«      }|j                  dFdG«      }|j                  dHdI«      }|j                  dJdK«      }|j                  dLdM«      }|j                  dNdO«      }|j                  dPdQ«      }|j                  dRdS«      }|j                  dTdU«      }|j                  dVdW«      }|S )XNr1   z&Auml;õ   Ã„z&auml;õ   Ã¤z&Euml;õ   Ã‹z&euml;õ   Ã«z&Iuml;õ   Ã�z&iuml;õ   Ã¯z&Ouml;õ   Ã–z&ouml;õ   Ã¶z&Uuml;õ   Ãœz&uuml;õ   Ã¼z&Aacute;õ   Ã�z&aacute;õ   Ã¡z&Eacute;õ   Ã‰z&eacute;õ   Ã©z&Iacute;õ   Ã�z&iacute;õ   Ã­z&Oacute;õ   Ã“z&oacute;õ   Ã³z&Uacute;õ   Ãšz&uacute;õ   Ãºz&Agrave;õ   Ã€z&agrave;õ   Ã z&Egrave;õ   Ãˆz&egrave;õ   Ã¨z&Igrave;õ   ÃŒz&igrave;õ   Ã¬z&Ograve;õ   Ã’z&ograve;õ   Ã²z&Ugrave;õ   Ã™z&ugrave;õ   Ã¹z&Acirc;õ   Ã‚z&acirc;õ   Ã¢z&Ecirc;õ   ÃŠz&ecirc;õ   Ãªz&Icirc;õ   ÃŽz&icirc;õ   Ã®z&Ocirc;õ   Ã”z&ocirc;õ   Ã´z&Ucirc;õ   Ã›z&ucirc;õ   Ã»z&Aring;õ   Ã…z&aring;õ   Ã¥z&deg;õ   Â°)r!   )r>   Úresults     r	   Úsymbol_normalizerrp     sÂ  € ÙØØ€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜H dÓ+€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜J¨Ó-€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜I tÓ,€FØ�^‰^˜G TÓ*€FØ€Mr   c                 ó8  — i }t        | d«      5 }|D ]D  }t        j                  d|«      rŒ|j                  «       j	                  d«      }	 |d   ||d   <   ŒF 	 ddd«       |S # t
        $ r}t        j                  |«       Y d}~Œud}~ww xY w# 1 sw Y   |S xY w)zÏ
    Parse a cookies.txt file (Netscape HTTP Cookie File)
    return a dictionary of key value pairs
    compatible with requests.
    :param cookie_file: a cookie file
    :return dict of cookies pairs
    Úrz^(#|$)ú	é   é   N)Úopenr   r   ÚstripÚsplitÚ
IndexErrorÚlogÚerror)Úcookie_fileÚcookiesÚfpÚlineÚline_fieldsÚes         r	   Úparse_cookie_filer‚   6  sœ   € ð €GÜ	ˆk˜3Ó	ð ! 2Øò 	!ˆDÜ—8‘8˜I tÕ,Ø"Ÿj™j›l×0Ñ0°Ó6�ð!Ø.9¸!©n�G˜K¨™NÒ+ñ		!÷!ð €Nøô "ò !Ü—I‘I˜a—L‘Lûð!ú÷!ð €Nús:   �B¬BÁA$ÁBÁ$	BÁ-BÂBÂBÂBÂB)N)Úloggingr   Ú	getLoggerÚ__name__rz   r
   r   r   r#   r)   r/   r5   r;   r?   rB   rp   r‚   r   r   r	   ú<module>r†      s]   ðã Û 	à€g×Ñ˜Ó!€ò
/ó	3òò.óòD8'òv)'óX#ò&ó)ò&/ódr   