U
    '1e#C                 J  @   sV&  d Z dZdZddlZddlZddlZddlZddlZddl	m
Z
 ddlmZmZmZm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mZmZmZ ddl m!Z! ddl"m#Z# ddl$m%Z% e&dZ'dZ(dZ)dZ*dZ+dddZ,ddeedeeede&dfddZ-dd Z.dd Z/ddd Z0G d!d" d"e1Z2d#d$ Z3G d%d& d&Z4G d'd( d(e4Z5e6ddd)d*Z7e&d+Z8G d,d- d-e4Z9d.d/ Z:d0d1 Z;d2d3 Z<d4d5 Z=d6d7 Z>d8d9 Z?d:d:d;e-fd;e-fd<e-fd=e;fd>e-fd?e-fd@e-fdAe<fdBe-fdCe-fdDdEe-fdFe-fdGe-fdHefdIe=fdJefdKefdKefdKefdJefdLe/fdMe.fdNe>fdOe/fdPe/fdQe/fdRe-fdSe-fdTefdUe-fdVe?fdWdXe9dYdXfdZefd[e9dYd[fd\e9dYd\fd]e9dYd]fd^efd_e9dYd_fd`e9dYd`fdae-fdbdce/fdde.fdee-fdfe/fdg1Z@dDdDdEe-fdEe-fdFe-fdGe-fdHefdHefdIe=fdh	ZAd;e-fd:d:dJefdJefdKefdKefdiZBd;e-fd:d:dJefdJefdKefdKefdjdkZCd;e-fd:d:dJefdJefdKefdKefdldldldldZefd[e9dmd[fdXe9dmdXfd\e9dmd\fdne/fdodpZDdqdriZEdsdte0fdue0fdve:fdwZFdrdxdydzd{ZGd|e5d}d~fde5d}dfdZHdZefdXe9dndXfd[e9dnd[fd\e9dnd\fdodZId^efd]e9dd]fd_e9dd_fd`e9dd`fddZJdd ZKeKe@ eKeB eKeC eKeA eKeE eKeD dd ZLdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4dҐd5d5d6dd7d8ddԐd9d:d;d<d<d=d>d?d=d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZdZd[d\d]d]dMd^d_d`dadadbdcdddedfdgdhdidjdkdldmdndodpdqdrdfdsdtdudvdwdxdydydzd{d|ddǐd}d~ddddddddddddddddddΐddddddddddddddddddddɐdddddddddddddddddvddddddddddddddddddIddddddddddddÐdĐdŐdƐdddȐddɐdʐdːdːdːd̐d̐d͐ddΐdϐdАdАdѐdѐdҐdӐdԐdՐd֐dאdؐd͐dȐdِdڐdِdېdܐddؐdd͐ddސdߐddddddddddddddddƐdǐddddddddddddddddddddddddd ddddddddd	d
dddddddڐddddddddddddddddd d!d"d"d#d"d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d2d4d	dd5ddd6d7d5d8d9dd:d;d<d=d>d?dِd@d5dAdBdCdDdEdFdGdHdIdId>ddddJdKdLdMdNdOdPdQdRdSddTdUdVdWdXdYdZd[d[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpd^dqdrdsdtdudΐdvdwdxdydzd{d|d}d~dddddddddddddddddddddddddddddddddddddɐdddddddddddddddddddddvdddddddddLdd`ddddߐddddddddddddddddddddddddddÐddĐdŐd=d?dƐddǐdȐdɐdʐdːd̐d͐dΐdϐdАdѐdߐdҐdӐdԐdՐd֐dאdؐdِdڐdېdܐdҐdݐdސdҐd֐dߐdҐdddddddddddddddddddɐddddddddddddߐdddddddddddddd ddddddddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d*d,d&d-d.dސd/d0d1d2dd3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHd?dIdJdKdLdސdMdNdOdPdQd*d/dސd/d0dRd6dHdSdTdƐdUdVddWdXddߐddRdYddZdd[d\d]d^d_d`dadbdcdddWdedfdgdQdPdhdhdidjdkdldmdnd,dodgdfdgdPdpdpdqdrdhdrdsdVdtdudpdvdwddWdxdydzd{d|d}dXdԐd"d~dddddddddddddddSddddddddddd3ddddddddddddddddRddYddddd&ddddrddd@dddddd}ddddod]ddddd`ddddddddddddddd[ddddddddddddddddȐdĐd]dŐddېdƐdǐdȐddǐdɐdʐdːdǐdddd͐dΐdϐdϐddАdѐdҐdӐdԐdՐd֐dӐdאdאdؐdِdڐdېdܐdݐdސdߐdddddddddddddddddddddd}dddddddddddddddddddddd dddddddddddddddd	d	d
dddd
ddddddِdؐddddddddddddddddddڐdېdddddddddd
dddd	dd d!d"d"d#d$d%d&d'd"d(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8ddӐdddd9d:d;d%d'd&d%d&d<d=d>d?d<d=d(d*d1d3d2d@dAddd7d8d8ddd,d.dBdCd0d/d0dCd1d2dDdEd6d5d6dEddFdGdddd(d*dHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d_d`dadbdidjdcdddedfdkdgdhdidldjdkdldmdndodpdqdrdsdtduddgdvdwdxdydzd{dud|d}d~ddoddddLdddpdddhddddddddddndddddddddqdddddxddddddddddddddddddddddddddd\dddddddddܐdddddddddddddddddddddddddddÐdĐdŐddƐdǐddÐdĐdŐdȐdȐdɐdʐdːd̐dzd̐d̐dd͐dΐdϐdАdѐdҐdӐdԐdאdՐd֐dאdؐdِddڐdېd8dܐdܐdݐdސdߐddddddddddddddddddddddddddddՐddddddddddddd dddddddwdwdddddd	d
dmdmddYdddddddddddddddddddddddǐdddddd9ddddddddddd d!d"dd#d$d=dd9d%d&d&d'd(d)dd*d	d+d,d-d.d/d0d1ddݐd2dd3d4d4ddxdxdd5d6ddd7d8d9d:d;d<dd=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdݐdQddRdddSdTdUddՐdVdWdXdpdYdZd[d\d]dd/dÐddd^d_d`dadbdbdcdddededfdgdhdidjdkdld/ddՐdmdndÐdodpdqdrdsdtdudvdwdxdydzdzdd{d|d}d~ddddddddddddd{ddddd}ddddddՐdoddddd4dddddddddddddddddddddddd>d?dBd>dDdBdMdDdIdJdKdMdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddcddÐdcdʐdedddĐddŐdƐdؐdddǐdȐdɐdʐdːdUd̐d͐d͐dΐddd`dϐd6ddАdϐdѐdҐdӐdԐdՐd֐dאdؐdِdڐdېdܐddd.ddސdߐddd^ddddddddddddddddddddcd!dddddddd͐dddڐddddddd d^dd^dddddddcd!dd_ddddddddddddd	d
dddddddddddddd4dd"ddd̐ddddbdddddd^ddddddddddd ddd!d"d#d$d%d$d%dÐd%d&d'dd(d)d^d/d5d*d+d̐dd,d-ddddd.d/d0d1d2ddd3d4d5d6d7d8d4d'd'd9d:ddddd;d<ddd=d>dddd?dd@dAdddddBdCddddddDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`daddbdcdadddedfdgddhdidjdkdldmIZMe6dndo e%N D ZOeMD ]ZPePeOk$reMeP eOeP< $qG dpdq dqe
ZQdaRdrds ZSG dtdu due#ZTeUdvk&rRddwlVmWZW ddxlXmYZY eT ZZeZfdydzZ[eQ Z\eYe\_]d{e\_^ee\__ee\_`eYe\_`d{e\_ad|Zbe[eb e[d} e[d~eY  e[d e[d e[d e[d e[d e[d e[d e[d e[d e[d e[d deZ_ce[d e[d e[d e[d e[d e[d dS (  )ParaFrag
ParaParserz3.5.20z3The parser used to process markup within paragraphs    N)ABag)ImageReaderannotateExceptionencode_label	asUnicode)toColorblack)tt2psps2tt)TA_LEFTTA_RIGHT	TA_CENTER
TA_JUSTIFY)inchmmcmpica)platypus_link_underline)
HTMLParser)name2codepointz^\s*<\s*para(?:\s+|>|/>)   g      ?Z	_indexAdd   Tc                 C   s~   | d dkrJ|rJzdt | | fW S  tk
rF   dt| | f Y S X n0zt | | W S  tk
rx   t| |  Y S X d S )Nr   )+-relative)int
ValueErrorfloatsunitallowRelative r$   A/tmp/pip-unpacked-wheel-109iniqw/reportlab/platypus/paraparser.py_convnum   s    r&   )iinptr   r   r   z ^\s*(.*)(i|in|cm|mm|pt|pica)\s*$c                 C   s2   | | }|r&||d }|d} t| ||S )zConvert a string like '10cm' to an int or float (in points).
       The default unit is point, but optionally you can use other
       default units like mm.
    r   r   )matchgroupr&   )r!   r"   r#   Z	_unit_mapZ_re_unitmr$   r$   r%   _num+   s
    

r-   c                 C   s(   z
t | W S    td|  Y nX d S )Nzcannot convert %r to int)r   r   r!   r$   r$   r%   _int9   s    
r/   c                 C   s0   |   } | dkrdS | dkr dS td|  d S )N)true1yesT)false0noFzcannot convert %r to bool valuelowerr   r.   r$   r$   r%   _bool?   s    r8   Fc                 C   s2   |  dr"tt| d d |dS t| ||S d S )N%r#   )endswith_PCTr&   r-   r    r$   r$   r%   _numpctG   s    
r>   c                   @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
r=   c                 C   s    t | |d }d|_||_|S )Ng{Gz?g      ?)r   __new___normalizer_value)clsvselfr$   r$   r%   r?   N   s    z_PCT.__new__c                 C   s*   |s
| j }t|| j }| j|_||_ |S N)r@   r=   rA   )rD   
normalizerZ
normaliserrr$   r$   r%   normalizedValueT   s    z_PCT.normalizedValuec                 C   s   t t| }| j|_t|_|S rE   )r=   r   rA   rF   r@   )rD   rG   r$   r$   r%   __copy__\   s    z_PCT.__copy__c                 C   s   |   S rE   )rI   )rD   Zmemr$   r$   r%   __deepcopy__b   s    z_PCT.__deepcopy__N)__name__
__module____qualname__r?   rH   rI   rJ   r$   r$   r$   r%   r=   M   s   r=   c                 C   sR   t | |s|S tt| |dd}t|tr8|d | j S t|trN|| jS |S )NTr;   r   )hasattrr>   getattr
isinstancetuplefontSizer=   rH   )fragattrdefaultrC   r$   r$   r%   fontSizeNormalizee   s    
 rV   c                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )_ExValidatez)class for syntax checking attributes
    c                 C   s   || _ || _d S rE   )tagrT   )rD   rX   rT   r$   r$   r%   __init__m   s    z_ExValidate.__init__c                 C   s   t d| j|| jf d S )Nz&<%s> invalid value %r for attribute %s)r   rX   rT   )rD   r!   r$   r$   r%   invalidq   s    z_ExValidate.invalidc                 C   s   t d|S )Nzabstract method calledr   rD   parserr!   r$   r$   r%   validatet   s    z_ExValidate.validatec                 C   s*   z|  ||W S    | | Y nX d S rE   )r^   rZ   r\   r$   r$   r%   __call__x   s    z_ExValidate.__call__N)rK   rL   rM   __doc__rY   rZ   r^   r_   r$   r$   r$   r%   rW   j   s
   rW   c                   @   s    e Zd ZdZdd Zdd ZdS )	_CheckSupz~class for syntax checking <sup|sub> attributes
    if the check succeeds then we always return the string for later evaluationc                 C   s    |j d j| _t| | jd |S )Nr:    )_stackrR   rV   rT   r\   r$   r$   r%   r^      s    z_CheckSup.validatec                 C   s   t | | j| t| ||S rE   )setattrrT   rW   r_   r\   r$   r$   r%   r_      s    z_CheckSup.__call__N)rK   rL   rM   r`   r^   r_   r$   r$   r$   r%   ra   ~   s   ra      )singledoubleZtriplez^\s*(.*)\s*\*\s*(P|L|f|F)\s*$c                   @   s   e Zd ZdZdd ZdS )_CheckUSz<class for syntax checking <u|strike> width/offset attributesc                 C   sX   |  }|rTt|}|rHt|d}|ddkrT|jd j| S nt|dd |S )Nr   r   Pr   Fr;   )strip_re_us_valuer*   r   r+   rc   rR   r-   )rD   r]   r!   r,   rC   r$   r$   r%   r^      s    
z_CheckUS.validateN)rK   rL   rM   r`   r^   r$   r$   r$   r%   rh      s   rh   c                 C   sf   |   } | dkr| S | drHt| d d }t|tr@|d }t|S t| }t|trb|d }|S )N)Zbaselinesubsupertopztext-topmiddlebottomztext-bottomr9   r:   r   )r7   r<   r&   rP   rQ   r=   r-   )r!   nr$   r$   r%   	_valignpc   s    


rr   c                 C   s$   |   } | dkr| S td|  d S )N)rb   minmaxoffzInvalid autoLeading=%rr6   )xr$   r$   r%   _autoLeading   s    rw   c                 C   sH   |   } | dkrtS | dkr tS | dkr,tS | dkr8tS td|  d S )NleftrightZjustify)Zcentrecenterzillegal alignment %r)r7   r   r   r   r   r   r.   r$   r$   r%   _align   s        r{   c                 C   s    |   } | dkrtd|  | S )N)startro   endnumericzillegal bullet anchor %rr6   r.   r$   r$   r%   _bAnchor   s    r   c                 C   s,   |    } | sd S | dkr(td|  | S )N)CJKZRTLZLTRzcannot convert wordWrap=%r)upperrj   r   r.   r$   r$   r%   _wordWrapConv   s     r   c                 C   s,   |    } | sd S | dkr(td|  | S )N)Z	uppercaseZ	lowercase
capitalizenonezcannot convert textTransform=%r)r7   rj   r   r.   r$   r$   r%   _textTransformConv   s     r   )fontNameNrR   leadingZautoLeadingZ
leftIndentZrightIndentZfirstLineIndent	alignmentZspaceBeforeZ
spaceAfter)bulletFontNameNbulletFontSizeZbulletOffsetYZbulletIndentbulletColorZbulletAnchor	textColorZ	backColorZjustifyBreaksZjustifyLastLineZwordWrapZallowWidowsZallowOrphansZsplitLongWordsZborderWidthZborderPaddingZborderColorZborderRadiusZtextTransform)ZendDotsNunderlineWidthparaunderlineColorunderlineOffsetunderlineGapstrikeWidthstrikeColorstrikeOffset	strikeGapZspaceShrinkage)ZhyphenationLangNhyphenationOverflowhyphenationMinWordLengthuriWasteReduceembeddedHyphenation)1fontfacefontsizesizer   ZautoleadingZlindentZrindentZfindentZalignZspacebZspaceaZbfontZ	bfontsizeZboffsetyZbindentZbcolorZbanchorcolor	backcolorbgcolorbgfgZjustifybreaksZjustifylastlineZwordwrapZallowwidowsZalloworphansZsplitlongwordsZborderwidthZborderpaddingZbordercolorZborderradiusZtexttransformZenddotsZunderlinewidthZunderlinecolorZunderlineoffsetZunderlinegapZstrikewidthZstrikecolorZstrikeoffsetZ	strikegapZspaceshrinkageZhyphenationLanguager   r   r   r   )	r   r   r   r   Zoffsetyindentr   r   anchor)r   r   namer   r   r   r   )styleN)r   r   r   r   r   r   r   r   )linkNr   	underline)ZunderlineKindN)r   r   r   r   r   r   r   destZdestinationtargethrefZucolorZuoffsetZuwidthZugapr   Zukindr   )r   N)srcNwidthheightvalign)r   r   r   r   )itemN)offsetN)formatN)r   r   r   r   suprzsup|subrisesupsr   )r   r   )r   r   r   gapkindstrike)Z
strikeKindNc                 C   sV   t |  }|D ]@}| | d }|| kr4| | | |< | }|| kr| | | |< qd S )Nr   )listkeysr7   )r,   Kkrq   r$   r$   r%   _addAttributeNamesQ  s      r   c                 C   sb   |  D ]T\}}t|ttfrP|d dkrPt| |rH|d t| | }n|d }t| || qd S )Nr   r   r   )itemsrP   r   rQ   rN   rO   rd   )objrT   r   rC   r$   r$   r%   _applyAttributes`  s    
r      Á   áu   Ău   ău   ∾u   ∿u   ∾̳   Â   â   ´u   Аu   а   Æ   æu   ⁡u   𝔄u   𝔞   À   àu   ℵu   Αu   αu   Āu   āu   ⨿&u   ⩓u   ∧u   ⩕u   ⩜u   ⩘u   ⩚u   ∠u   ⦤u   ∡u   ⦨u   ⦩u   ⦪u   ⦫u   ⦬u   ⦭u   ⦮u   ⦯u   ∟u   ⊾u   ⦝u   ∢   Åu   ⍼u   Ąu   ąu   𝔸u   𝕒u   ≈u   ⩯u   ⩰u   ≊u   ≋'   åu   𝒜u   𝒶u   ≔*u   ≍   Ã   ã   Ä   äu   ∳u   ⨑u   ≌u   ϶u   ‵u   ∽u   ⋍u   ∖u   ⫧u   ⊽u   ⌆u   ⌅u   ⎵u   ⎶u   Бu   бu   „u   ∵u   ⦰u   ℬu   Βu   βu   ℶu   ≬u   𝔅u   𝔟u   ⋂u   ◯u   ⋃u   ⨀u   ⨁u   ⨂u   ⨆u   ★u   ▽u   △u   ⨄u   ⋁u   ⋀u   ⤍u   ⧫u   ▪u   ▴u   ▾u   ◂u   ▸u   ␣u   ▒u   ░u   ▓u   █u   =⃥u   ≡⃥u   ⫭u   ⌐u   𝔹u   𝕓u   ⊥u   ⋈u   ⧉u   ╗u   ╖u   ╕u   ┐u   ╔u   ╓u   ╒u   ┌u   ═u   ─u   ╦u   ╤u   ╥u   ┬u   ╩u   ╧u   ╨u   ┴u   ⊟u   ⊞u   ⊠u   ╝u   ╜u   ╛u   ┘u   ╚u   ╙u   ╘u   └u   ║u   │u   ╬u   ╫u   ╪u   ┼u   ╣u   ╢u   ╡u   ┤u   ╠u   ╟u   ╞u   ├u   ˘   ¦u   𝒷u   ⁏\u   ⧅u   ⟈u   •u   ≎u   ⪮u   ≏u   Ću   ću   ⋒u   ∩u   ⩄u   ⩉u   ⩋u   ⩇u   ⩀u   ⅅu   ∩︀u   ⁁u   ˇu   ℭu   ⩍u   Ču   č   Ç   çu   Ĉu   ĉu   ∰u   ⩌u   ⩐u   Ċu   ċ   ¸u   ⦲   ¢   ·u   𝔠u   Чu   чu   ✓u   Χu   χu   ○u   ˆu   ≗u   ↺u   ↻u   ⊛u   ⊚u   ⊝u   ⊙   ®u   Ⓢu   ⊖u   ⊕u   ⊗u   ⧃u   ⨐u   ⫯u   ⧂u   ∲u   ”u   ’u   ♣u   ∷:u   ⩴,@u   ∁u   ∘u   ℂu   ≅u   ⩭u   ≡u   ∯u   ∮u   𝕔u   ∐   ©u   ℗u   ↵u   ⨯u   ✗u   𝒞u   𝒸u   ⫏u   ⫑u   ⫐u   ⫒u   ⋯u   ⤸u   ⤵u   ⋞u   ⋟u   ↶u   ⤽u   ⋓u   ∪u   ⩈u   ⩆u   ⩊u   ⊍u   ⩅u   ∪︀u   ↷u   ⤼u   ⋎u   ⋏   ¤u   ∱u   ⌭u   ‡u   †u   ℸu   ↡u   ⇓u   ↓u   ‐u   ⫤u   ⊣u   ⤏u   ˝u   Ďu   ďu   Дu   дu   ⅆu   ⇊u   ⤑u   ⩷   °u   ∇u   Δu   δu   ⦱u   ⥿u   𝔇u   𝔡u   ⥥u   ⇃u   ⇂u   ˙`u   ˜u   ⋄u   ♦   ¨u   ϝu   ⋲   ÷u   ⋇u   Ђu   ђu   ⌞u   ⌍$u   𝔻u   𝕕u   ≐u   ≑u   ∸u   ∔u   ⊡u   ⇐u   ⇔u   ⟸u   ⟺u   ⟹u   ⇒u   ⊨u   ⇑u   ⇕u   ∥u   ⤓u   ⇵u   ⥐u   ⥞u   ↽u   ⥖u   ⥟u   ⇁u   ⥗u   ⊤u   ↧u   ⤐u   ⌟u   ⌌u   𝒟u   𝒹u   Ѕu   ѕu   ⧶u   Đu   đu   ⋱u   ▿u   ⥯u   ⦦u   Џu   џu   ⟿   É   éu   ⩮u   Ěu   ěu   ≖   Ê   êu   ≕u   Эu   эu   Ėu   ėu   ⅇu   ≒u   𝔈u   𝔢u   ⪚   È   èu   ⪖u   ⪘u   ⪙u   ∈u   ⏧u   ℓu   ⪕u   ⪗u   Ēu   ēu   ∅u   ◻u   ▫u    u    u    u   Ŋu   ŋu    u   Ęu   ęu   𝔼u   𝕖u   ⋕u   ⧣u   ⩱u   εu   Εu   ϵu   ≂u   ⩵=u   ≟u   ⇌u   ⩸u   ⧥u   ⥱u   ≓u   ℰu   ℯu   ⩳u   Ηu   η   Ð   ð   Ë   ëu   €!u   ∃u   Фu   фu   ♀u   ﬃu   ﬀu   ﬄu   𝔉u   𝔣u   ﬁu   ◼fju   ♭u   ﬂu   ▱u   ƒu   𝔽u   𝕗u   ∀u   ⋔u   ⫙u   ℱu   ⨍   ½u   ⅓   ¼u   ⅕u   ⅙u   ⅛u   ⅔u   ⅖   ¾u   ⅗u   ⅜u   ⅘u   ⅚u   ⅝u   ⅞u   ⁄u   ⌢u   𝒻u   ǵu   Γu   γu   Ϝu   ⪆u   Ğu   ğu   Ģu   Ĝu   ĝu   Гu   гu   Ġu   ġu   ≧u   ≥u   ⪌u   ⋛u   ⩾u   ⪩u   ⪀u   ⪂u   ⪄u   ⋛︀u   ⪔u   𝔊u   𝔤u   ⋙u   ≫u   ℷu   Ѓu   ѓu   ≷u   ⪥u   ⪒u   ⪤u   ⪊u   ≩u   ⪈u   ⋧u   𝔾u   𝕘u   ⪢u   ≳u   𝒢u   ℊu   ⪎u   ⪐>u   ⪧u   ⩺u   ⋗u   ⦕u   ⩼u   ⥸u   ≩︀u    u   ℋu   Ъu   ъu   ↔u   ⥈u   ↭^u   ℏu   Ĥu   ĥu   ♥u   …u   ⊹u   ℌu   𝔥u   ⤥u   ⤦u   ⇿u   ∻u   ↩u   ↪u   ℍu   𝕙u   ―u   𝒽u   Ħu   ħu   ⁃   Í   íu   ⁣   Î   îu   Иu   иu   İu   Еu   е   ¡u   ℑu   𝔦   Ì   ìu   ⅈu   ⨌u   ∭u   ⧜u   ℩u   Ĳu   ĳu   Īu   īu   ℐu   ıu   ⊷u   Ƶu   ℅u   ∞u   ⧝u   ∬u   ∫u   ⊺u   ℤu   ⨗u   ⨼u   ⁢u   Ёu   ёu   Įu   įu   𝕀u   𝕚u   Ιu   ι   ¿u   𝒾u   ⋵u   ⋹u   ⋴u   ⋳u   Ĩu   ĩu   Іu   і   Ï   ïu   Ĵu   ĵu   Йu   йu   𝔍u   𝔧u   ȷu   𝕁u   𝕛u   𝒥u   𝒿u   Јu   јu   Єu   єu   Κu   κu   ϰu   Ķu   ķu   Кu   кu   𝔎u   𝔨u   ĸu   Хu   хu   Ќu   ќu   𝕂u   𝕜u   𝒦u   𝓀u   ⇚u   Ĺu   ĺu   ⦴u   ℒu   Λu   λu   ⟪u   ⟨u   ⦑u   ⪅   «u   ↞u   ←u   ⇤u   ⤟u   ⤝u   ↫u   ⤹u   ⥳u   ↢u   ⪫u   ⤛u   ⤙u   ⪭u   ⪭︀u   ⤎u   ⤌u   ❲{[u   ⦋u   ⦏u   ⦍u   Ľu   ľu   Ļu   ļu   ⌈u   Лu   лu   ⤶u   “u   ⥧u   ⥋u   ↲u   ≦u   ≤u   ⇆u   ⟦u   ⥡u   ⥙u   ⌊u   ↼u   ⇇u   ⇋u   ⥎u   ↤u   ⥚u   ⋋u   ⊲u   ⧏u   ⊴u   ⥑u   ⥠u   ↿u   ⥘u   ⥒u   ⪋u   ⋚u   ⩽u   ⪨u   ⩿u   ⪁u   ⪃u   ⋚︀u   ⪓u   ⋖u   ≶u   ⪡u   ≲u   ⥼u   𝔏u   𝔩u   ⪑u   ⥢u   ⥪u   ▄u   Љu   љu   ⋘u   ≪u   ⥫u   ◺u   Ŀu   ŀu   ⎰u   ⪉u   ≨u   ⪇u   ⋦u   ⟬u   ⇽u   ⟵u   ⟷u   ⟼u   ⟶u   ↬u   ⦅u   𝕃u   𝕝u   ⨭u   ⨴u   ∗_u   ↙u   ↘u   ◊(u   ⦓u   ⥭u   ‎u   ⊿u   ‹u   𝓁u   ↰u   ⪍u   ⪏u   ‘u   ‚u   Łu   ł<u   ⪦u   ⩹u   ⋉u   ⥶u   ⩻u   ◃u   ⦖u   ⥊u   ⥦u   ≨︀   ¯u   ♂u   ✠u   ⤅u   ↦u   ↥u   ▮u   ⨩u   Мu   мu   —u   ∺u    u   ℳu   𝔐u   𝔪u   ℧   µu   ∣u   ⫰u   −u   ⨪u   ∓u   ⫛u   ⊧u   𝕄u   𝕞u   𝓂u   Μu   μu   ⊸u   Ńu   ńu   ∠⃒u   ≉u   ⩰̸u   ≋̸u   ŉu   ♮u   ℕ    u   ≎̸u   ≏̸u   ⩃u   Ňu   ňu   Ņu   ņu   ≇u   ⩭̸u   ⩂u   Нu   нu   –u   ≠u   ⤤u   ⇗u   ↗u   ≐̸u   ​u   ≢u   ⤨u   ≂̸
u   ∄u   𝔑u   𝔫u   ≧̸u   ≱u   ⩾̸u   ⋙̸u   ≵u   ≫⃒u   ≯u   ≫̸u   ⇎u   ↮u   ⫲u   ∋u   ⋼u   ⋺u   Њu   њu   ⇍u   ↚u   ‥u   ≦̸u   ≰u   ⩽̸u   ≮u   ⋘̸u   ≴u   ≪⃒u   ⋪u   ⋬u   ≪̸u   ∤u   ⁠u   𝕟u   ⫬   ¬u   ≭u   ∦u   ∉u   ≹u   ⋵̸u   ⋹̸u   ⋷u   ⋶u   ⧏̸u   ≸u   ⪢̸u   ⪡̸u   ∌u   ⋾u   ⋽u   ⊀u   ⪯̸u   ⋠u   ⋫u   ⧐̸u   ⋭u   ⊏̸u   ⋢u   ⊐̸u   ⋣u   ⊂⃒u   ⊈u   ⊁u   ⪰̸u   ⋡u   ≿̸u   ⊃⃒u   ⊉u   ≁u   ≄u   ⫽⃥u   ∂̸u   ⨔u   ⇏u   ↛u   ⤳̸u   ↝̸u   𝒩u   𝓃u   ⊄u   ⫅̸u   ⊅u   ⫆̸   Ñ   ñu   Νu   ν#u   №u    u   ≍⃒u   ⊯u   ⊮u   ⊭u   ⊬u   ≥⃒u   >⃒u   ⤄u   ⧞u   ⤂u   ≤⃒u   <⃒u   ⊴⃒u   ⤃u   ⊵⃒u   ∼⃒u   ⤣u   ⇖u   ↖u   ⤧   Ó   ó   Ô   ôu   Оu   оu   Őu   őu   ⨸u   ⦼u   Œu   œu   ⦿u   𝔒u   𝔬u   ˛   Ò   òu   ⧁u   ⦵u   Ωu   ⦾u   ⦻u   ‾u   ⧀u   Ōu   ōu   ωu   Οu   οu   ⦶u   𝕆u   𝕠u   ⦷u   ⦹u   ⩔u   ∨u   ⩝u   ℴ   ª   ºu   ⊶u   ⩖u   ⩗u   ⩛u   𝒪   Ø   øu   ⊘   Õ   õu   ⨷u   ⨶   Ö   öu   ⌽u   ⏞u   ⎴u   ⏜   ¶u   ⫳u   ⫽u   ∂u   Пu   пr9   .u   ‰u   ‱u   𝔓u   𝔭u   Φu   φu   ϕu   ☎u   Πu   πu   ϖu   ℎr   u   ⨣u   ⨢u   ⨥u   ⩲   ±u   ⨦u   ⨧u   ⨕u   ℙu   𝕡   £u   ⪻u   ≺u   ⪷u   ≼u   ⪳u   ⪯u   ≾u   ⪹u   ⪵u   ⋨u   ″u   ′u   ∏u   ⌮u   ⌒u   ⌓u   ∝u   ⊰u   𝒫u   𝓅u   Ψu   ψu    u   𝔔u   𝔮u   ℚu   𝕢u   ⁗u   𝒬u   𝓆u   ⨖?"u   ⇛u   ∽̱u   Ŕu   ŕu   √u   ⦳u   ⟫u   ⟩u   ⦒u   ⦥   »u   ↠u   →u   ⥵u   ⇥u   ⤠u   ⤳u   ⤞u   ⥅u   ⥴u   ⤖u   ↣u   ↝u   ⤜u   ⤚u   ∶u   ❳}]u   ⦌u   ⦎u   ⦐u   Řu   řu   Ŗu   ŗu   ⌉u   Рu   рu   ⤷u   ⥩u   ↳u   ℜu   ℛu   ℝu   ▭u   ⥽u   ⌋u   𝔯u   ⥤u   ⇀u   ⥬u   Ρu   ρu   ϱu   ⇄u   ⟧u   ⥝u   ⥕u   ⇉u   ⊢u   ⥛u   ⋌u   ⊳u   ⧐u   ⊵u   ⥏u   ⥜u   ↾u   ⥔u   ⥓u   ˚u   ‏u   ⎱u   ⫮u   ⟭u   ⇾u   ⦆u   𝕣u   ⨮u   ⨵u   ⥰)u   ⦔u   ⨒u   ›u   𝓇u   ↱u   ⋊u   ▹u   ⧎u   ⧴u   ⥨u   ℞u   Śu   śu   ⪼u   ≻u   ⪸u   Šu   šu   ≽u   ⪴u   ⪰u   Şu   şu   Ŝu   ŝu   ⪺u   ⪶u   ⋩u   ⨓u   ≿u   Сu   сu   ⋅u   ⩦u   ⇘   §;u   ⤩u   ✶u   𝔖u   𝔰u   ♯u   Щu   щu   Шu   шu   ↑   ­u   Σu   σu   ςu   ∼u   ⩪u   ≃u   ⪞u   ⪠u   ⪝u   ⪟u   ≆u   ⨤u   ⥲u   ⨳u   ⧤u   ⌣u   ⪪u   ⪬u   ⪬︀u   Ьu   ь/u   ⧄u   ⌿u   𝕊u   𝕤u   ♠u   ⊓u   ⊓︀u   ⊔u   ⊔︀u   ⊏u   ⊑u   ⊐u   ⊒u   □u   𝒮u   𝓈u   ⋆u   ☆u   ⋐u   ⊂u   ⪽u   ⫅u   ⊆u   ⫃u   ⫁u   ⫋u   ⊊u   ⪿u   ⥹u   ⫇u   ⫕u   ⫓u   ∑u   ♪u   ⋑u   ⊃   ¹   ²   ³u   ⪾u   ⫘u   ⫆u   ⊇u   ⫄u   ⟉u   ⫗u   ⥻u   ⫂u   ⫌u   ⊋u   ⫀u   ⫈u   ⫔u   ⫖u   ⇙u   ⤪   ß	u   ⌖u   Τu   τu   Ťu   ťu   Ţu   ţu   Тu   тu   ⌕u   𝔗u   𝔱u   ∴u   Θu   θu   ϑu     u       Þ   þ   ×u   ⨱u   ⨰u   ⌶u   ⫱u   𝕋u   𝕥u   ⫚u   ‴u   ™u   ▵u   ≜u   ◬u   ⨺u   ⨹u   ⧍u   ⨻u   ⏢u   𝒯u   𝓉u   Цu   цu   Ћu   ћu   Ŧu   ŧ   Ú   úu   ↟u   ⥉u   Ўu   ўu   Ŭu   ŭ   Û   ûu   Уu   уu   ⇅u   Űu   űu   ⥮u   ⥾u   𝔘u   𝔲   Ù   ùu   ⥣u   ▀u   ⌜u   ⌏u   ◸u   Ūu   ūu   ⏟u   ⏝u   ⊎u   Ųu   ųu   𝕌u   𝕦u   ⤒u   ↕u   ϒu   υu   Υu   ⇈u   ⌝u   ⌎u   Ůu   ůu   ◹u   𝒰u   𝓊u   ⋰u   Ũu   ũ   Ü   üu   ⦧u   ⦜u   ⊊︀u   ⫋︀u   ⊋︀u   ⫌︀u   ⫫u   ⫨u   ⫩u   Вu   вu   ⊫u   ⊩u   ⫦u   ⊻u   ≚u   ⋮u   ‖|u   ❘u   ≀u   𝔙u   𝔳u   𝕍u   𝕧u   𝒱u   𝓋u   ⊪u   ⦚u   Ŵu   ŵu   ⩟u   ≙u   ℘u   𝔚u   𝔴u   𝕎u   𝕨u   𝒲u   𝓌u   𝔛u   𝔵u   Ξu   ξu   ⋻u   𝕏u   𝕩u   𝒳u   𝓍   Ý   ýu   Яu   яu   Ŷu   ŷu   Ыu   ы   ¥u   𝔜u   𝔶u   Їu   їu   𝕐u   𝕪u   𝒴u   𝓎u   Юu   юu   Ÿ   ÿu   Źu   źu   Žu   žu   Зu   зu   Żu   żu   ℨu   Ζu   ζu   𝔷u   Жu   жu   ⇝u   𝕫u   𝒵u   𝓏u   ‍u   ‌(I  AacuteaacuteZAbreveZabreveacZacdZacEAcircacircacuteZAcyZacyAEligaeligafZAfrZafrAgraveagravealefsymZalephAlphaalphaZAmacrZamacrZamalgAMPampAndandZandandZanddZandslopeZandvangZangeZangleZangmsdZangmsdaaZangmsdabZangmsdacZangmsdadZangmsdaeZangmsdafZangmsdagZangmsdahZangrtZangrtvbZangrtvbdZangsphZangstZangzarrZAogonZaogonZAopfZaopfZapZapacirZapEZapeZapidZaposZApplyFunctionZapproxZapproxeqAringaringZAscrZascrZAssignastasympZasympeqAtildeatildeAumlaumlZawconintZawintZbackcongZbackepsilonZ	backprimeZbacksimZ	backsimeqZ	BackslashZBarvZbarveeZBarwedZbarwedZbarwedgeZbbrkZbbrktbrkZbcongZBcyZbcybdquoZbecausZBecauseZbecauseZbemptyvZbepsiZbernouZ
BernoullisBetabetaZbethZbetweenZBfrZbfrZbigcapZbigcircZbigcupZbigodotZbigoplusZ	bigotimesZbigsqcupZbigstarZbigtriangledownZbigtriangleupZbiguplusZbigveeZbigwedgeZbkarowZblacklozengeZblacksquareZblacktriangleZblacktriangledownZblacktriangleleftZblacktrianglerightZblankZblk12Zblk14Zblk34blockZbneZbnequivZbNotZbnotZBopfZbopfZbotrp   ZbowtieZboxboxZboxDLZboxDlZboxdLZboxdlZboxDRZboxDrZboxdRZboxdrZboxHZboxhZboxHDZboxHdZboxhDZboxhdZboxHUZboxHuZboxhUZboxhuZboxminusZboxplusZboxtimesZboxULZboxUlZboxuLZboxulZboxURZboxUrZboxuRZboxurZboxVZboxvZboxVHZboxVhZboxvHZboxvhZboxVLZboxVlZboxvLZboxvlZboxVRZboxVrZboxvRZboxvrZbprimeZBreveZbrevebrvbarZBscrZbscrZbsemiZbsimZbsimeZbsolZbsolbZbsolhsubbullbulletZbumpZbumpEZbumpeZBumpeqZbumpeqZCacuteZcacuteZCapcapZcapandZcapbrcupZcapcapZcapcupZcapdotZCapitalDifferentialDZcapsZcaretZcaronZCayleysZccapsZCcaronZccaronCcedilccedilZCcircZccircZCconintZccupsZccupssmZCdotZcdotcedilZCedillaZcemptyvcentZ	CenterDotZ	centerdotZCfrZcfrZCHcyZchcycheckZ	checkmarkChichiZcircircZcirceqZcirclearrowleftZcirclearrowrightZ
circledastZcircledcircZcircleddashZ	CircleDotZcircledRZcircledSZCircleMinusZ
CirclePlusZCircleTimesZcirEZcireZcirfnintZcirmidZcirscirZClockwiseContourIntegralZCloseCurlyDoubleQuoteZCloseCurlyQuoteclubsZclubsuitZColoncolonZColoneZcoloneZcoloneqcommaZcommatcompZcompfnZ
complementZ	complexescongZcongdotZ	CongruentZConintZconintZContourIntegralZCopfZcopfZcoprodZ	CoproductCOPYcopyZcopysrZCounterClockwiseContourIntegralcrarrZCrossZcrossZCscrZcscrZcsubZcsubeZcsupZcsupeZctdotZcudarrlZcudarrrZcueprZcuescZcularrZcularrpZCupcupZcupbrcapZCupCapZcupcapZcupcupZcupdotZcuporZcupsZcurarrZcurarrmZcurlyeqprecZcurlyeqsuccZcurlyveeZ
curlywedgecurrenZcurvearrowleftZcurvearrowrightZcuveeZcuwedZcwconintZcwintZcylctyDaggerdaggerZdalethZDarrdArrdarrZdashZDashvZdashvZdbkarowZdblacZDcaronZdcaronZDcyZdcyZDDddZddaggerZddarrZDDotrahdZddotseqdegZDelDeltadeltaZdemptyvZdfishtZDfrZdfrZdHarZdharlZdharrZDiacriticalAcuteZDiacriticalDotZDiacriticalDoubleAcuteZDiacriticalGraveZDiacriticalTildeZdiamZDiamondZdiamondZdiamondsuitdiamsZdieZDifferentialDZdigammaZdisindivdivideZdivideontimesZdivonxZDJcyZdjcyZdlcornZdlcropdollarZDopfZdopfZDotdotZdoteqZdoteqdotZDotEqualZdotminusZdotplusZ	dotsquareZdoublebarwedgeZDoubleContourIntegralZ	DoubleDotZDoubleDownArrowZDoubleLeftArrowZDoubleLeftRightArrowZDoubleLeftTeeZDoubleLongLeftArrowZDoubleLongLeftRightArrowZDoubleLongRightArrowZDoubleRightArrowZDoubleRightTeeZDoubleUpArrowZDoubleUpDownArrowZDoubleVerticalBarZ	DownArrowZ	DownarrowZ	downarrowZDownArrowBarZDownArrowUpArrowZdowndownarrowsZdownharpoonleftZdownharpoonrightZDownLeftRightVectorZDownLeftTeeVectorZDownLeftVectorZDownLeftVectorBarZDownRightTeeVectorZDownRightVectorZDownRightVectorBarZDownTeeZDownTeeArrowZdrbkarowZdrcornZdrcropZDscrZdscrZDScyZdscyZdsolZDstrokZdstrokZdtdotZdtriZdtrifZduarrZduharZdwangleZDZcyZdzcyZdzigrarrEacuteeacuteZeasterZEcaronZecaronZecirEcircecircZecolonZEcyZecyZeDDotZEdotZeDotZedoteeZefDotZEfrZefrZegEgraveegraveZegsZegsdotelElementZelintersZellZelsZelsdotZEmacrZemacremptyZemptysetZEmptySmallSquareZemptyvZEmptyVerySmallSquareemspZemsp13Zemsp14ZENGZengenspZEogonZeogonZEopfZeopfZeparZeparslZeplusZepsiEpsilonepsilonZepsivZeqcircZeqcolonZeqsimZ
eqslantgtrZeqslantlessZEqualequalsZ
EqualTildeZequestZEquilibriumequivZequivDDZeqvparslZerarrZerDotZEscrZescrZesdotZEsimZesimEtaetaETHethEumleumleuroZexclexistZExistsZexpectationZExponentialEZexponentialeZfallingdotseqZFcyZfcyZfemaleZffiligZffligZfflligZFfrZffrZfiligZFilledSmallSquareZFilledVerySmallSquareZfjligZflatZflligZfltnsfnofZFopfZfopfZForAllforallforkZforkvZ
FouriertrfZfpartintfrac12Zfrac13frac14Zfrac15Zfrac16Zfrac18Zfrac23Zfrac25frac34Zfrac35Zfrac38Zfrac45Zfrac56Zfrac58Zfrac78fraslZfrownZFscrZfscrZgacuteGammagammaZGammadZgammadr   ZGbreveZgbreveZGcedilZGcircZgcircZGcyZgcyZGdotZgdotZgEgeZgElZgelZgeqZgeqqZgeqslantZgesZgesccZgesdotZgesdotoZgesdotolZgeslZgeslesZGfrZgfrZGgZggZgggZgimelZGJcyZgjcyglZglaZglEZgljZgnapZgnapproxZgnEZgneZgneqZgneqqZgnsimZGopfZgopfZgraveZGreaterEqualZGreaterEqualLessZGreaterFullEqualZGreaterGreaterZGreaterLessZGreaterSlantEqualZGreaterTildeZGscrZgscrZgsimZgsimeZgsimlGTZGtgtZgtccZgtcirZgtdotZgtlParZgtquestZ	gtrapproxZgtrarrZgtrdotZ	gtreqlessZ
gtreqqlessZgtrlessZgtrsimZ	gvertneqqZgvnEZHacekZhairspZhalfZhamiltZHARDcyZhardcyhArrharrZharrcirZharrwZHatZhbarZHcircZhcircheartsZ	heartsuithellipZherconZHfrZhfrZHilbertSpaceZhksearowZhkswarowZhoarrZhomthtZhookleftarrowZhookrightarrowZHopfZhopfZhorbarZHorizontalLineZHscrZhscrZhslashZHstrokZhstrokZHumpDownHumpZ	HumpEqualZhybullZhyphenIacuteiacuteZicIcircicircZIcyZicyZIdotZIEcyZiecyiexclZiffZIfrZifrIgraveigraveiiZiiiintZiiintZiinfinZiiotaZIJligZijligZImZImacrZimacrimageZ
ImaginaryIZimaglineZimagpartZimathZimofZimpedZImpliesr(   ZincareinfinZinfintieZinodotZIntr   ZintcalZintegersIntegralZintercalZIntersectionZintlarhkZintprodZInvisibleCommaZInvisibleTimesZIOcyZiocyZIogonZiogonZIopfZiopfIotaiotaZiprodiquestZIscrZiscrisinZisindotZisinEZisinsZisinsvZisinvitZItildeZitildeZIukcyZiukcyIumliumlZJcircZjcircZJcyZjcyZJfrZjfrZjmathZJopfZjopfZJscrZjscrZJsercyZjsercyZJukcyZjukcyKappakappaZkappavZKcedilZkcedilZKcyZkcyZKfrZkfrZkgreenZKHcyZkhcyZKJcyZkjcyZKopfZkopfZKscrZkscrZlAarrZLacuteZlacuteZlaemptyvZlagranLambdalambdaZLanglangZlangdZlangleZlapZ
LaplacetrflaquoZLarrlArrlarrZlarrbZlarrbfsZlarrfsZlarrhkZlarrlpZlarrplZlarrsimZlarrtlZlatZlAtailZlatailZlateZlatesZlBarrZlbarrZlbbrkZlbraceZlbrackZlbrkeZlbrksldZlbrksluZLcaronZlcaronZLcedilZlcedillceilZlcubZLcyZlcyZldcaldquoZldquorZldrdharZldrusharZldshZlEleZLeftAngleBracketZ	LeftArrowZ	LeftarrowZ	leftarrowZLeftArrowBarZLeftArrowRightArrowZleftarrowtailZLeftCeilingZLeftDoubleBracketZLeftDownTeeVectorZLeftDownVectorZLeftDownVectorBarZ	LeftFloorZleftharpoondownZleftharpoonupZleftleftarrowsZLeftRightArrowZLeftrightarrowZleftrightarrowZleftrightarrowsZleftrightharpoonsZleftrightsquigarrowZLeftRightVectorZLeftTeeZLeftTeeArrowZLeftTeeVectorZleftthreetimesZLeftTriangleZLeftTriangleBarZLeftTriangleEqualZLeftUpDownVectorZLeftUpTeeVectorZLeftUpVectorZLeftUpVectorBarZ
LeftVectorZLeftVectorBarZlEgZlegZleqZleqqZleqslantZlesZlesccZlesdotZlesdotoZlesdotorZlesgZlesgesZ
lessapproxZlessdotZ	lesseqgtrZ
lesseqqgtrZLessEqualGreaterZLessFullEqualZLessGreaterZlessgtrZLessLessZlesssimZLessSlantEqualZ	LessTildeZlfishtlfloorZLfrZlfrZlgZlgEZlHarZlhardZlharuZlharulZlhblkZLJcyZljcyZLlZllZllarrZllcornerZ
LleftarrowZllhardZlltriZLmidotZlmidotZlmoustZ
lmoustacheZlnapZlnapproxZlnEZlneZlneqZlneqqZlnsimZloangZloarrZlobrkZLongLeftArrowZLongleftarrowZlongleftarrowZLongLeftRightArrowZLongleftrightarrowZlongleftrightarrowZ
longmapstoZLongRightArrowZLongrightarrowZlongrightarrowZlooparrowleftZlooparrowrightZloparZLopfZlopfZloplusZlotimeslowastZlowbarZLowerLeftArrowZLowerRightArrowlozZlozengeZlozflparZlparltZlrarrZlrcornerZlrharZlrhardlrmZlrtrilsaquoZLscrZlscrZLshZlshZlsimZlsimeZlsimgZlsqblsquoZlsquorZLstrokZlstrokLTZLtltZltccZltcirZltdotZlthreeZltimesZltlarrZltquestZltriZltrieZltrifZltrParZlurdsharZluruharZ	lvertneqqZlvnEmacrZmaleZmaltZmalteseZMapmapZmapstoZ
mapstodownZ
mapstoleftZmapstoupmarkerZmcommaZMcyZmcymdashZmDDotZmeasuredangleZMediumSpaceZ	MellintrfZMfrZmfrZmhomicroZmidZmidastZmidcirmiddotminusZminusbZminusdZminusduZ	MinusPlusZmlcpZmldrZmnplusmodelsZMopfZmopfmpZMscrZmscrZmstposMumuZmultimapZmumapnablaZNacuteZnacuteZnangZnapZnapEZnapidZnaposZnapproxZnaturZnaturalZnaturalsnbspZnbumpZnbumpeZncapZNcaronZncaronZNcedilZncedilZncongZncongdotZncupZNcyZncyndashneZnearhkZneArrZnearrZnearrowZnedotZNegativeMediumSpaceZNegativeThickSpaceZNegativeThinSpaceZNegativeVeryThinSpaceZnequivZnesearZnesimZNestedGreaterGreaterZNestedLessLessZNewLineZnexistZnexistsZNfrZnfrZngEZngeZngeqZngeqqZ	ngeqslantZngesZnGgZngsimZnGtZngtZngtrZnGtvZnhArrZnharrZnhparniZnisZnisdZnivZNJcyZnjcyZnlArrZnlarrZnldrZnlEZnleZ
nLeftarrowZ
nleftarrowZnLeftrightarrowZnleftrightarrowZnleqZnleqqZ	nleqslantZnlesZnlessZnLlZnlsimZnLtZnltZnltriZnltrieZnLtvZnmidZNoBreakZNonBreakingSpaceZNopfZnopfZNotnotZNotCongruentZ	NotCupCapZNotDoubleVerticalBarZ
NotElementZNotEqualZNotEqualTildeZ	NotExistsZ
NotGreaterZNotGreaterEqualZNotGreaterFullEqualZNotGreaterGreaterZNotGreaterLessZNotGreaterSlantEqualZNotGreaterTildeZNotHumpDownHumpZNotHumpEqualnotinZnotindotZnotinEZnotinvaZnotinvbZnotinvcZNotLeftTriangleZNotLeftTriangleBarZNotLeftTriangleEqualZNotLessZNotLessEqualZNotLessGreaterZNotLessLessZNotLessSlantEqualZNotLessTildeZNotNestedGreaterGreaterZNotNestedLessLessZnotniZnotnivaZnotnivbZnotnivcZNotPrecedesZNotPrecedesEqualZNotPrecedesSlantEqualZNotReverseElementZNotRightTriangleZNotRightTriangleBarZNotRightTriangleEqualZNotSquareSubsetZNotSquareSubsetEqualZNotSquareSupersetZNotSquareSupersetEqualZ	NotSubsetZNotSubsetEqualZNotSucceedsZNotSucceedsEqualZNotSucceedsSlantEqualZNotSucceedsTildeZNotSupersetZNotSupersetEqualZNotTildeZNotTildeEqualZNotTildeFullEqualZNotTildeTildeZNotVerticalBarZnparZ	nparallelZnparslZnpartZnpolintZnprZnprcueZnpreZnprecZnpreceqZnrArrZnrarrZnrarrcZnrarrwZnRightarrowZnrightarrowZnrtriZnrtrieZnscZnsccueZnsceZNscrZnscrZ	nshortmidZnshortparallelZnsimZnsimeZnsimeqZnsmidZnsparZnsqsubeZnsqsupensubZnsubEZnsubeZnsubsetZ	nsubseteqZ
nsubseteqqZnsuccZnsucceqZnsupZnsupEZnsupeZnsupsetZ	nsupseteqZ
nsupseteqqZntglNtildentildeZntlgZntriangleleftZntrianglelefteqZntrianglerightZntrianglerighteqNununumZnumeroZnumspZnvapZnVDashZnVdashZnvDashZnvdashZnvgeZnvgtZnvHarrZnvinfinZnvlArrZnvleZnvltZnvltrieZnvrArrZnvrtrieZnvsimZnwarhkZnwArrZnwarrZnwarrowZnwnearOacuteoacuteZoastZocirOcircocircZOcyZocyZodashZOdblacZodblacZodivZodotZodsoldOEligoeligZofcirZOfrZofrZogonOgraveograveZogtZohbarZohmZointZolarrZolcirZolcrossolineZoltZOmacrZomacrOmegaomegaOmicronomicronZomidZominusZOopfZoopfZoparZOpenCurlyDoubleQuoteZOpenCurlyQuoteZoperpoplusOrorZorarrordorderZorderofordfordmZorigofZororZorslopeZorvZoSZOscrZoscrOslashoslashZosolOtildeotildeZOtimesotimesZotimesasOumloumlZovbarZOverBarZ	OverBraceZOverBracketZOverParenthesisparr   parallelZparsimZparslpartZPartialDZPcyZpcyZpercntZperiodpermilperpZpertenkZPfrZpfrPhiphiZphivZphmmatZphonePipiZ	pitchforkpivZplanckZplanckhZplankvplusZplusacirZplusbZpluscirZplusdoZplusduZpluseZ	PlusMinusplusmnZplussimZplustwoZpmZPoincareplaneZpointintZPopfZpopfpoundZPrprZprapZprcueZprEpreprecZ
precapproxZpreccurlyeqZPrecedesZPrecedesEqualZPrecedesSlantEqualZPrecedesTildeZpreceqZprecnapproxZprecneqqZprecnsimZprecsimPrimeprimeZprimesZprnapZprnEZprnsimprodZProductZprofalarZproflineZprofsurfpropZ
ProportionZProportionalZproptoZprsimZprurelZPscrZpscrPsipsiZpuncspZQfrZqfrZqintZQopfZqopfZqprimeZQscrZqscrZquaternionsZquatintZquestZquesteqQUOTquotZrAarrZraceZRacuteZracuteradicZraemptyvZRangrangZrangdrangeZrangleraquoZRarrrArrrarrZrarrapZrarrbZrarrbfsZrarrcZrarrfsZrarrhkZrarrlpZrarrplZrarrsimZRarrtlZrarrtlZrarrwZrAtailZratailZratioZ	rationalsZRBarrZrBarrZrbarrZrbbrkrbraceZrbrackZrbrkeZrbrksldZrbrksluZRcaronZrcaronZRcedilZrcedilrceilZrcubZRcyZrcyZrdcaZrdldharrdquoZrdquorZrdshZRerealZrealineZrealpartZrealsZrectREGregZReverseElementZReverseEquilibriumZReverseUpEquilibriumZrfishtrfloorZRfrZrfrZrHarZrhardZrharuZrharulRhorhoZrhovZRightAngleBracketZ
RightArrowZ
RightarrowZ
rightarrowZRightArrowBarZRightArrowLeftArrowZrightarrowtailZRightCeilingZRightDoubleBracketZRightDownTeeVectorZRightDownVectorZRightDownVectorBarZ
RightFloorZrightharpoondownZrightharpoonupZrightleftarrowsZrightleftharpoonsZrightrightarrowsZrightsquigarrowZRightTeeZRightTeeArrowZRightTeeVectorZrightthreetimesZRightTriangleZRightTriangleBarZRightTriangleEqualZRightUpDownVectorZRightUpTeeVectorZRightUpVectorZRightUpVectorBarZRightVectorZRightVectorBarZringZrisingdotseqZrlarrZrlharrlmZrmoustZ
rmoustacheZrnmidZroangZroarrZrobrkZroparZRopfZropfZroplusZrotimesZRoundImpliesrparZrpargtZrppolintZrrarrZRrightarrowrsaquoZRscrZrscrZRshZrshZrsqbrsquoZrsquorZrthreeZrtimesZrtriZrtrieZrtrifZrtriltriZRuleDelayedZruluharrxZSacuteZsacutesbquoZScZscZscapScaronscaronZsccueZscEZsceZScedilZscedilZScircZscircZscnapZscnEZscnsimZscpolintZscsimZScyZscysdotZsdotbZsdoteZsearhkZseArrZsearrZsearrowsectsemiZseswarZsetminusZsetmnZsextZSfrZsfrZsfrownZsharpZSHCHcyZshchcyZSHcyZshcyZShortDownArrowZShortLeftArrowZshortmidZshortparallelZShortRightArrowZShortUpArrowshySigmasigmasigmafZsigmavsimZsimdotZsimeZsimeqZsimgZsimgEZsimlZsimlEZsimneZsimplusZsimrarrZslarrZSmallCircleZsmallsetminusZsmashpZsmeparslZsmidZsmileZsmtZsmteZsmtesZSOFTcyZsoftcyZsolZsolbZsolbarZSopfZsopfspadesZ	spadesuitZsparZsqcapZsqcapsZsqcupZsqcupsZSqrtZsqsubZsqsubeZsqsubsetZ
sqsubseteqZsqsupZsqsupeZsqsupsetZ
sqsupseteqZsquZSquareZsquareZSquareIntersectionZSquareSubsetZSquareSubsetEqualZSquareSupersetZSquareSupersetEqualZSquareUnionZsquarfZsqufZsrarrZSscrZsscrZssetmnZssmileZsstarfZStarZstarZstarfZstraightepsilonZstraightphiZstrnsZSubrl   ZsubdotZsubEsubeZsubedotZsubmultZsubnEZsubneZsubplusZsubrarrZSubsetZsubsetZsubseteqZ	subseteqqZSubsetEqualZ	subsetneqZ
subsetneqqZsubsimZsubsubZsubsupsuccZ
succapproxZsucccurlyeqZSucceedsZSucceedsEqualZSucceedsSlantEqualZSucceedsTildeZsucceqZsuccnapproxZsuccneqqZsuccnsimZsuccsimZSuchThatZSumsumZsungZSupsupsup1sup2sup3ZsupdotZsupdsubZsupEsupeZsupedotZSupersetZSupersetEqualZsuphsolZsuphsubZsuplarrZsupmultZsupnEZsupneZsupplusZSupsetZsupsetZsupseteqZ	supseteqqZ	supsetneqZ
supsetneqqZsupsimZsupsubZsupsupZswarhkZswArrZswarrZswarrowZswnwarszligZTabr   TautauZtbrkZTcaronZtcaronZTcedilZtcedilZTcyZtcyZtelrecZTfrZtfrthere4Z	ThereforeZ	thereforeThetathetathetasymZthetavZthickapproxZthicksimZ
ThickSpacethinspZ	ThinSpaceZthkapZthksimTHORNthornZTildetildeZ
TildeEqualZTildeFullEqualZ
TildeTildetimesZtimesbZtimesbarZtimesdZtintZtoearn   ZtopbotZtopcirZTopfZtopfZtopforkZtosaZtprimeZTRADEtradeZtriangleZtriangledownZtriangleleftZtrianglelefteqZ	triangleqZtrianglerightZtrianglerighteqZtridotZtrieZtriminusZtriplusZtrisbZtritimeZtrpeziumZTscrZtscrZTScyZtscyZTSHcyZtshcyZTstrokZtstrokZtwixtZtwoheadleftarrowZtwoheadrightarrowUacuteuacuteZUarruArruarrZUarrocirZUbrcyZubrcyZUbreveZubreveUcircucircZUcyZucyZudarrZUdblacZudblacZudharZufishtZUfrZufrUgraveugraveZuHarZuharlZuharrZuhblkZulcornZulcornerZulcropZultriZUmacrZumacrumlZUnderBarZ
UnderBraceZUnderBracketZUnderParenthesisUnionZ	UnionPlusZUogonZuogonZUopfZuopfZUpArrowZUparrowZuparrowZ
UpArrowBarZUpArrowDownArrowZUpDownArrowZUpdownarrowZupdownarrowZUpEquilibriumZupharpoonleftZupharpoonrightZuplusZUpperLeftArrowZUpperRightArrowZUpsiZupsiupsihUpsilonupsilonZUpTeeZ
UpTeeArrowZ
upuparrowsZurcornZurcornerZurcropZUringZuringZurtriZUscrZuscrZutdotZUtildeZutildeZutriZutrifZuuarrUumluumlZuwangleZvangrtZ
varepsilonZvarkappaZ
varnothingZvarphiZvarpiZ	varproptoZvArrZvarrZvarrhoZvarsigmaZvarsubsetneqZvarsubsetneqqZvarsupsetneqZvarsupsetneqqZvarthetaZvartriangleleftZvartrianglerightZVbarZvBarZvBarvZVcyZvcyZVDashZVdashZvDashZvdashZVdashlZVeeZveeZveebarZveeeqZvellipZVerbarZverbarZVertZvertZVerticalBarZVerticalLineZVerticalSeparatorZVerticalTildeZVeryThinSpaceZVfrZvfrZvltriZvnsubZvnsupZVopfZvopfZvpropZvrtriZVscrZvscrZvsubnEZvsubneZvsupnEZvsupneZVvdashZvzigzagZWcircZwcircZwedbarZWedgeZwedgeZwedgeqweierpZWfrZwfrZWopfZwopfZwpwrZwreathZWscrZwscrZxcapZxcircZxcupZxdtriZXfrZxfrZxhArrZxharrXixiZxlArrZxlarrZxmapZxnisZxodotZXopfZxopfZxoplusZxotimeZxrArrZxrarrZXscrZxscrZxsqcupZxuplusZxutriZxveeZxwedgeYacuteyacuteZYAcyZyacyZYcircZycircZYcyZycyyenZYfrZyfrZYIcyZyicyZYopfZyopfZYscrZyscrZYUcyZyucyYumlyumlZZacuteZzacuteZZcaronZzcaronZZcyZzcyZZdotZzdotZzeetrfZZeroWidthSpaceZetazetaZZfrZzfrZZHcyZzhcyZzigrarrZZopfZzopfZZscrZzscrzwjzwnjc                 C   s   g | ]\}}|t |fqS r$   )chr).0r   rC   r$   r$   r%   
<listcomp>	  s     ro  c                   @   s   e Zd ZdZdS )r   zclass ParaFrag contains the intermediate representation of string
    segments as they are being parsed by the ParaParser.
    fontname, fontSize, rise, textColor, cbDefn
    N)rK   rL   rM   r`   r$   r$   r$   r%   r   	  s   r   c                 C   s   t sddlm} dd l}|tdd}tddD ]}d ||< q2||jd d  i a | D ]&\}}|srd}nt	|}|t t	|< q`d
tt j| S )Nr   )	RL_Codecs       symbol rb   )_greek2Utf8Zreportlab.pdfbase.rl_codecsrp  codecsmake_identity_dictr  updateZ_RL_Codecs__rl_codecs_datar   rm  joinr  __getitem__)datarp  rv  dmr   rC   ur$   r$   r%   _greekConvert	  s    
r~  c                   @   s  e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-d. ZeZeZd/d0 Zd1d2 Zd3d4 Zd5d6 Zd7d8 Z d9d: Z!d;d< Z"d=d> Z#d?d@ Z$dAdB Z%dCdD Z&dEdF Z'dGdH Z(dIdJ Z)dKdL Z*dMdN Z+dOdP Z,ddRdSZ-dTdU Z.dVdW Z/dXdY Z0dZd[ Z1d\d] Z2d^d_ Z3d`da Z4dbdc Z5ddde Z6e5Z7dfdg Z8e5Z9e2Z:e3Z;e4Z<e5Z=e6Z>e7Z?e8Z@e9ZAdhdi ZBdjdk ZCdldm ZDeDZEeC ZFZGdndo ZHeCZIdpdq ZJeCZKdrds ZLdtdu ZMdvdw ZNddzd{ZOd|d} ZPd~d ZQdd ZRdd ZSdd ZTdd ZUdd ZVdd ZWdd ZXdd ZYdd ZZdd Z[dd Z\dd Z]dS )r   c                 C   sH   ||  kr<|dkr<| js<|ds.|dr<t| |  S t|dS )zCThis way we can handle <TAG> the same way as <tag> (ignoring case).caseSensitivestart_end_N)r7   r  
startswithrO   AttributeError)rD   attrNamer$   r$   r%   __getattr__
  s    zParaParser.__getattr__c                 C   s   | j ddd d S )Nbr   bold_pushrD   
attributesr$   r$   r%   start_b"
  s    zParaParser.start_bc                 C   s   |  d d S )Nr  _poprD   r$   r$   r%   end_b%
  s    zParaParser.end_bc                 C   s   | j ddd d S )Nstrongr   r  r  r  r$   r$   r%   start_strong(
  s    zParaParser.start_strongc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   
end_strong+
  s    zParaParser.end_strongc                 C   s   | j ddd d S )Nr'   r   italicr  r  r$   r$   r%   start_i/
  s    zParaParser.start_ic                 C   s   |  d d S )Nr'   r  r  r$   r$   r%   end_i2
  s    zParaParser.end_ic                 C   s   | j ddd d S )Nemr   r  r  r  r$   r$   r%   start_em5
  s    zParaParser.start_emc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   end_em8
  s    zParaParser.end_emc                 C   s   | j d }|j| j|t||d | j| t||d | j| t||d | j| |jtt||d d t||d | j	| fg |_|  jd7  _d S )	Nr:   ZColorZWidthZOffsetZKindrf   ZGapr   )
rc   us_linesnlinesrO   _defaultLineColors_defaultLineWidths_defaultLineOffsetsr   _lineRepeats_defaultLineGaps)rD   r   rS   r$   r$   r%   	_new_line;
  s    


zParaParser._new_linec                 C   s&   |  |t}| jd| | d d S )Nr}  r   )r}  )getAttributes	_uAttrMapr  r  rD   r  Ar$   r$   r%   start_uJ
  s    zParaParser.start_uc                 C   s   |  d d S )Nr}  r  r  r$   r$   r%   end_uO
  s    zParaParser.end_uc                 C   s.   |  |t}| jdddi| | d d S )Nr   r   )r   )r  _strikeAttrMapr  r  r  r$   r$   r%   start_strikeS
  s    zParaParser.start_strikec                 C   s   |  d d S )Nr   r  r  r$   r$   r%   
end_strikeX
  s    zParaParser.end_strikec                 C   sp   |  |t}|d| j}| jd j| j|dd fg |d< |  jd7  _| j|f| |rl| 	d d S )Nr   r:   r   rb   r   )
r  _linkAttrMappop_defaultLinkUnderlinerc   r   nlinksrj   r  r  )rD   rX   r  r  r   r$   r$   r%   _handle_link\
  s    
zParaParser._handle_linkc                 C   s   |  d| d S )Nr   )r  r  r$   r$   r%   
start_linkh
  s    zParaParser.start_linkc                 C   s   |  djd krtdd S )Nr   z<link> has no target or href)r  r   r   r  r$   r$   r%   end_linkk
  s    zParaParser.end_linkc                 C   s   d|k}|rt|  |t}|dd }| }|s:| d t|dkr^| d t|d d}d|d< | jd	| n| d| d S )
Nr   z6<a name="..."/> anchor variant requires non-blank namer   z9<a name="..."/> anchor variant only allows name attribute)r   r   _selfClosingTaga)r  )	r  _anchorAttrMapgetrj   _syntax_errorlendictr  r  )rD   r  r   r  r   r$   r$   r%   start_ap
  s    

zParaParser.start_ac                 C   s   | j d }t|dd}|rn|dkr(|js0tdt  }|_d |_|_|j|_|`|`| 	d | 
d n| 
djd krtdd S )Nr:   r  rb   r   zParser failure in <a/>r  z<link> has no href)rc   rO   r   r   r   cbDefnlabelr   r  handle_datar  r   )rD   rS   Zsctdefnr$   r$   r%   end_a
  s    

zParaParser.end_ac                 C   s8   |  |t}|ds | d d|d< | jd| d S )Nr   z<img> needs src attributeimgr  )r  )r  _imgAttrMapr  r  r  r  r$   r$   r%   	start_img
  s
    

zParaParser.start_imgc                 C   s   | j d }t|ddstdt  }|_d|_t|dd |_t|j|_|j	 }t|d|d |_
t|d	|d
 |_t|dd|_|`| d | d d S )Nr:   r  rb   zParser failure in <img/>r  r   r   r   r   r   r   rp   )rc   rO   r   r   r  r   r   r   r  ZgetSizer   r   r   r  r  r  )rD   rS   r  r   r$   r$   r%   end_img
  s    


zParaParser.end_imgc                 C   sb   |  |t}| jd| | jd }| jt|d|jt 7  _t|d|jtt	d|j  |_d S )Nrm   r:   r   r   皙?)rm   )
r  _supAttrMapr  rc   r   rV   rR   supFractionrs   	sizeDeltarD   r  r  rS   r$   r$   r%   start_super
  s
    
zParaParser.start_superc                 C   s   |  d d S )Nrm   r  r  r$   r$   r%   	end_super
  s    zParaParser.end_superc                 C   sb   |  |t}| jd| | jd }| jt|d|jt 8  _t|d|jtt	d|j  |_d S )Nrl   r:   r   r   r  )rl   )
r  r  r  rc   r   rV   rR   subFractionrs   r  r  r$   r$   r%   	start_sub
  s
    
zParaParser.start_subc                 C   s   |  d d S )Nrl   r  r  r$   r$   r%   end_sub
  s    zParaParser.end_subc                 C   s   |  |i  | jddd d S )NnobrT)r  )r  r  )rD   attrsr$   r$   r%   
start_nobr
  s    zParaParser.start_nobrc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   end_nobr
  s    zParaParser.end_nobrc                 C   s`   z,|d dkr"t |dd  d}nt |}W n  tk
rL   | | Y d S X | t| d S )Nr   rv   r      )r   r   Zunknown_charrefr  rm  )rD   r   rq   r$   r$   r%   handle_charref
  s    
zParaParser.handle_charrefc                 C   s   |  | d S rE   )r  )rD   linenomessager$   r$   r%   syntax_error
  s    zParaParser.syntax_errorc                 C   sF   |d d dkr$|dd  dkr$d S | j r6td| | j| d S )N
   z
attribute iz value not quotedzparaparser: syntax error: %s)_crashOnErrorr   errorsappend)rD   r  r$   r$   r%   r  
  s
      zParaParser._syntax_errorc                 C   s   | j ddd d S )Ngreekr   )r  r  rD   rT   r$   r$   r%   start_greek
  s    zParaParser.start_greekc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   	end_greek
  s    zParaParser.end_greekc              	   C   s  d|kr^d|kr|  d zt|d }W q tk
rZ   |  dt|d   d}Y qX nd|krz8|d  }|drt|d}n
t|d}t|}W q   |  d	t|d   d}Y qX n"d }|r|  d
t	|
 d   |d k	r| | | jddd d S )Nr   codez5<unichar/> invalid with both name and code attributesz&<unichar/> invalid name attribute
"%s"rt  0xr  r   z$<unichar/> invalid code attribute %sz<unichar/> invalid attribute %sunichar)r  )r  unicodedatalookupKeyErrorasciir7   r  r   rm  r   r   r  r  )rD   rT   rC   r$   r$   r%   start_unichar
  s0    



zParaParser.start_unicharc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   end_unichar  s    zParaParser.end_unicharc                 C   sB   |  |t}d|kr2t|d \|d< |d< |d< | jd| d S )Nr   r  r  r   )r   )r  _spanAttrMapr   r  )rD   rT   r  r$   r$   r%   
start_font  s    zParaParser.start_fontc                 C   s   |  d d S )Nr   r  r  r$   r$   r%   end_font
  s    zParaParser.end_fontc                 C   s   |  |t}d|krb| |d}i }d D ]"}t||| }|| krJq0|||< q0|| |}d|krt|d \|d< |d< |d< | jd| d S )Nr   z%fontName fontSize textColor backColorr   r  r  span)r  )	r  r  findSpanStyler  splitrO   rx  r   r  )rD   rT   r  r   Dr   rC   r$   r$   r%   
start_span  s     

zParaParser.start_spanc                 C   s   |  d d S )Nr  r  r  r$   r$   r%   end_span  s    zParaParser.end_spanc                 C   s   | j ddddd d S )NbrTrb   )r  	lineBreaktextr  r  r$   r$   r%   start_br  s    zParaParser.start_brc                 C   s>   | j d }|jdkr|js"td|`| d | d d S )Nr:   r  zParser failure in <br/>rb   )rc   r  r  r   r  r  )rD   rS   r$   r$   r%   end_br"  s    

zParaParser.end_brr   c                 C   sf  | j }|i kr0t|}t|| || || _ t }d|_d|_g |_zf|rt	|j
\|_|_|_|j|_t|dr||jp|j|_n&t	|j\|_|_|_|j|_|j|_W n   td|j  Y nX g |_d | _| _tt|ddt|ddd| _tt|ddt|d	dd| _tt|d
dt|ddd| _tt|ddt|ddd| _t|dt| _|S )Nr   r   zerror with style name=%sr   rb   r   )r   r   r   r   r   r   r   r   ZlinkUnderline) _stylerq  deepcopyr   r  r   r   r  r   r   r   r   r  r  r   rR   rN   r   r   r   r   r  r  r  r  rO   r  r  r  r  r   r  )rD   rT   attrMapra  r   rS   r$   r$   r%   _initial_frag+  sN    








zParaParser._initial_fragc                 C   s   |  |t}d|_|g| _d S Nr   )r  _paraAttrMap__tag__rc   rD   rT   rS   r$   r$   r%   
start_paraW  s    zParaParser.start_parac                 C   s   |  d d S r  r  r  r$   r$   r%   end_para\  s    zParaParser.end_parac                 C   sD   t | dr| d g | _| |td}d|_d|_| j| d S )N	bFragListzonly one <bullet> tag allowedr   ra  )	rN   r  r  r  _bulletAttrMapisBulletr  rc   r  r  r$   r$   r%   start_bullet_  s    

zParaParser.start_bulletc                 C   s   |  d d S )Nra  r  r  r$   r$   r%   
end_bulleth  s    zParaParser.end_bulletc                 C   s6   z|d }W n t k
r$   d }Y nX | j| d S )Nid)r  _seqZsetDefaultCounter)rD   rT   rU   r$   r$   r%   start_seqdefaultl  s
    
zParaParser.start_seqdefaultc                 C   s   d S rE   r$   r  r$   r$   r%   end_seqdefaults  s    zParaParser.end_seqdefaultc                 C   sZ   z|d }W n t k
r$   d }Y nX zt|d }W n   d}Y nX | j|| d S )Nr  baser   )r  r   r  reset)rD   rT   r  r
  r$   r$   r%   start_seqresetv  s    

zParaParser.start_seqresetc                 C   s   d S rE   r$   r  r$   r$   r%   end_seqreset  s    zParaParser.end_seqresetc                 C   sh   z|d }W n t k
r$   d}Y nX | }| j}t|d d |dd  D ]\}}||| qNd S )Nr  rb   r:   r   )r  r  r  zipchain)rD   rT   r  seqpcr$   r$   r%   start_seqchain  s    
"zParaParser.start_seqchainc                 C   s^   z|d }W n t k
r$   d }Y nX z|d }W n t k
rJ   d}Y nX | j|| d S )Nr  valuer1   )r  r  Z	setFormat)rD   rT   r  r  r$   r$   r%   start_seqformat  s    

zParaParser.start_seqformatc                 C   s   d|kr$|d }|  || j  d S d|kr6|d }nd }|dd }|sX| j|}nF| dkrr| j|}n,t|}| j|}| j|| j |  |  | d S )Ntemplater  incr5   )	r  r  r  Znextfr7   Zthisfr   r  Z_this)rD   rT   Ztemplr  	incrementoutputincrr$   r$   r%   	start_seq  s     
zParaParser.start_seqc                 C   s   d S rE   r$   r  r$   r$   r%   end_seq  s    zParaParser.end_seqc                 C   s^   t  }d|kr|d |_n
| d |dd |_d|_| jd|d | d | d d S )Nr   z(<onDraw> needs at least a name attributer  ZonDrawZondrawr  rb   )	r   r   r  r  r  r   r  r  r  )rD   rT   r  r$   r$   r%   start_ondraw  s     

zParaParser.start_ondrawc                 C   s   |  |t}t }d|kr$|d }n
| d d|kr@|d }nt}|dd }|d k	rl|dkrltd| |dd }|d k	rzt|}W n   td| Y nX t|||f|_	||_
d	|_| jd	|d
 | d | d	 d S )Nr   z(<index> needs at least an item attributer   r   )Z123Ir'   ABCabcz3index tag format is %r not valid 123 I i ABC or abcr   z!index tag offset is %r not an intindexr  rb   )r  _indexAttrMapr   r  DEFAULT_INDEX_NAMEr  r   r   r   r  r   r   r  r  r  )rD   rT   r  r  r   r   r   r$   r$   r%   start_index  s.    



zParaParser.start_indexc                 C   s   d S rE   r$   r  r$   r$   r%   start_unknown  s    zParaParser.start_unknownc                 K   s0   t  | jd }||_t|| | j| d S )Nr:   )rq  rc   r  r   r  )rD   rX   rT   rS   r$   r$   r%   r    s    
zParaParser._pushc                 C   s.   | j  }||jkr|S td||jf d S )Nz0Parse error: saw </%s> instead of expected </%s>)rc   r  r  r   )rD   rX   rS   r$   r$   r%   r    s    

 zParaParser._popc              	   C   s   i }|  D ]~\}}| js"| }||krl|| }|d }|d k	r^t|trV|| |n||}|||d < q| d|tt| f  q|S )Nr   r   z$invalid attribute name %s attrMap=%r)	r   r  r7   rP   rW   r  r   sortedr   )rD   rT   r  r  r   rC   jfuncr$   r$   r%   r    s     zParaParser.getAttributesr   Tc                 C   s0   t j| ftdd || _|| _|| _|| _d S )NF)convert_charrefs)r   rY   r  verboser  ignoreUnknownTagsr  )rD   r+  r  r,  ZcrashOnErrorr$   r$   r%   rY     s
    zParaParser.__init__c                 C   s   g | _ t| drt| d d S )Nr  )fragListrN   delattrr  r$   r$   r%   _iReset  s    
 zParaParser._iResetc                 C   s"   t |  g | _|| _|   dS )zreset the parserN)r   r  r  r  r/  rD   r   r$   r$   r%   _reset  s    
zParaParser._resetc                 C   s   t  | jd }t|dr6|jj}|rp| d|  n:t|dr\|dkrX| d|j  dS |jrpd|_t	|}t
|j|j|j|_||_t|d	rt|d	 | j| n| j| dS )
z:Creates an intermediate representation of string segments.r:   r  zOnly empty <%s> tag allowedr  rb   zNo content allowed in %s tagNrs  r  )rq  rc   rN   r  r   r  r  r  r   r~  r   r  r  r  r.  r  r  r-  )rD   r{  rS   r   r$   r$   r%   r  $  s$    	
 
 

zParaParser.handle_datac                 C   s   |  | d S rE   )r  )rD   r{  r$   r$   r%   handle_cdataF  s    zParaParser.handle_cdatac                 C   s   t jj | _| | d S rE   )	reportlablibZ	sequencerZgetSequencerr  r1  r0  r$   r$   r%   _setup_for_parseI  s    zParaParser._setup_for_parsec              	   C   s   | j r4| dt| j ddd t| j D f  | `| j}| `t| jdkrt| j}t	| drf| j
phd}|   nd }}|||fS )z3Reset after parsing, to be ready for next paragraphz%parse ended with %d unclosed tags
 %sz
 c                 s   s   | ]}|j V  qd S rE   )r  )rn  rv   r$   r$   r%   	<genexpr>P  s     z-ParaParser._complete_parse.<locals>.<genexpr>r   r  N)rc   r  r  ry  reversedr  r  r  r-  rN   r  r/  )rD   r   r-  r  r$   r$   r%   _complete_parseM  s    .
zParaParser._complete_parsec                 C   s   |d }z t | d| }t | d| }W n2 tk
rZ   | jsJtd| | j}| j}Y nX ||d phi  |d }|r| j}|D ]}|t|tt	f | q|  dS )z9Iterate through a pre-parsed tuple tree (e.g. from pyrxp)r   r  r  Invalid tag "%s"r   r   N)
rO   r  r,  r   r&  end_unknown_tt_handlersrP   r   rQ   )rD   ttrX   r|   r}   CMr  r$   r$   r%   
_tt_handle]  s     zParaParser._tt_handlec                 C   s   | j | jf| _| | d S rE   )r  r?  r;  )rD   r<  r$   r$   r%   	_tt_startz  s    zParaParser._tt_startc                 C   s   |  | | | |  S )zparse from tupletree form)r5  r@  r8  )rD   r<  r   r$   r$   r%   tt_parse~  s    

zParaParser.tt_parsec                 C   s   t dd S )Nz,findSpanStyle not implemented in this parserr[   r0  r$   r$   r%   r    s    zParaParser.findSpanStylec                 C   st   |  | t|}t|dkr4|d dkr4t|s@d| d }z| | W n   tdt|  Y nX |  S )zattempt replacement for parse   r   r  z<para>z</para>z#
paragraph text %s caused exception)	r5  r   r  _re_parar*   feedr   r  r8  )rD   r  r   r$   r$   r%   parse  s    
"zParaParser.parsec                 C   s   t |tr(i }|D ]\}}|||< q|}| js6| }zt| d| }W n, tk
rt   | jsjtd| | j}Y nX ||p~i  dS )z&Called by HTMLParser when a tag startsr  r9  N)	rP   r   r  r7   rO   r  r,  r   r&  )rD   rX   r  dr   rC   r|   r$   r$   r%   handle_starttag  s    

 zParaParser.handle_starttagc                 C   sX   | j s| }zt| d| }W n, tk
rL   | jsBtd| | j}Y nX |  dS )z$Called by HTMLParser when a tag endsr  r9  N)r  r7   rO   r  r,  r   r:  )rD   rX   r}   r$   r$   r%   handle_endtag  s     zParaParser.handle_endtagc                 C   s0   zt | }W n   d| }Y nX | | dS )zHandles a named entity.  z&%s;N)known_entitiesr  )rD   r   rC   r$   r$   r%   handle_entityref  s
    zParaParser.handle_entityrefN)r   )r   r   r   T)^rK   rL   rM   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  Z	start_supZend_supr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r	  r  r  r  Zend_seqchainr  Zend_seqformatZstart_seqDefaultZend_seqDefaultZstart_seqResetZend_seqResetZstart_seqChainZend_seqChainZstart_seqFormatZend_seqFormatr  r  r  Zstart_onDrawZ
end_onDrawZ
end_ondrawr%  Z	end_indexr&  r:  r  r  r  rY   r/  r1  r  r2  r5  r8  r?  r@  rA  r  rE  rG  rH  rJ  r$   r$   r$   r%   r   

  s   	
,		


	
"r   __main__)cleanBlockQuotedText)_baseFontNamec                 C   s   t d t| } || t\}}}|d kr@tjD ]}t | q0nt d|j|j|j |D ]j}t	j
|j|j|j|j|jd|jd d   t|drt dt|jddt|jdd|jj qXt   qXd S )	Nz
##########Z	ParaStylez|%s|   r  r   rb   r  )printrL  rE  r   _parserr  r   rR   r   sysstdoutwriter  r   r  rN   rO   r  r   )r  r  lrvZbvr$   r$   r%   
check_text  s    
.
(rV     a  
    <b><i><greek>a</greek>D</i></b>&beta;<unichr value="0x394"/>
    <font name="helvetica" size="15" color=green>
    Tell me, O muse, of that ingenious hero who travelled far and wide
    after</font> he had sacked the famous town of Troy. Many cities did he visit,
    and many were the nations with whose manners and customs he was acquainted;
    moreover he suffered much by sea while trying to save his own life
    and bring his men safely home; but do what he might he could not save
    his men, for they perished through their own sheer folly in eating
    the cattle of the Sun-god Hyperion; so the god prevented them from
    ever reaching home. Tell me, too, about all these things, O daughter
    of Jove, from whatsoever source you<super>1</super> may know them.
    z<para> </para>ze<para font="%s" size=24 leading=28.8 spaceAfter=72>ReportLab -- Reporting for the Internet Age</para>a  
    <font color=red>&tau;</font>Tell me, O muse, of that ingenious hero who travelled far and wide
    after he had sacked the famous town of Troy. Many cities did he visit,
    and many were the nations with whose manners and customs he was acquainted;
    moreover he suffered much by sea while trying to save his own life
    and bring his men safely home; but do what he might he could not save
    his men, for they perished through their own sheer folly in eating
    the cattle of the Sun-god Hyperion; so the god prevented them from
    ever reaching home. Tell me, too, about all these things, O daughter
    of Jove, from whatsoever source you may know them.af	  
    Telemachus took this speech as of good omen and rose at once, for
    he was bursting with what he had to say. He stood in the middle of
    the assembly and the good herald Pisenor brought him his staff. Then,
    turning to Aegyptius, "Sir," said he, "it is I, as you will shortly
    learn, who have convened you, for it is I who am the most aggrieved.
    I have not got wind of any host approaching about which I would warn
    you, nor is there any matter of public moment on which I would speak.
    My grieveance is purely personal, and turns on two great misfortunes
    which have fallen upon my house. The first of these is the loss of
    my excellent father, who was chief among all you here present, and
    was like a father to every one of you; the second is much more serious,
    and ere long will be the utter ruin of my estate. The sons of all
    the chief men among you are pestering my mother to marry them against
    her will. They are afraid to go to her father Icarius, asking him
    to choose the one he likes best, and to provide marriage gifts for
    his daughter, but day by day they keep hanging about my father's house,
    sacrificing our oxen, sheep, and fat goats for their banquets, and
    never giving so much as a thought to the quantity of wine they drink.
    No estate can stand such recklessness; we have now no Ulysses to ward
    off harm from our doors, and I cannot hold my own against them. I
    shall never all my days be as good a man as he was, still I would
    indeed defend myself if I had power to do so, for I cannot stand such
    treatment any longer; my house is being disgraced and ruined. Have
    respect, therefore, to your own consciences and to public opinion.
    Fear, too, the wrath of heaven, lest the gods should be displeased
    and turn upon you. I pray you by Jove and Themis, who is the beginning
    and the end of councils, [do not] hold back, my friends, and leave
    me singlehanded- unless it be that my brave father Ulysses did some
    wrong to the Achaeans which you would now avenge on me, by aiding
    and abetting these suitors. Moreover, if I am to be eaten out of house
    and home at all, I had rather you did the eating yourselves, for I
    could then take action against you to some purpose, and serve you
    with notices from house to house till I got paid in full, whereas
    now I have no remedy."aA  
But as the sun was rising from the fair sea into the firmament of
heaven to shed light on mortals and immortals, they reached Pylos
the city of Neleus. Now the people of Pylos were gathered on the sea
shore to offer sacrifice of black bulls to Neptune lord of the Earthquake.
There were nine guilds with five hundred men in each, and there were
nine bulls to each guild. As they were eating the inward meats and
burning the thigh bones [on the embers] in the name of Neptune, Telemachus
and his crew arrived, furled their sails, brought their ship to anchor,
and went ashore. z
So the neighbours and kinsmen of Menelaus were feasting and making
merry in his house. There was a bard also to sing to them and play
his lyre, while two tumblers went about performing in the midst of
them when the man struck up with his tune.]a7  
"When we had passed the [Wandering] rocks, with Scylla and terrible
Charybdis, we reached the noble island of the sun-god, where were
the goodly cattle and sheep belonging to the sun Hyperion. While still
at sea in my ship I could bear the cattle lowing as they came home
to the yards, and the sheep bleating. Then I remembered what the blind
Theban prophet Teiresias had told me, and how carefully Aeaean Circe
had warned me to shun the island of the blessed sun-god. So being
much troubled I said to the men, 'My men, I know you are hard pressed,
but listen while I <strike>tell you the prophecy that</strike> Teiresias made me, and
how carefully Aeaean Circe warned me to shun the island of the blessed
sun-god, for it was here, she said, that our worst danger would lie.
Head the ship, therefore, away from the island.zA&lt;B&gt;C&amp;D&quot;E&apos;Fz$A&lt; B&gt; C&amp; D&quot; E&apos; Fz<![CDATA[<>&'"]]>z<bullet face=courier size=14 color=green>+</bullet>
There was a bard also to sing to them and play
his lyre, while two tumblers went about performing in the midst of
them when the man struck up with his tune.]z3<onDraw name="myFunc" label="aaa   bbb">A paragraphz@<para><onDraw name="myFunc" label="aaa   bbb">B paragraph</para>zqHere comes <FONT FACE="Helvetica" SIZE="14pt">Helvetica 14</FONT> with <STRONG>strong</STRONG> <EM>emphasis</EM>.zqHere comes <font face="Helvetica" size="14pt">Helvetica 14</font> with <Strong>strong</Strong> <em>emphasis</em>.zOHere comes <font face="Courier" size="3cm">Courier 3cm</font> and normal again.z>Before the break <br/>the middle line <br/> and the last line.zMThis should be an inline image <img src='../../../docs/images/testimg.gif'/>!z(aaa&nbsp;bbbb <u>underline&#32;</u> cccc)r   T)r   F)d__all____version__r`   rerQ  rq  r  Zreportlab.lib.sequencerr3  Zreportlab.lib.abagr   Zreportlab.lib.utilsr   r   r   r   Zreportlab.lib.colorsr	   r
   Zreportlab.lib.fontsr   r   Zreportlab.lib.enumsr   r   r   r   Zreportlab.lib.unitsr   r   r   r   Zreportlab.rl_configr   html.parserr   html.entitiesr   compilerC  r  r  r  r$  r&   r-   r/   r8   r>   r   r=   rV   rW   ra   r  r  rk   rh   rr   rw   r{   r   r   r   r  r  Z_fontAttrMapr  r  r  r  r#  r  r  r  r   r   Zgreeksr   rI  r   r   ru  r~  r   rK   Zreportlab.platypusrL  Zreportlab.lib.stylesrM  rP  rV  r   r   rR   r   r   r   r  r  r$   r$   r$   r%   <module>   s  


4	
                 
                \
A     8



$














