
    fh                         d Z ddlZd Zd ZdS )z4
OOXML has non-standard escaping for characters < 
    Nc                 \    t          j        d          }d }|                    ||           S )zB
    Convert ASCII < 31 to OOXML: \n == _x + hex(ord(\n)) + _
    z[\001-\031]c                 l    d                     t          |                     d                              S )z*
        Callback to escape chars
        z
_x{:0>4x}_r   )formatordgroupmatchs    L/var/www/histauto/venv/lib/python3.11/site-packages/openpyxl/utils/escape.py_subzescape.<locals>._sub   s*     ""3u{{1~~#6#6777    recompilesub)value
CHAR_REGEXr   s      r
   escaper   
   s8    
 N++J8 8 8 >>$&&&r   c                 h    t          j        d          }d }d| v r|                    ||           } | S )z:
    Convert escaped strings to ASCIII: _x000a_ == \n
    z_x([0-9A-Fa-f]{4})_c                 b    t          t          |                     d          d                    S )z,
        Callback to unescape chars
              )chrintr   r   s    r
   r   zunescape.<locals>._sub"   s&     3u{{1~~r**+++r   _xr   )r   ESCAPED_REGEXr   s      r
   unescaper      sH     J455M, , , u}}!!$..Lr   )__doc__r   r   r    r   r
   <module>r      sB     
			' ' '     r   