File: //lib/python3/dist-packages/soupsieve/__pycache__/css_parser.cpython-38.pyc
U
$��]� � @ s� d Z ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlm
Z
d Zd
ddd
ddddddddddddddddddd d!hZd"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1hZ
d2d3d4d5d6d7hZd#d(d8hZd9d:d;d<d=d>hZee
B eB eB eB Zd?Zd@�e�ZdAZdBjeedC�ZdDjedE�ZdFjeedG�ZdHjedI�ZdJjedE�ZdKjeedL�ZdMjeedN�ZdOjedP�ZdQjedP�ZdRjedP�ZdSjeeedT�Z dUjeedV�Z!dWjeedV�Z"dXjedP�Z#dYjedE�Z$dZ�e!�Z%d[jedP�Z&d\je"eeeed]�Z'd^je"eed_�Z(d`je"eeda�Z)dbje"edc�Z*ddjeede�Z+d`je"eeda�Z,e�-dfjedE�ej.�Z/e�-dgjeedG�ej.�Z0e�-dhjedE�ej.�Z1e�-dijeedN�ej2�Z3e�-e�Z4e�-dj�e��Z5e�-dk�e��Z6e�-dl�e#�ej2�Z7dmZ8dnZ9dZ:doZ;dpZ<dqZ=drZ>dsZ?dtZ@duZAdvZBdwZCdxZDejEeDdy�dzd{� �ZFd|d}� ZGd~d� ZHd�d�d��ZId�d�� ZJG d�d�� d�eK�ZLG d�d�� d�eL�ZMG d�d�� d�eK�ZNG d�d�� d�eK�ZOeOd��jPe:e>B d��ZQeOd��jPe:e>B d��ZReOd��jPe:e>B e=B d��ZSeOd��jPe:e>B e?B d��ZTeOd��jPe:e>B d��ZUeOd��jPe:e>B d��ZVeOd��jPe:e>B d��ZWeOd��jPe:e>B d��ZXeOd��jPe:e>B eCB d��ZYeOd��jPe:d��ZZeOd��jPe:e>B d��Z[eOd��jPe:e>B d��Z\eOd��jPe:eAB e>B d��Z]eOd��jPe:eBB e>B d��Z^dS )�zCSS selector parser.� )�unicode_literalsN� )�util)� css_match)� css_types)�SelectorSyntaxErrori�� � :any-link�:empty�:first-child�:first-of-type� :in-range�
:out-of-range�:last-child�
:last-of-type�:link�:only-child�
:only-of-type�:root�:checked�:default� :disabled�:enabled�:indeterminate� :optional�:placeholder-shown�
:read-only�:read-write� :required�:scope�:definedz:activez:currentz:focusz:focus-visiblez
:focus-withinz:futurez:hostz:hoverz:local-linkz:pastz:pausedz:playingz:targetz:target-withinz
:user-invalidz:visited� :contains�:hasz:isz:matches�:notz:wherez
:host-context�:dir�:lang�
:nth-child�:nth-last-child�:nth-last-of-type�:nth-of-typez(?:\r\n|(?!\r\n)[\n\f\r])z(?:[ \t]|{})z"(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)z(?:{ws}|{comments}))�ws�commentsz*(?:\\(?:[a-f0-9]{{1,6}}{ws}?|[^\r\n\f]|$)))r) z/(?:\\(?:[a-f0-9]{{1,6}}{ws}?|[^\r\n\f]|$|{nl})))r) �nlz�
(?:(?:-?(?:[^\x00-\x2f\x30-\x40\x5B-\x5E\x60\x7B-\x9f]|{esc})+|--)
(?:[^\x00-\x2c\x2e\x2f\x3A-\x40\x5B-\x5E\x60\x7B-\x9f]|{esc})*)
)Zescz>(?:[-+])?(?:[0-9]+n?|n)(?:(?<=n){ws}*(?:[-+]){ws}*(?:[0-9]+))?zT
(?:"(?:\\(?:.|{nl})|[^\\"\r\n\f]+)*?"|'(?:\\(?:.|{nl})|[^\\'\r\n\f]+)*?'|{ident}+)
)r+ �identzU
(?:{ws}*(?P<cmp>[!~^|*$]?=){ws}*(?P<value>{value})(?:{ws}+(?P<case>[is]))?)?{ws}*\]
)r) �valuez \#{ident})r, z \.{ident}z$(?:(?:{ident}|\*)?\|)?(?:{ident}|\*)z7\[{ws}*(?P<ns_attr>(?:(?:{ident}|\*)?\|)?{ident}){attr})r) r, �attrz$(?P<name>:{ident})(?P<open>\({ws}*)?)r) r, z#(?P<name>:{ident})(?P<open>\({ws}*)z(?P<name>:(?=--){ident})z{ws}*\)z:{}z @P{ident}z}
(?P<pseudo_nth_child>{name}
(?P<nth_child>{nth}|even|odd))(?:{wsc}*\)|(?P<of>{comments}*{ws}{wsc}*of{comments}*{ws}{wsc}*))
)�name�wscr* r) �nthzA
(?P<pseudo_nth_type>{name}
(?P<nth_type>{nth}|even|odd)){ws}*\)
)r/ r) r1 z7{name}(?P<values>{value}(?:{ws}*,{ws}*{value})*){ws}*\))r/ r) r- z{name}(?P<dir>ltr|rtl){ws}*\))r/ r) z0{wsc}*?(?P<relation>[,+>~]|{ws}(?![,+>~])){wsc}*)r) r0 z0(?:(\\[a-f0-9]{{1,6}}{ws}?)|(\\[^\r\n\f])|(\\$))z9(?:(\\[a-f0-9]{{1,6}}{ws}?)|(\\[^\r\n\f])|(\\$)|(\\{nl}))zL(?P<s1>[-+])?(?P<a>[0-9]+n?|n)(?:(?<=n){ws}*(?P<s2>[-+]){ws}*(?P<b>[0-9]+))?z-(?:(?P<value>{value})|(?P<split>{ws}*,{ws}*))z^{}*z{}*$z^{}$�,� � � � � � �@ � � i i� )�maxsizec C s( t |�}t�| t| ||d��� |||�S )zCached CSS compile.��custom�flags)�process_custom�cmZ SoupSieve� CSSParser�process_selectors)�patternZ
namespacesr>