
    2j                        S r SrS rSSSSSS.S	 jr\S
:X  a  SSKr\R                  R                  \R                  R                  \R                  R                  \
5      SS5      5      r\R                  " \SS9  \" SSS9r\" \R                  R                  \S5      SSS9 r\R!                  \5        SSS5        \" S5        gg! , (       d  f       N= f)uw  Single-line branded SVG for an equation under a bar model.

Used by `solution_block.py`, also usable standalone (one equation per call).
The `algebra` field is recorded on the data side so the future P5–P6 algebra
toggle can re-render the same step as an algebraic equation without a retrofit.

generate(text, *, algebra=None, width=860, height=44, emphasize=False) -> str
z<style>svg{--crimson:#960000;--gold:#BF9237;--lime:#88C808;--steel:#4A6488;--cream:#FAF5EE;--ink:#2A2A2A;--border:#D0ACAC;}</style>c                 x    [        U 5      R                  SS5      R                  SS5      R                  SS5      $ )N&z&amp;<z&lt;>z&gt;)strreplace)ss    >C:\allgifted\mathapi11v2\tools\svg_generators\equation_line.py_escr
      s2    FNN3(00f=WS&!#    Ni\  ,   FT)algebrawidthheight	emphasizeborderc                T   U(       a  SOSnSU SU SU SU SU(       a  [        U5      OS S	3[        /nU(       a  UR                  S
US-
   SUS-
   S35        UR                  SUS-   SUS-   SU S[        U 5       S3	5        UR                  S5        SR                  U5      $ )u   Render one equation line as SVG.

`algebra` is captured (data-only) but not yet rendered — it carries the
algebraic form of `text` for a future toggle. e.g. text="1 unit = 4",
algebra="u = 4".
zvar(--crimson)z
var(--ink)z/<svg xmlns="http://www.w3.org/2000/svg" width="z
" height="z" viewBox="0 0  z" data-algebra=" z">z<rect x="3" y="3" width="   z>" rx="6" fill="none" stroke="var(--border)" stroke-width="2"/>z	<text x="   z" y="zC" font-family="sans-serif" font-size="17" font-weight="bold" fill="z3" text-anchor="middle" dominant-baseline="central">z</text>z</svg>
)r
   STYLEappendjoin)textr   r   r   r   r   fillpartss           r	   generater      s      )lD
9% A(/%& :*1gr:"	> 		E 'ay
6!8* ED E	
 
LL
E!G9E&( ,337& 9<<@J<w	P
 
LL99Ur   __main__    z..samples)exist_okz-Number of teddy bears Jenny has = 8 + 10 = 18zJ = S + 10 = 8 + 10 = 18)r   zequation_line.svgwzutf-8)encodingzwrote equation_line.svg)__doc__r   r
   r   __name__ospathabspathr   dirname__file__outmakedirsr   openfwriteprint r   r	   <module>r3      s   O #
 ##bT: z
''//"'',,rwwx'@$	R
SCKKd#7*	A 
bggll3 34c
 #$	

  

#$ 
  
 s   &C


C