403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.52
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/css_parser/css/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/css_parser/css/__pycache__/cssfontfacerule.cpython-312.pyc
�

��3e����ddlmZmZmZmZddlZddlZddlm	Z	ddl
mZ	dgZdZ
dZddlZej dd	k\reZneZGd
�de	j(�Zy)�)�unicode_literals�division�absolute_import�print_functionN�)�cssrule)�CSSStyleDeclaration�CSSFontFaceRule�restructuredtextz$Id$�c���eZdZdZ		d�fd�	Zd�Zd�Zd�Z�fd�Ze	eed��Z
d	�Ze	d
�ed��Ze	d�d
��Z
d�Ze	ed��Ze	d��Z�xZS)r
a=
    The CSSFontFaceRule interface represents a @font-face rule in a CSS
    style sheet. The @font-face rule is used to hold a set of font
    descriptions.

    Format::

        font_face
          : FONT_FACE_SYM S*
            '{' S* declaration [ ';' S* declaration ]* '}' S*
          ;

    css_parser uses a :class:`~css_parser.css.CSSStyleDeclaration`  to
    represent the font descriptions. For validation a specific profile
    is used though were some properties have other valid values than
    when used in e.g. a :class:`~css_parser.css.CSSStyleRule`.
    c���tt|�||��d|_|r||_||_yt�|_||_y)z�
        If readonly allows setting of properties in constructor only.

        :param style:
            CSSStyleDeclaration used to hold any font descriptions
            for this CSSFontFaceRule
        )�
parentRule�parentStyleSheetz
@font-faceN)�superr
�__init__�
_atkeyword�styler	�	_readonly)�selfrrr�readonly�	__class__s     ��@/usr/lib/python3/dist-packages/css_parser/css/cssfontfacerule.pyrzCSSFontFaceRule.__init__*sL���	�o�t�-��?O�	.�	Q�&�����D�J�"���-�.�D�J�!���c�d�d|jj�d|jj�d�S)Nzcss_parser.css.z(style=�))r�__name__r�cssText�rs r�__repr__zCSSFontFaceRule.__repr__>s&���N�N�#�#��J�J��� �	 rc��d|jj|jj|jt|�fzS)Nz4<css_parser.css.%s object style=%r valid=%r at 0x%x>)rrrr�valid�idrs r�__str__zCSSFontFaceRule.__str__Cs=��E��N�N�#�#��J�J����J�J��t�H�	I��	rc�@�tjj|�S)z#Return serialized property cssText.)�
css_parser�ser�do_CSSFontFaceRulers r�_getCssTextzCSSFontFaceRule._getCssTextJs���~�~�0�0��6�6rc�l��tt|�|�|j|�}|j	|d�}|j|�|jjk7rH|jjd|j|�ztjj��yt|��}d}|j|dd��\}}|j!|�dk7r0d}|jjd	|j|�z|�d
di}|j#�}	|j%d|	|j|�i��\}
}|xr	|
xr|d
}|j|dd�
�\}}
|j!|
�|j|
�}}|dk7r4|dk7r/d}|jjd|j|�z�|j	|�}|rd}|jjd|��d|k(r|j'|
�||_|r|j+|	�||_yy)ad
        :exceptions:
            - :exc:`~xml.dom.SyntaxErr`:
              Raised if the specified CSS string value has a syntax error and
              is unparsable.
            - :exc:`~xml.dom.InvalidModificationErr`:
              Raised if the specified CSS string value represents a different
              type of rule than the current one.
            - :exc:`~xml.dom.HierarchyRequestErr`:
              Raised if the rule cannot be inserted at this point in the
              style sheet.
            - :exc:`~xml.dom.NoModificationAllowedErr`:
              Raised if the rule is readonly.
        Nz-CSSFontFaceRule: No CSSFontFaceRule found: %s)�error)rT)�blockstartonly�separateEnd�{Fz:CSSFontFaceRule: No start { of style declaration found: %r�
wellformed�:)�expected�seq�	tokenizer�productions)�blockendonlyr-�}�EOFz9CSSFontFaceRule: No "}" after style declaration found: %rz(CSSFontFaceRule: Trailing content found.)�token)rr
�_setCssText�
_tokenize2�
_nexttoken�_type�_prods�
FONT_FACE_SYM�_logr+�	_valuestr�xml�dom�InvalidModificationErrr	�_tokensupto2�_tokenvalue�_tempSeq�_parse�appendr�_setSeqr)rrr3�attoken�newStyle�ok�beforetokens�brace�new�newseq�beforewellformedr1�styletokens�braceorEOFtoken�val�type_�	nonetokenrs                 �rr9zCSSFontFaceRule._setCssTextNsA���	�o�t�0��9��O�O�G�,�	��/�/�)�T�2���:�:�g��$�+�+�";�";�;��I�I�O�O�K� �N�N�7�3�4�"%�'�'�"@�"@�
�
B�+�d�;�H��B�"&�"3�"3�I�CG�@D�#4�#F��L�%�����&�#�-����	�	���!8�"&�.�.��"9�!:�;@�B�
 ��&�C��]�]�_�F�)-���c�9?�4�?�?�[g�Kh�AC�*5�*E�&��h��>�(�>�S��->�B�+/�+<�+<�Y�JN�IM�,=�,O�(�K���)�)�/�:�D�J�J��<W��C��c�z�e�u�n����	�	���!8�"&�.�.��"9�!:�;����	�2�I�����	�	��� J�&/� �1���~��"�"�?�3� +�H������V�$�%��
�rz7(DOM) The parsable textual representation of this rule.)�docc��|j�t|t�rt||��|_y||_||_y)zK
        :param style:
            a CSSStyleDeclaration or string
        )rrN)�_checkReadonly�
isinstance�string_typer	�_style�_parentRule)rrs  r�	_setStylezCSSFontFaceRule._setStyle�s7��
	
�����e�[�)�-�e��M�D�K� $�E���D�Krc��|jS�N)r\rs r�<lambda>zCSSFontFaceRule.<lambda>�s
��$�+�+�rz](DOM) The declaration-block of this rule set, a :class:`~css_parser.css.CSSStyleDeclaration`.c��|jSr`)�FONT_FACE_RULErs rrazCSSFontFaceRule.<lambda>�s���!4�!4�rz=The type of this rule, as defined by a CSSRule type constant.c���ddg}|jjd��D],}|jsy	|j|j��.t
|�S#t
$rY�FwxYw)Nzfont-family�srcT)�allF)r�
getPropertiesr"�remove�name�
ValueError�bool)r�needed�ps   r�	_getValidzCSSFontFaceRule._getValid�so����'�����)�)�d�)�3�	�A��7�7��
��
�
�a�f�f�%�		���<�����
��
�s�A�	A(�'A(z`CSSFontFace is valid if properties `font-family` and `src` are set and all properties are valid.c��y)NT�rs rrazCSSFontFaceRule.<lambda>�s�r)NNNF)r�
__module__�__qualname__�__doc__rr r$r)r9�propertyrr^r�typernr"r/�
__classcell__)rs@rr
r
s�����$/3�16�"�( �
�7�H&�T�{�K�#�$�G� �
�-�y�K�
L�E��4�)�*�D�	 �
�Y�K�
L�E�
�+�,�Jr)�
__future__rrrr�xml.domrAr&�r�cssstyledeclarationr	�__all__�
__docformat__�__version__�sys�version_info�strr[�
basestring�CSSRuler
rprr�<module>r�sb��R�R����4���
��"�
���
����A��!���K��K�j-�g�o�o�j-r

Youez - 2016 - github.com/yon3zu
LinuXploit