
     hY
                     T    d Z dgZddlZddlZddlmZ  G d dej                        Zy)zCSSComment is not defined in DOM Level 2 at all but a cssutils defined
class only.

Implements CSSRule which is also extended for a CSSComment rule type.

CSSComment    N   )cssrulec                        e Zd ZdZ	 d fd	Zd Zd Zd Z fdZ e	eed      Z
 e	d	 d
      Z e	d       Z xZS )r   zR
    Represents a CSS comment (cssutils only).

    Format::

        /*...*/
    c                 j    t         |   ||       d | _        |r| j                  |       || _        y )N)
parentRuleparentStyleSheet)super__init___cssText_setCssText	_readonly)selfcssTextr   r	   readonly	__class__s        W/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/cssutils/css/csscomment.pyr   zCSSComment.__init__   s7     	JAQRW%!    c                 P    d| j                   j                   d| j                  dS )Nzcssutils.css.z	(cssText=))r   __name__r   r   s    r   __repr__zCSSComment.__repr__$   s(    t~~667y@PPQRRr   c                 j    d| j                   j                   d| j                  dt        |       ddS )Nz<cssutils.css.z object cssText=z at 0xx>)r   r   r   idr   s    r   __str__zCSSComment.__str__'   s;     7 788HHXX^_abf_ghi^jjkllr   c                 @    t         j                  j                  |       S )z#Return serialized property cssText.)cssutilsserdo_CSSCommentr   s    r   _getCssTextzCSSComment._getCssText*   s    ||))$//r   c                    t         |   |       | j                  |      }| j                  |      }| j                  |      }|r*| j	                  |      | j
                  j                  k7  s|rH| j                  j                  d| j                  |      z  t        j                  j                         y| j                  |      | _        y)ah  
        :param cssText:
            textual text to set or tokenlist which is not tokenized
            anymore. May also be a single token for this rule

        :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.NoModificationAllowedErr`:
              Raised if the rule is readonly.
        z CSSComment: Not a CSSComment: %r)errorN)r
   r   
_tokenize2
_nexttoken_type_prodsCOMMENT_logr%   	_valuestrxmldomInvalidModificationErr_tokenvaluer   )r   r   	tokenizercommenttoken
unexpectedr   s        r   r   zCSSComment._setCssText.   s      	G$OOG,	y1__Y/
 zz,'4;;+>+>>IIOO2T^^G5LLgg44  
 !,,\:DMr   z1The parsable textual representation of this rule.)docc                     | j                   S )N)r*   r   s    r   <lambda>zCSSComment.<lambda>W   s    T\\r   z=The type of this rule, as defined by a CSSRule type constant.c                      y)NT r   s    r   r6   zCSSComment.<lambda>\   s    tr   )NNNF)r   
__module____qualname____doc__r   r   r   r#   r   propertyr   type
wellformed__classcell__)r   s   @r   r   r      s_     NS	"Sm0 ;D ?G !ND +,Jr   )	r;   __all__xml.domr-   r     r   CSSRuler   r8   r   r   <module>rD      s.    .   L- L-r   