
    $gq                     $   d Z ddlZddlZddlZddlmZ ddlmZ  ej        dej	                  Z
 ej        dej	                  Z ej        dej	                  Z ej        d	ej	                  ZddZd Z ej        d          d             Z ej        d          d             Z ej        d          d             Z ej        d          d             Z ej        d          d             Z ej        d          d             ZdS )al  
Slugs.

Additional slug outputs.

MIT license.

Copyright (c) 2014 - 2017 Isaac Muse <isaacmuse@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
    N)quote   )utilz	</?[^>]*>z[^\w\- ] z[A-Z]noneFNFCc                    t                               dt          j        ||                                                     }|dk    r|                                }n?|dk    rd }t                              ||          }n|dk    r|                                }t                              |t                              d|                    }|r"t          |                    d                    n|S )zUnicode slugify (`utf-8`). lowerlower-asciic                 P    |                      d                                          S )zLowercase character.r   )groupr   )ms    N/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/pymdownx/slugs.pyr   z_uslugify.<locals>.lower-   s    771::##%%%    foldzutf-8)RE_TAGSsubunicodedata	normalizestripr   RE_ASCII_LETTERScasefoldRE_SEPRE_INVALID_SLUG_CHARr   encode)textsepcasepercent_encoder   slugr   s          r   	_uslugifyr"   $   s     ;;r;0DAABBHHJJDwzz||				& 	& 	&  ##E400	}} ::c/33B==>>D*8B5W%%&&&dBr   c                      |                      dd          }|                      dd          }|                      dd          }t          j        t          |||          S )zConfigurable slugify.r   r   r    Fr   r   )r   r    r   )get	functoolspartialr"   )kwargsr   percentr   s       r   slugifyr)   ;   sY     ::ff%%Djj)511G

;..IYT'U^____r   zj'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 6     t          d          | |          S )zUnicode slugify.r   r   r)   r   r   s     r   uslugifyr.   D   s!     !7   s+++r   zr'uslugify_encoded' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 8     t          dd          | |          S )z"Unicode slugify (percent encoded).r   Tr   r    r,   r-   s     r   uslugify_encodedr1   N   s#     67555dC@@@r   zp'uslugify_cased' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 2     t                      | |          S )z,Unicode slugify cased (keep case) (`utf-8`).r,   r-   s     r   uslugify_casedr3   X   s     799T3r   zw'uslugify_cased_encode' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 6     t          d          | |          S )z4Unicode slugify cased (keep case) (percent encoded).T)r    r,   r-   s     r   uslugify_cased_encodedr5   b   s!     (7$'''c222r   ze'gfm' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 6     t          d          | |          S )z5Unicode slugify cased (cased Unicode only) (`utf-8`).r   r+   r,   r-   s     r   gfmr7   l   s!     '7&&&tS111r   zm'gfm_encoded' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.c                 8     t          dd          | |          S )z=Unicode slugify cased (cased Unicode only) (percent encoded).r   Tr0   r,   r-   s     r   gfm_encodedr9   v   s#     <7d;;;D#FFFr   )r   Fr   )__doc__rer   r%   urllib.parser   r
   r   compileUNICODEr   r   r   r   r"   r)   
deprecatedr.   r1   r3   r5   r7   r9    r   r   <module>rA      s   . 
			                    
"*\2:
.
.!rz+rz:: 	D"*	%	%2:h
33 C C C C.` ` ` ' , ,	 , ' A A	 A '    	   ' 3 3	 3 ' 2 2	 2 ' G G	 G G Gr   