U
    -e$O                     @   s8  d Z ddlZddlmZmZmZmZmZmZ ddl	m
Z
mZmZmZmZmZmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZ dd	lmZ d
dddddddgZG dd
 d
eZ G dd deZ!G dd deZ"G dd de"Z#G dd deZ$G dd deZ%G dd deZ&e&Z'G dd deZ(dS )z
    pygments.lexers.html
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for HTML, XML and related markup.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerExtendedRegexLexerincludebygroupsdefaultusing)TextCommentOperatorKeywordNameStringPunctuation
Whitespace)looks_like_xmlhtml_doctype_matches)JavascriptLexer)
ScalaLexer)CssLexer_indentation_starts_block)	RubyLexer	HtmlLexerDtdLexerXmlLexer	XsltLexer	HamlLexer
ScamlLexerPugLexerUrlEncodedLexerc                   @   s  e Zd ZdZdZdZdgZddddgZd	d
gZe	j
e	jB Zdefdejfdejfdejfdejfdejfdeeeejedfdeeeejedfdeeeejdfdeeeeeejeefg
defdeejeedfdejfdeeeedfgdeeeeeejeedfdeefd eedfd!eedfgd"eeeeeejeedfd#eefd eedfd!eedfgd$edfd%edfd&edfgd'Zd(d) Zd*S )+r   zo
    For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
    by the appropriate lexer.
    HTMLzhttps://html.spec.whatwg.org/htmlz*.htmlz*.htmz*.xhtml*.xsltz	text/htmlzapplication/xhtml+xmlz[^<&]+&\S*?;\<\!\[CDATA\[.*?\]\]\>
<!--.*?-->	<\?.*?\?><![^>]*>z(<)(\s*)(script)(\s*))script-contenttagz(<)(\s*)(style)(\s*))style-contentr)   z(<)(\s*)([\w:.-]+)r)   z"(<)(\s*)(/)(\s*)([\w:.-]+)(\s*)(>)\s+z([\w:-]+\s*)(=)(\s*)attr[\w:-]+z(/?)(\s*)(>)#popz (<)(\s*)(/)(\s*)(script)(\s*)(>)z.+?(?=<\s*/\s*script\s*>)z.+?\nz.+z(<)(\s*)(/)(\s*)(style)(\s*)(>)z.+?(?=<\s*/\s*style\s*>)".*?"'.*?'[^\s>]+)rootr)   r(   r*   r,   c                 C   s   t | rdS d S )Ng      ?)r   text r5   U/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/pygments/lexers/html.pyanalyse_texte   s    zHtmlLexer.analyse_textN)__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesre
IGNORECASEDOTALLflagsr   r   Entityr	   Preproc	Multiliner   r   Tag	Attributer
   r   r   r   r   tokensr7   r5   r5   r5   r6   r      s    

<c                   @   s  e Zd ZdZejejB ZdZdgZ	dgZ
dgZeddeeeejdfd	eeeejd
fdeeeejdfdeeeejdfdeeejeefdeeeejfdejfdefg	defdejfdedfdefdejfdejfgdefdedfdefgeddejfdejfd edfgedd!ejfd"ejfd#ejfdejfd edfgedd$ejfdejfd edfgedd%ejfdejfd edfgd&Zd'd( Zd)S )*r   zR
    A lexer for DTDs (Document Type Definitions).

    .. versionadded:: 1.5
    DTDdtdz*.dtdzapplication/xml-dtdcommonz(<!ELEMENT)(\s+)(\S+)elementz(<!ATTLIST)(\s+)(\S+)attlistz(<!ENTITY)(\s+)(\S+)entityz(<!NOTATION)(\s+)(\S+)notationz(<!\[)([^\[\s]+)(\s*)(\[)z(<!DOCTYPE)(\s+)([^>\s]+)zPUBLIC|SYSTEMz[\[\]>]r+   z(%|&)[^;]*;z<!--commentz	[(|)*,?+]z"[^"]*"z
\'[^\']*\'z[^-]+z-->r.   -zEMPTY|ANY|#PCDATAz[^>\s|()?+*,]+>z?CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATIONz#REQUIRED|#IMPLIED|#FIXEDzxml:space|xml:langzSYSTEM|PUBLIC|NDATAzSYSTEM|PUBLIC)r2   rM   rR   rN   rO   rP   rQ   c                 C   s(   t | s$d| ks d| ks d| kr$dS d S )Nz	<!ELEMENTz	<!ATTLISTz<!ENTITY皙?r   r3   r5   r5   r6   r7      s    zDtdLexer.analyse_textN)r8   r9   r:   r;   rA   	MULTILINErC   rD   r<   r>   r?   r@   r   r   r   r   r   rH   rE   Constantr	   r
   r   DoubleSingleReservedrI   rJ   r7   r5   r5   r5   r6   r   j   s       
Dc                
   @   s   e Zd ZdZejejB ZdZdgZ	dddddd	d
gZ
dddddgZdefdefdejfdejfdejfdejfdejfdejdfdejfg	defdejdfdejdfgdefdedfd edfd!edfgd"Zd#d$ Zd%S )&r   z=
    Generic lexer for XML (eXtensible Markup Language).
    XMLxmlz*.xml*.xslz*.rssr"   z*.xsdz*.wsdlz*.wsfztext/xmlzapplication/xmlzimage/svg+xmlzapplication/rss+xmlzapplication/atom+xmlz[^<&\s]+z[^<&\S]+r#   r$   r%   r&   r'   z<\s*[\w:.-]+r)   z<\s*/\s*[\w:.-]+\s*>r+   z[\w.:-]+\s*=r,   z/?\s*>r.   r/   r0   r1   )r2   r)   r,   c                 C   s   t | rdS d S )Ng?rV   r3   r5   r5   r6   r7      s    zXmlLexer.analyse_textN)r8   r9   r:   r;   rA   rW   rC   rD   r<   r>   r?   r@   r   r   r   rE   r	   rF   rG   rH   rI   r   rJ   r7   r5   r5   r5   r6   r      sB   
  


c                #   @   s   e Zd ZdZdZdgZdddgZddgZd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+h#Zd,d- Z	d.d/ Z
d0S )1r   z7
    A lexer for XSLT.

    .. versionadded:: 0.10
    XSLTxsltr^   r"   z*.xplzapplication/xsl+xmlzapplication/xslt+xmlzapply-importszapply-templates	attributezattribute-setzcall-templatechooserR   copyzcopy-ofzdecimal-formatrN   fallbackzfor-eachifimportr   keymessageznamespace-aliasnumberZ	otherwiseoutputparamzpreserve-spacezprocessing-instructionsortzstrip-space
stylesheettemplater4   Z	transformzvalue-ofvariablewhenz
with-paramc                 c   s`   t | |D ]N\}}}td|}|tjkrN|rN|d| jkrN|t|fV  q|||fV  qd S )Nz</?xsl:([^>]*)/?>?   )	r   get_tokens_unprocessedrA   matchr   rH   groupEXTRA_KEYWORDSr   )selfr4   indextokenvaluemr5   r5   r6   rr     s
    z XsltLexer.get_tokens_unprocessedc                 C   s   t | rd| krdS d S )Nz<xslrU   rV   r3   r5   r5   r6   r7     s    zXsltLexer.analyse_textN)r8   r9   r:   r;   r<   r>   r?   r@   ru   rr   r7   r5   r5   r5   r6   r      sV   
                           	c                   @   sh  e Zd ZdZdZdgZdgZdgZej	Z
dZde d Zd	efd
efgdejdfdejdfgdedfde d eeeedfedgeddejdfde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeedfde d eejd dfed!g	edd"e d# eefd$e d% eefd&ed'fd(ed)fd*efed!gd+efd,e d- eej eeej fd.edfgd/efd0ej!d1fd2ej!fd3edfgd4efd5ej"dfd6ej"j#dfd7ej"j$dfd8edfd9edfged: efd.edfged: ejfd.edfgd+ejfd,e d- eej eeej fd.edfgd;Z%d<S )=r   z5
    For Haml markup.

    .. versionadded:: 1.3
    Hamlhamlz*.hamlztext/x-hamlz(?: \|\n(?=.* \|)|.)z
(?:,\s*\n|)[ \t]*\n[ \t]*	\.[\w:-]+r)   	\#[\w:-]+[&!]?==plain([&!]?[=~])(*\n)r2   css%[\w:-]+!!!*\nr.   (/)(\[*?\])(/html-comment-block-#haml-comment-block(-)(:filter-blockeval-or-plain\{(,\n|)*?\}\[*?\]\(html-attributes	/[ \t]*\n#pop:2[<>]{1,2}(?=[ \t=])([^#\n]|#[^{\n]|(\\\\)*\\#\{)+(#\{)(*?)(\})\nr+   [\w:-]+[ \t]*=html-attribute-valuer-   \)[ \t]+\w+@\w+\$\w+'(\\\\|\\[^\\]|[^'\\\n])*'"(\\\\|\\[^\\]|[^"\\\n])*"+)r2   r   r   contentr)   r   r   r   r   r   r   N)&r8   r9   r:   r;   r<   r>   r?   r@   rA   rB   rD   _dotZ
_comma_dotr   r   r   ClassFunctionr   r   r   r   r   r   rH   	Namespacer	   Specialr   rF   	Decoratorr   InterpolrI   VariableInstanceGlobalrJ   r5   r5   r5   r6   r     s   


	







c                   @   sx  e Zd ZdZdZdgZdgZdgZej	Z
dZdefdefgd	ejd
fdejd
fgdedfde d eeeedfedgeddejd
fde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeeedfde d eeeedfde d eejddfed g
edd!e d" eefd#e d$ eefd%ed&fd'ed(fd)efed gd*efd+e d, eej eeej fd-edfgd.efd/ej!d0fd1ej!fd2edfgd3efd4ej"dfd5ej"j#dfd6ej"j$dfd7edfd8edfged9 efd-edfged9 ejfd-edfgd*ejfd+e d, eej eeej fd-edfgd:Z%d;S )<r   zt
    For `Scaml markup <http://scalate.fusesource.org/>`_.  Scaml is Haml for Scala.

    .. versionadded:: 1.4
    Scamlscamlz*.scamlztext/x-scaml.r~   r   r   r)   r   r   r   r   r   r2   r   r   r   r   r.   r   r   r   r   r   scaml-comment-block(-@\s*)(import)?(r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r+   r   r   r-   r   r   r   r   r   r   r   r   r2   r   r   r   r)   r   r   r   r   r   r   N)&r8   r9   r:   r;   r<   r>   r?   r@   rA   rB   rD   r   r   r   r   r   r   r   r   r   r   r   r   rH   r   r	   r   r   rF   r   r   r   r   rI   r   r   r   rJ   r5   r5   r5   r6   r     s   


	








c                   @   s  e Zd ZdZdZddgZddgZddgZej	Z
d	Zd
efdefgdejdfdejdfgdedfde d eeeedfedgedde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeeedfde d eeeedfd e d eejd!dfd"ejdfd#ed$fg
edd%e d& eefd'e d( eefd)ed*fd+ed,fd-efed$gd.efd/e d0 eej eeej fd1edfgd2efd3ej!d4fd"ej!fd5edfgd6efd7ej"dfd8ej"j#dfd9ej"j$dfd:edfd;edfged< efd1edfged< ejfd1edfgd.ejfd/e d0 eej eeej fd1edfgd=Z%d>S )?r   z
    For Pug markup.
    Pug is a variant of Scaml, see:
    http://scalate.fusesource.org/documentation/scaml-reference.html

    .. versionadded:: 1.4
    Pugpugjadez*.pugz*.jadez
text/x-pugztext/x-jader   r~   r   r   r)   r   r   r   r   r   r2   r   r   r   r.   r   r   r   r   r   r   r   r   r   r   r-   z\|r   r   r   r   r   r   r   r   r   r   r   r   r   r   r+   r   r   r   r   r   r   r   r   r   r   r   N)&r8   r9   r:   r;   r<   r>   r?   r@   rA   rB   rD   r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r   r   rF   r   r   rH   r   r   rI   r   r   r   rJ   r5   r5   r5   r6   r     s   


 








c                   @   s:   e Zd ZdZdZdgZdgZddeej	e
eefgiZdS )r   z?
    Lexer for urlencoded data

    .. versionadded:: 2.16
    Z
urlencodedz!application/x-www-form-urlencodedr2   z([^&=]*)(=)([^=&]*)(&?)N)r8   r9   r:   r;   r<   r>   r@   r   r   rH   r
   r   r   rJ   r5   r5   r5   r6   r   `  s   ))r;   rA   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   r   Zpygments.utilr   r   Zpygments.lexers.javascriptr   Zpygments.lexers.jvmr   Zpygments.lexers.cssr   r   r   Zpygments.lexers.rubyr   __all__r   r   r   r   r   r   r   Z	JadeLexerr   r5   r5   r5   r6   <module>   s,   
 (
  NX,%opk