+
    d�·j  ã                   óP  € R t ^ RIt^ RIt^ RIt^ RIt]P
                  ! ]4      P                  4       P                  P                  t	]	R,          R,          t
RRRRRR	/t]P                  ! R
]P                  4      tRtR tR t]R8X  d   ]! ]P&                  R,          4       R# R# )uª  Render the åŽŸç�†è¯´æ˜Ž panel of each demo page from scripts/explain/<demo>.json.

Run from the repo root:  python3 scripts/gen_explain.py [demo ...]

Each www/<demo>/index.html must contain exactly one explain block
(for a new page, a placeholder `<details class="explain"></details>` is enough).
The home page panel (www/index.html) is hand-written and not managed here.
Panels start collapsed (no `open`); the header shows å±•å¼€ / æ”¶èµ·.

JSON fields (all strings are HTML fragments):
  lead         str                     intro paragraph
  formulas     [[expr, note], ...]     key formulas; note may be ""
  terms        [[term, desc], ...]     ç®—æ³•åŽŸç�† definition list
  terms_notes  [str]                   notes after the list
  flow         [[actor, text], ...]    actor: js | rust | gpu
  flow_notes   [str]
  perf         [str]                   æ€§èƒ½è¦�ç‚¹ bullets
  src          [[path, note], ...]     note may be ""
NÚscriptsÚexplainÚjsÚJSÚrustÚRustÚgpuÚGPUz5        <details class="explain"[^>]*>.*?</details>\nz            c                 óò  € R \          R2\          RV R,           R2\          R2\          R2.pV P                  R. 4       F3  w  r#V'       d   RV R	2MR
pVP                  \          RV R	V R24       K5  	  V P                  R4      '       dy   VP                  \          R24       V R,           F;  w  rVVP                  \          RV R24       VP                  \          RV R24       K=  	  VP                  \          R24       V P                  R. 4       F  pVP                  \          RV R24       K   	  VP                  \          R24       V\          R2\          R2\          R2.,          pV R,           F1  w  r‰VP                  \          RV R\        V,           RV	 R24       K3  	  VP                  \          R24       V P                  R. 4       F  pVP                  \          RV R24       K   	  VP                  \          R24       V\          R 2\          R!2\          R"2.,          pYR#,           Uu. uF  p\          R$V R%2NK  	  up,          pV\          R&2\          R2.,          pR
p
V R',           F)  w  r³V
R(V R)2,          p
V'       g   K  V
R*V R	2,          p
K+  	  VP                  \          R+V
 R24       VP                  R,4       R-P	                  V4      R-,           # u upi ).z!        <details class="explain">u~   <summary><span class="explain-title">ðŸ“– åŽŸç�†è¯´æ˜Ž</span><span class="explain-toggle" aria-hidden="true"></span></summary>z<p class="explain-lead">Úleadz</p>z<section class="explain-sec">u>       <h3><span class="explain-ico">ðŸ§®</span>ç®—æ³•åŽŸç�†</h3>Úformulasz#<span class="explain-formula-note">z</span>Ú zD    <div class="explain-formula"><span class="explain-formula-expr">z</div>Útermsz    <dl class="explain-terms">z        <dt>z</dt>z        <dd>z</dd>z	    </dl>Úterms_notesz    <p class="explain-note">z
</section>uO       <h3><span class="explain-ico">ðŸ”„</span>Rust ä¸Ž JavaScript çš„åˆ†å·¥</h3>z    <ol class="explain-flow">Úflowz'        <li><span class="explain-actor z">z</span><span>z</span></li>z	    </ol>Ú
flow_notesz*<section class="explain-sec explain-perf">u=       <h3><span class="explain-ico">âš¡</span>æ€§èƒ½è¦�ç‚¹</h3>z    <ul>Úperfz        <li>z</li>z	    </ul>Úsrcz<code class="explain-chip">z</code>z<span class="explain-src-note">u*   <p class="explain-src"><span>æº�ç �</span>z        </details>Ú
)ÚIÚgetÚappendÚACTORÚjoin)ÚdÚoutÚexprÚnoteÚ	note_htmlÚtermÚdescÚpÚactorÚtextÚchipsÚpaths   &           Ú+/work/data/stt/webtt/scripts/gen_explain.pyÚrenderr'       s!  € Ø.ÜˆSð Oð OäˆSÐ(¨¨6­¨°4Ð8ÜˆSÐ-Ð.ÜˆSÐNÐOðQ€Cð —e‘e˜J¨Ö+‰
ˆßKOÐ9¸$¸¸wÑGÐUWˆ	Ø�
‰
”a�Sð 9Ø9=¸¸gÀiÀ[ÐPVðXö 	Yñ ,ð 	‡u�uˆW‡~‚~Ø�
‰
”a�SÐ6Ð7Ô8Ø˜GŸ*˜*‰JˆDØ�J‰Jœ!˜˜L¨¨¨eÐ4Ô5Ø�J‰Jœ!˜˜L¨¨¨eÐ4Ö5ñ %ð 	�
‰
”a�S˜	�?Ô#Ø�U‰U�= "Ö%ˆØ�
‰
”a�SÐ4°Q°C°tÐ<Ö=ñ &à‡J�J”!��JÐÔ àŒqˆcÐ.Ð/ÜˆcÐ`ÐaÜˆcÐ.Ð/ð1õ 1€Cð ˜—y�y‰ˆØ�
‰
”a�SÐ?À¸wÀbÌÈuÍÈð WØ ˜6 ð/ö 	0ñ !ð ‡J�J”!��IˆÔØ�U‰U�< Ö$ˆØ�
‰
”a�SÐ4°Q°C°tÐ<Ö=ñ %à‡J�J”!��JÐÔ àŒqˆcÐ;Ð<ÜˆcÐNÐOÜˆc�ˆNðõ €Cð °&¶	Ó:±	¨1Œqˆc�˜a˜S Ó&±	Ñ:Õ:€CØŒqˆc�ˆO¤˜s *Ð-Ð.Õ.€Cà€EØ˜—h�h‰
ˆØÐ.¨t¨f°GÐ<Õ<ˆß‰4ØÐ6°t°f¸GÐDÕDŠEñ ð ‡J�J”!�Ð>¸u¸gÀTÐJÔKØ‡J�JÐ#Ô$Ø�9‰9�S‹>˜DÕ Ð ùò ;s   ÉK4c                 ó,  a€ T ;'       g&    \        R  \        P                  R4       4       4      p V  FÝ  p\        P                  ! \        V R2,          P                  RR7      4      o\        R,          V,          R,          pVP                  RR7      p\        \        P                  V4      4      pV^8w  d   \        P                  ! V RV 24       VP                  \        P                  V3R lV4      RR7       \        R	V 24       Kß  	  R
# )c              3   ó8   "  € T F  qP                   x € K  	  R # 5i©N)Ústem)Ú.0r!   s   & r&   Ú	<genexpr>Úmain.<locals>.<genexpr>Q   s   é € Ð@Ñ,? qŸFžFÓ,?ùs   ‚z*.jsonz.jsonzutf-8)ÚencodingÚwwwz
index.htmlz": expected 1 explain block, found c                 ó   <€ \        S4      # r*   )r'   )Ú_Údatas   &€r&   Ú<lambda>Úmain.<locals>.<lambda>Y   s	   ø€ ¬v°d¬|ó    z	rendered N)ÚsortedÚDATAÚglobÚjsonÚloadsÚ	read_textÚROOTÚlenÚBLOCK_REÚfindallÚsysÚexitÚ
write_textÚsubÚprint)ÚnamesÚnameÚpageÚhtmlÚfoundr3   s   &    @r&   ÚmainrK   P   s×   ø€ Ø×@Ð@”VÑ@¬D¯I©I°hÔ,?Ó@Ó@€EÛˆÜ�zŠzœ4 T F¨% .Õ0×;Ñ;ÀWÐ;ÓMÓNˆÜ�e�|˜dÕ" \Õ1ˆØ�~‰~ wˆ~Ó/ˆÜ”H×$Ñ$ TÓ*Ó+ˆØ�AŒ:Ü�HŠH˜�vÐ?À¸wÐGÔHØ�‰œŸ™Ô%;¸TÓBÈWˆÔUÜ�	˜$˜Ð Ö!ó r6   Ú__main__:é   NN)Ú__doc__r:   ÚpathlibÚrerA   ÚPathÚ__file__ÚresolveÚparentr=   r8   r   ÚcompileÚSr?   r   r'   rK   Ú__name__Úargv© r6   r&   Ú<module>rZ      s£   ðñó& Û Û 	Û 
à‡|‚|�HÓ×%Ñ%Ó'×.Ñ.×5Ñ5€ØˆiÕ˜)Õ#€Ø	ˆt�V˜V U¨EÐ2€Ø�:Š:ÐNÐPR×PTÑPTÓU€Ø€ò-!ò`
"ð ˆzÔÙˆ�‰�"�Öñ r6   