ó
    "nji6  ã                  óf  • % S r SSKJr  SSKrSSKrSSKrSSKJrJr  SSK	J
r
  SSKJrJrJrJrJrJrJr  \(       a  SSKJr  SSKJs  Jr  \" S5      r / S	QrS
\S'    Sr Sr \S-   r \S-   \-   r \R>                  " \S-  5      r  \S-   \-   r! \S-   \-   r" \R>                  " \"S-  5      r# \S-   \-   r$ Sr%\" SS9S 5       r&S(S)S jjr'S*S+S jjr(S,S jr)S(S-S jjr*S.S jr+ " S S\,5      r- " S S5      r.\(       a   " S  S!\5      r/ " S" S#5      r0 " S$ S%\5      r1 " S& S'\\   5      r2g)/zv
This module contains various contacts, classes and functions which get referenced and used
throughout the code base.
é    )ÚannotationsN)ÚwrapsÚ	lru_cache)Úcount)ÚTYPE_CHECKINGÚGenericÚIteratorÚ
NamedTupleÚTypeVarÚ	TypedDictÚoverload)ÚMarkdownÚ_T):ÚaddressÚarticleÚasideÚ
blockquoteÚdetailsÚdivÚdlÚfieldsetÚ
figcaptionÚfigureÚfooterÚformÚh1Úh2Úh3Úh4Úh5Úh6ÚheaderÚhgroupÚhrÚmainÚmenuÚnavÚolÚpÚpreÚsectionÚtableÚulÚcanvasÚcolgroupÚddÚbodyÚdtÚgroupÚhtmlÚiframeÚliÚlegendÚmathÚmapÚnoscriptÚoutputÚobjectÚoptionÚprogressÚscriptÚstyleÚsummaryÚtbodyÚtdÚtextareaÚtfootÚthÚtheadÚtrÚvideoz	list[str]ÚBLOCK_LEVEL_ELEMENTSÚÚzklzzwxh:z%sz([0-9]+)Úampz
wzxhzdk:%sz
hzzhzkh:%s))u   Ö�u   ß¿)u   â´°u   âµ¿)Úmaxsizec                 ó^   • [         R                  S:¼  a  SSKJn   OSSKn U R                  SS9$ )z<Return all entry_points in the `markdown.extensions` group. )é   é
   r   ©ÚmetadataNzmarkdown.extensions)r3   )ÚsysÚversion_infoÚ	importlibrS   Úimportlib_metadataÚentry_pointsrR   s    Ú//usr/lib/python3/dist-packages/markdown/util.pyÚget_installed_extensionsrZ   f   s-   € ô ×Ñ˜7Ó"Þ&ã-à× Ñ Ð'<Ð Ð=Ð=ó    c                ó   ^ ^• U U4S jnU$ )zÅ
Raise a [`DeprecationWarning`][] when wrapped function/method is called.

Usage:

```python
@deprecated("This method will be removed in version X; use Y instead.")
def some_method():
    pass
```
c                ó6   >^ • [        T 5      U UU4S j5       nU$ )Nc                 óh   >• [         R                  " STR                   ST 3[        TS9  T" U 0 UD6$ )NÚ'z' is deprecated. )ÚcategoryÚ
stacklevel)ÚwarningsÚwarnÚ__name__ÚDeprecationWarning)ÚargsÚkwargsÚfuncÚmessagera   s     €€€rY   Údeprecated_funcÚ4deprecated.<locals>.wrapper.<locals>.deprecated_func~   s<   ø€ ä�MŠMØ�D—M‘M�?Ð"3°G°9Ð=Ü+Ø%òñ
 ˜Ð( Ñ(Ð(r[   )r   )rh   rj   ri   ra   s   ` €€rY   ÚwrapperÚdeprecated.<locals>.wrapper}   s!   ù€ Ü	ˆt‹ö	)ó 
ð	)ð Ðr[   © )ri   ra   rl   s   `` rY   Ú
deprecatedro   q   s   ù€ ö	ð €Nr[   c                ó  • [        U [        5      (       d  U(       a  U c  U $ [        U 5      $ U(       a  U R                  5       S:X  a  gU R                  5       S;   a  gU R                  5       S;   a  gU(       a  [	        SU -  5      eg)a  Parses a string representing a boolean value. If parsing was successful,
returns `True` or `False`. If `preserve_none=True`, returns `True`, `False`,
or `None`. If parsing was not successful, raises `ValueError`, or, if
`fail_on_errors=False`, returns `None`.NÚnone)ÚtrueÚyesÚyÚonÚ1T)ÚfalseÚnoÚnÚoffÚ0rq   FzCannot parse bool value: %r)Ú
isinstanceÚstrÚboolÚlowerÚ
ValueError)ÚvalueÚfail_on_errorsÚpreserve_nones      rY   ÚparseBoolValuer„   Š   sw   € ô
 �eœS×!Ñ!Þ˜U™]ØˆLÜ�E‹{ÐÞ	˜5Ÿ;™;›=¨FÓ2ØØ	�‰‹Ð9Ó	9ØØ	�‰‹ÐBÓ	BØÞ	ÜÐ6¸Ñ>Ó?Ð?ð 
r[   c                ó–   • SU ;   a  U R                  SS5      n SU ;   a  U R                  SS5      n SU ;   a  U R                  SS5      n U $ )zHTML escape a string of code.Ú&z&amp;Ú<z&lt;Ú>z&gt;)Úreplace)Útexts    rY   Úcode_escaper‹   �   sL   € à
ˆdƒ{Ø�|‰|˜C Ó)ˆØ
ˆdƒ{Ø�|‰|˜C Ó(ˆØ
ˆdƒ{Ø�|‰|˜C Ó(ˆØ€Kr[   c                ó‚   • [         R                  " U 5      n[        U 5       H  n UR                  nU(       a  M  U s  $    g)z+Get current stack depth, performantly.
    N)rT   Ú	_getframer   Úf_back)ÚsizeÚframes     rY   Ú_get_stack_depthr‘   ¨   s3   € ô �MŠM˜$Ó€Eä�d–ˆØ—‘ˆßˆuØŠKò r[   c                 óH   • [         R                  " 5       [        5       -
  S:  $ )zBReturn true if current stack depth is within 100 of maximum limit.éd   )rT   Úgetrecursionlimitr‘   rn   r[   rY   Únearing_recursion_limitr•   ³   s   € ä× Ò Ó"Ô%5Ó%7Ñ7¸#Ñ=Ð=r[   c                  ó   • \ rS rSrSrSrg)ÚAtomicStringé¼   z/A string which should not be further processed.rn   N)rd   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__rn   r[   rY   r—   r—   ¼   s   † Ù9Úr[   r—   c                  ó&   • \ rS rSrSrSSS jjrSrg)Ú	ProcessoréÁ   zÁThe base class for all processors.

Attributes:
    Processor.md: The `Markdown` instance passed in an initialization.

Arguments:
    md: The `Markdown` instance this processor is a part of.

Nc                ó   • Xl         g ©N©Úmd)Úselfr¤   s     rY   Ú__init__ÚProcessor.__init__Ë   s   € Ø�r[   r£   r¢   )r¤   zMarkdown | None)rd   r™   rš   r›   rœ   r¦   r�   rn   r[   rY   rŸ   rŸ   Á   s   † ñ÷ñ r[   rŸ   c                  ó>   • \ rS rSr% S\S'   S\S'   S\S'   S\S'   S	rg
)ÚTagDataéÐ   r}   Útagúdict[str, str]ÚattrsÚintÚ
left_indexÚright_indexrn   N©rd   r™   rš   r›   Ú__annotations__r�   rn   r[   rY   r©   r©   Ð   s   ‡ Ø‹ØÓØ‹ØÖr[   r©   c                  óF   • \ rS rSrSrS rS
S jrSS jrSS jrSS jr	Sr
g	)Ú	HtmlStashé×   zo
This class is used for stashing HTML objects that we extract
in the beginning and replace with place-holders.
c                ó<   • SU l         / U l        SU l        / U l        g)zCreate an `HtmlStash`. r   N©Úhtml_counterÚrawHtmlBlocksÚtag_counterÚtag_data©r¥   s    rY   r¦   ÚHtmlStash.__init__Ý   s!   € àˆÔØ8:ˆÔØˆÔØ')ˆ�r[   c                óœ   • U R                   R                  U5        U R                  U R                  5      nU =R                  S-  sl        U$ )zÍ
Saves an HTML segment for later reinsertion.  Returns a
placeholder string that needs to be inserted into the
document.

Keyword arguments:
    html: An html segment.

Returns:
    A placeholder string.

é   )r¹   ÚappendÚget_placeholderr¸   )r¥   r4   Úplaceholders      rY   ÚstoreÚHtmlStash.storeä   sE   € ð 	×Ñ×!Ñ! $Ô'Ø×*Ñ*¨4×+<Ñ+<Ó=ˆØ×Ò˜QÑÕØÐr[   c                ó    • SU l         / U l        g)zClear the stash. r   N)r¸   r¹   r¼   s    rY   ÚresetÚHtmlStash.resetö   s   € àˆÔØˆÕr[   c                ó   • [         U-  $ r¢   )ÚHTML_PLACEHOLDER©r¥   Úkeys     rY   rÁ   ÚHtmlStash.get_placeholderû   s   € Ü #Ñ%Ð%r[   c                ó¦   • U R                   R                  XUUS.5        [        [        U R                  5      -  nU =R                  S-  sl        U$ )z(Store tag data and return a placeholder.)r«   r­   r¯   r°   r¿   )r»   rÀ   ÚTAG_PLACEHOLDERr}   rº   )r¥   r«   r­   r¯   r°   rÂ   s         rY   Ú	store_tagÚHtmlStash.store_tagþ   sO   € à�‰×Ñ SØ,6Ø-8ñ:ô 	;ô &¬¨D×,<Ñ,<Ó(=Ñ=ˆØ×Ò˜AÑÕØÐr[   r·   N)r4   zstr | etree.ElementÚreturnr}   ©rÑ   ÚNone)rË   r®   rÑ   r}   )
r«   r}   r­   r¬   r¯   r®   r°   r®   rÑ   r}   )rd   r™   rš   r›   rœ   r¦   rÃ   rÆ   rÁ   rÏ   r�   rn   r[   rY   r´   r´   ×   s    † ñò
*ôô$ ô
&÷r[   r´   c                  ó*   • \ rS rSr% S\S'   S\S'   Srg)Ú_PriorityItemi  r}   ÚnameÚfloatÚpriorityrn   Nr±   rn   r[   rY   rÕ   rÕ     s   ‡ Ø
ƒIØ†Or[   rÕ   c                  ó    • \ rS rSrSrS rSS jrSS jr\SS j5       r	\SS j5       r	SS jr	SS	 jr
S
 rSS jrSS jrSSS jjrSS jrSrg)ÚRegistryi  a€  
A priority sorted registry.

A `Registry` instance provides two public methods to alter the data of the
registry: `register` and `deregister`. Use `register` to add items and
`deregister` to remove items. See each method for specifics.

When registering an item, a "name" and a "priority" must be provided. All
items are automatically sorted by "priority" from highest to lowest. The
"name" is used to remove ("deregister") and get items.

A `Registry` instance it like a list (which maintains order) when reading
data. You may iterate over the items, get an item and get a count (length)
of all items. You may also check that the registry contains an item.

When getting an item you may use either the index of the item or the
string-based "name". For example:

    registry = Registry()
    registry.register(SomeItem(), 'itemname', 20)
    # Get the item by index
    item = registry[0]
    # Get the item by name
    item = registry['itemname']

When checking that the registry contains an item, you may use either the
string-based "name", or a reference to the actual item. For example:

    someitem = SomeItem()
    registry.register(someitem, 'itemname', 20)
    # Contains the name
    assert 'itemname' in registry
    # Contains the item instance
    assert someitem in registry

The method `get_index_for_name` is also available to obtain the index of
an item using that item's assigned "name".
c                ó.   • 0 U l         / U l        SU l        g )NF)Ú_dataÚ	_priorityÚ
_is_sortedr¼   s    rY   r¦   ÚRegistry.__init__8  s   € Ø$&ˆŒ
Ø.0ˆŒØˆ�r[   c                óœ   • [        U[        5      (       a  XR                  R                  5       ;   $ XR                  R	                  5       ;   $ r¢   )r|   r}   rÜ   ÚkeysÚvalues)r¥   Úitems     rY   Ú__contains__ÚRegistry.__contains__=  s9   € Ü�dœC× Ñ àŸ:™:Ÿ?™?Ó,Ñ,Ð,à—z‘z×(Ñ(Ó*Ñ*Ð*r[   c                óœ   • U R                  5         [        U R                   VVs/ s H  u  pU R                  U   PM     snn5      $ s  snnf r¢   )Ú_sortÚiterrÝ   rÜ   )r¥   Úkr)   s      rY   Ú__iter__ÚRegistry.__iter__D  s6   € Ø�
‰
ŒÜ¨t¯~ª~Ô>ª~¡t q�T—Z‘Z ”]©~Ò>Ó?Ð?ùÓ>s   ¥A
c                ó   • g r¢   rn   rÊ   s     rY   Ú__getitem__ÚRegistry.__getitem__H  ó   € àr[   c                ó   • g r¢   rn   rÊ   s     rY   rí   rî   L  rï   r[   c                óf  • U R                  5         [        U[        5      (       aC  [        5       nU R                  U    H$  u  p4UR                  U R                  U   X45        M&     U$ [        U[        5      (       a&  U R                  U R                  U   R                     $ U R                  U   $ r¢   )	rç   r|   ÚslicerÚ   rÝ   ÚregisterrÜ   r®   rÖ   )r¥   rË   Údataré   r)   s        rY   rí   rî   P  sˆ   € Ø�
‰
ŒÜ�cœ5×!Ñ!Ü!)£ˆDØŸ™ sÔ+‘�Ø—‘˜dŸj™j¨™m¨QÖ2ñ ,àˆKÜ�cœ3×ÑØ—:‘:˜dŸn™n¨SÑ1×6Ñ6Ñ7Ð7Ø�z‰z˜#‰Ðr[   c                ó,   • [        U R                  5      $ r¢   )ÚlenrÝ   r¼   s    rY   Ú__len__ÚRegistry.__len__[  s   € Ü�4—>‘>Ó"Ð"r[   c                ó`   • SR                  U R                  R                  [        U 5      5      $ )Nz<{}({})>)ÚformatÚ	__class__rd   Úlistr¼   s    rY   Ú__repr__ÚRegistry.__repr__^  s#   € Ø× Ñ  §¡×!8Ñ!8¼$¸t»*ÓEÐEr[   c                óþ   • X;   aZ  U R                  5         U R                  R                  U R                   Vs/ s H  o"R                  U:X  d  M  UPM     snS   5      $ [	        SR                  U5      5      es  snf )z%
Return the index of the given name.
r   zNo item named "{}" exists.)rç   rÝ   ÚindexrÖ   r€   rú   )r¥   rÖ   Úxs      rY   Úget_index_for_nameÚRegistry.get_index_for_namea  sj   € ð ‹<Ø�J‰JŒLØ—>‘>×'Ñ'Ø ŸNšNÓ=šN�q¯f©f¸©n—™NÑ=¸aÑ@óð ô Ð5×<Ñ<¸TÓBÓCÐCùò >s   ¹A:ÁA:c                ó¢   • X ;   a  U R                  U5        SU l        XR                  U'   U R                  R	                  [        X#5      5        g)aÿ  
Add an item to the registry with the given name and priority.

Arguments:
    item: The item being registered.
    name: A string used to reference the item.
    priority: An integer or float used to sort against all items.

If an item is registered with a "name" which already exists, the
existing item is replaced with the new item. Treat carefully as the
old item is lost with no way to recover it. The new item will be
sorted according to its priority and will **not** retain the position
of the old item.
FN)Ú
deregisterrÞ   rÜ   rÝ   rÀ   rÕ   )r¥   rã   rÖ   rØ   s       rY   ró   ÚRegistry.registerl  s?   € ð ‹<à�O‰O˜DÔ!ØˆŒØ�
‰
�4ÑØ�‰×Ñœm¨DÓ;Õ<r[   c                óŒ   •  U R                  U5      nU R                  U	 U R                  U	 g! [         a    U(       a  e  gf = f)z‡
Remove an item from the registry.

Set `strict=False` to fail silently. Otherwise a [`ValueError`][] is raised for an unknown `name`.
N)r  rÝ   rÜ   r€   )r¥   rÖ   Ústrictr   s       rY   r  ÚRegistry.deregister‚  sI   € ð	Ø×+Ñ+¨DÓ1ˆEØ—‘˜uÐ%Ø—
‘
˜4Ñ øÜó 	ÞØñ ð	ús   ‚+. ®AÁAc                ól   • U R                   (       d#  U R                  R                  S SS9  SU l         gg)z€
Sort the registry by priority from highest to lowest.

This method is called internally and should never be explicitly called.
c                ó   • U R                   $ r¢   )rØ   )rã   s    rY   Ú<lambda>Ú Registry._sort.<locals>.<lambda>—  s   € °·²r[   T)rË   ÚreverseN)rÞ   rÝ   Úsortr¼   s    rY   rç   ÚRegistry._sort�  s/   € ð ��Ø�N‰N×ÑÑ$>ÈÐÑMØ"ˆD�Oð r[   )rÜ   rÞ   rÝ   N)rã   zstr | _TrÑ   r~   )rÑ   zIterator[_T])rË   z	str | intrÑ   r   )rË   rò   rÑ   zRegistry[_T])rË   zstr | int | slicerÑ   z_T | Registry[_T])rÑ   r®   )rÖ   r}   rÑ   r®   )rã   r   rÖ   r}   rØ   r×   rÑ   rÓ   )T)rÖ   r}   r  r~   rÑ   rÓ   rÒ   )rd   r™   rš   r›   rœ   r¦   rä   rê   r   rí   r÷   rý   r  ró   r  rç   r�   rn   r[   rY   rÚ   rÚ     se   † ñ%òN ô
+ô@ð óó ðð óó ðô	ô#òFô	Dô=ö,÷#r[   rÚ   )é   )ri   r}   ra   r®   )TF)r�   z
str | Noner‚   r~   rƒ   r~   rÑ   zbool | None)rŠ   r}   rÑ   r}   )r�   r®   rÑ   r®   )rÑ   r~   )3rœ   Ú
__future__r   ÚrerT   rb   Ú	functoolsr   r   Ú	itertoolsr   Útypingr   r   r	   r
   r   r   r   Úmarkdownr   Úxml.etree.ElementTreeÚetreeÚElementTreer   rJ   r²   ÚSTXÚETXÚINLINE_PLACEHOLDER_PREFIXÚINLINE_PLACEHOLDERÚcompileÚINLINE_PLACEHOLDER_REÚAMP_SUBSTITUTErÉ   ÚHTML_PLACEHOLDER_RErÎ   ÚRTL_BIDI_RANGESrZ   ro   r„   r‹   r‘   r•   r}   r—   rŸ   r©   r´   rÕ   rÚ   rn   r[   rY   Ú<module>r$     sv  ðò(õ
 #ã 	Û 
Û ß &Ý ß ]× ]Ñ ]æÝ!ß)Ð)áˆTƒ]€ðò#Ð �ió ðð €Ø 9Ø€Ø 7Ø 
™NÐ Ø /Ø.°Ñ5¸Ñ;Ð Ø 5ØŸ
š
Ð#5¸Ñ#CÓDÐ Ø =Ø�U‘˜3‘€Ø /Ø˜Ñ%¨Ñ+Ð Ø *Ø—j’jÐ!1°KÑ!?Ó@Ð Ø ;Ø˜Ñ$ sÑ*€Ø &ð€ñ �4Ññ>ó ð>öö2@ô&öô>ô	�3ô 	÷
ñ ö ô�)ô ÷.ñ .ôh�Jô ô
H#ˆw�r‰{õ H#r[   