
    T-h!                         d Z ddlmZmZ ddlmZmZ ddlmZm	Z	m
Z
mZ ddlmZ ddlmZmZ d	d
lmZ d	dlmZmZmZmZ h dZ e
d	d	d      Z e
d	d	d       e	d	d	d      fZddZy)z/Validate properties, expanders and descriptors.    )SelectorErrorcompile_selector_list)parse_blocks_contents	serialize)FunctionBlock
IdentTokenLiteralTokenWhitespaceToken   )LOGGER   )InvalidValuesremove_whitespace   )	EXPANDERS)PREFIXPROPRIETARYUNSTABLEvalidate_non_shorthand>[   	cue-after
cue-beforecaret-colorcaret-shapepause-afterpitch-rangeplay-duringspeech-ratewill-changefield-sizingpause-beforespeak-headertouch-actionvoice-familyscroll-marginspeak-numeralview-timelineanimation-namepointer-eventsscroll-paddingtimeline-scopeanimation-delayanimation-rangescroll-behaviorscroll-timelinescrollbar-colorscrollbar-widthscroll-snap-stopscroll-snap-typescrollbar-guttertransition-delayscroll-margin-topscroll-snap-alignspeak-punctuationanimation-durationanimation-timelinescroll-margin-leftscroll-padding-topview-timeline-axisview-timeline-nameanimation-directionanimation-fill-modeanimation-range-endoverscroll-behaviorscroll-margin-blockscroll-margin-rightscroll-padding-lefttransition-durationtransition-propertyview-timeline-insetanimation-play-statescroll-margin-bottomscroll-margin-inlinescroll-padding-blockscroll-padding-rightscroll-timeline-axisscroll-timeline-nameview-transition-nameanimation-compositionanimation-range-startoverscroll-behavior-xoverscroll-behavior-yscroll-padding-bottomscroll-padding-inlinescroll-margin-block-endscroll-margin-inline-endscroll-padding-block-endanimation-iteration-countanimation-timing-functionoverscroll-behavior-blockscroll-margin-block-startscroll-padding-inline-endoverscroll-behavior-inlinescroll-margin-inline-startscroll-padding-block-starttransition-timing-functionscroll-padding-inline-startcuecaretpausepitchspeakcursorresizestressvolumeazimuthrichness	animation	elevation
transition&:rootNc           
   #     K   |O	 t         |v r;|g }}|D ]2  }|t         k(  r|j                  t               "|j                  |       4 t	        |      }t        ddd      t        ddd|      f}|D ]\  j                  dk(  r6t        j                  dj                  j                  j                         j                  dk(  r|\g }g g}j                  D ]-  }|d	k(  r|j                  g        |d
   j                  |       / |D ]  }	t         |	v r>j                  D ].  }|t         k(  r|j                  |       |j                  |       0 n=t        ddd      t        ddd|      f}|j                  g |t!        ddd      |	       |j                  t        ddd	              t#        | t%        j&                        |dd
       E d{    j                  dk7  rj(                  }
|
j+                  d      sj,                  }
fd}|
t.        v r |dd       |
j+                  t0              r|
t3        t0              d }|t4        v r|}
n|t6        v rNt        j                  dj(                  t        j8                        j                  j                  |       |}
nMt        j                  dj(                  t        j8                        j                  j                  |       |
j+                  d      r|
j+                  d      s |dd       t;        j<                  |
t>              }tA        j8                        }	 |stC        d      tE         |||
|             }jH                  }|D ]:  \  }}||jK                  dd      ||ff $|jK                  dd      ||f < _ y# t
        $ r t        dt        |       d      w xY w7 # tB        $ r>} |d|jF                  r|jF                  d   r|jF                  d   nd       Y d}~d}~ww xY ww)zExpand shorthand properties, filter unsupported properties and values.

    Log a warning for every ignored declaration.

    Return a iterable of ``(name, value, important)`` tuples.

    N'r   rr   iserrorzError: %s at %d:%d.zqualified-rule, declarationz--c                      t        t        |       dj                  t        j                        j
                  j                  |       y )NzIgnored `%s:%s` at %d:%d, %s.)getattrr   namer   valuesource_linesource_column)levelreasonr{   s     h/var/www/core.comfia.cic-ware.com/crm/lib/python3.12/site-packages/weasyprint/css/validation/__init__.pyvalidation_errorz1preprocess_declarations.<locals>.validation_error   sA    "GFE"/  )K,=,=">'')B)BFL    debugz/the property does not apply for the print mediaz\Deprecated `%s:%s` at %d:%d, prefixes on unstable attributes are deprecated, use %r instead.zTIgnored `%s:%s` at %d:%d, prefix on this attribute is not supported, use %r instead.-zprefixed selectors are ignoredzno valuewarningr   zinvalid value_)&NESTING_SELECTORextend
ROOT_TOKENappendr   r   r   r	   r   typer   r   messager   r   preluder
   preprocess_declarationsr   contentr~   
startswith
lower_nameNOT_PRINT_MEDIAr   lenr   r   r   r   getr   r   r   listargs	importantreplace)base_urldeclarationsr   original_preludetoken	selectorsis_tokendeclaration_preludetoken_groupstoken_groupr~   r   unprefixed_name	validatortokensresultexcr   	long_namer   r{   s                       @r   r   r   r   s}     	;7* -4R' - .E 00z2u-	.
 .g6I
 Aq#&aD'(JJH# iDw&NN%##'')B)BD
 //"$4L$,, 3C< ''+ $++E2	3
  , D#{2!,!4!4 > $44/66x@/66u=	> %Q3/%aD': <H (.. 0&!0&#21a#=0&$0& ' $**<1c+BC!D" //0C0CD#CR(* * * },t$))D	L ?"JL??6""3v;<0O+-& H,&  $$i0A0A&B++[-F-F#% '&  $$i0A0A&B++[-F-F#% ??3(=W&FGMM$(>?	";#4#45	 #J//)FD(;<F  ))	 & 	DIu"(00c:E9M,,''S15)CC	DIiD  	;!Ig$6#7q 9::	;P*t  	"xxCHHQK_N 		sV   QAO FQO8FQ$ O;AQ"O55Q;	Q3P=7Q=QQ)N)__doc__
cssselect2r   r   tinycss2r   r   tinycss2.astr   r   r	   r
    r   utilsr   r   	expandersr   
propertiesr   r   r   r   r   r   r   r    r   r   <module>r      s`    5 ; 5 Q Q  4   M M`B  1c* !Q$jAv&>>
DDr   