| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /tmp/calpy/weasyprint/__pycache__/ |
Upload File : |
�
Х=jg: � � � d Z ddlZddlmZ ddlmZ ddlmZmZm Z ddl m
Z
ddlmZ dd l
mZ dd
lmZ ddlmZ ddlmZ e� � Z ee � � d
z � d� � Z ee � � dz � d� � Z ee � � dz � d� � Z eee�� � Z eee�� � Z ee�� � ZdZ ej de� d�� � Z ej de� d�� � Z ej de� d�� � Z!d� Z"d� Z#d� Z$d� Z%d� Z&d� Z'd� Z(d � Z)d!� Z*d"� Z+d#� Z,i Z-d$� Z.d%� Z/d&� Z0 e/d'� � d(� � � Z1 e/d)� � d*� � � Z2 e/d+� � d,� � � Z3 e/d-� � d.� � � Z4 e/d/� � d0� � � Z5 e/d1� � d2� � � Z6d3� Z7d4� Z8 ej d5ej9 � � Z:d6� Z;dS )7aV Specific handling for some HTML elements, especially replaced elements.
Replaced elements (eg. <img> elements) are rendered externally and behave as an
atomic opaque box in CSS. In general, they may or may not have intrinsic
dimensions. But the only replaced elements currently supported in WeasyPrint
are images with intrinsic dimensions.
� N)�files)�parse_color� )�CSS�
Attachment�css)�get_child_text)�CounterStyle)�boxes)�SVGImage)�LOGGER)�get_url_attributezhtml5_ua.csszutf-8zhtml5_ua_form.csszhtml5_ph.css)�string�
counter_style�r z
z[^z]+z^[z]*([+-]?)([0-9]+)z]*([0-9]+([.][0-9]*)?)(%)?c �� � t � | pd� � x}r@|� d� � dk rdndt |� d� � � � z S dS )zbParse an integer from an HTML attribute value.
Return an integer, or ``None`` on error.
� r �-���� N)�
INTEGER_RE�match�group�int�r r s �B/tmp/claude-1015/pip-target-jmvfl800/lib/python/weasyprint/html.py�
parse_integerr ( se � � � � ���2�.�.�.�u� J��k�k�!�n�n��+�+����c�%�+�+�a�.�.�6I�6I�I�I�J� J� c �8 � t | � � }|�|dk r|ndS )znParse a non-negative integer from an HTML attribute value.
Return an integer, or ``None`` on error.
Nr )r )r �integers r �parse_non_negative_integerr! 3 s( � � �F�#�#�G��)�g��l�l�7�7��Dr c � � t � | pd� � x}r?t |� d� � � � |� d� � dk rdndfS dS )z�Parse a dimension value from an HTML attribute value.
Return an integer and a unit string ('%' or 'px'), or ``None`` on error.
r r � �%�pxN)�DIMENSION_REr �floatr r s r �parse_dimension_valuer( >