+
    Q�ip  ã                  óT  € ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	t	^RI
HtHtHtHt ^RIHt ^RIHt ^RIHtHtHt R	 R
 ltR R ltR R lt]3R R lltR R lt]]]3R R llt]P<                  ^ ,          ]P<                  R,          ]P>                  ]] 3R R llt!R# )é    )ÚannotationsN©Úwraps)ÚCallableÚIterator)Ú	AutomatonÚInputÚOutputÚState)ÚfindMachines)ÚMethodicalMachine)ÚTypeMachineÚInputProtocolÚCorec               ó    € V ^8„  d   QhRRRR/# ©é   ÚsÚstrÚreturn© )Úformats   "Ú4/usr/lib/python3/dist-packages/automat/_visualize.pyÚ__annotate__r      s   € ÷ 0ñ 0�ð 0˜ñ 0ó    c                óD   € R P                  V P                  RR4      4      # )z"{}"Ú"z\")r   Úreplace©r   s   &r   Ú_gvquoter       s   € Ø�=‰=˜Ÿ™ 3¨Ó.Ó/Ð/r   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r      s   € ÷ ñ ˆsð �sñ r   c                ó$   € R P                  V 4      # )z<{}>)r   r   s   &r   Ú_gvhtmlr#      s   € Ø�=‰=˜ÓÐr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Únamer   ÚchildrenÚattrsr   r   )r   s   "r   r   r      s(   € ÷ ñ �sð  sð °Sð ¸Sñ r   c                ó¨   € RP                  R \        VP                  4       4       4       4      pRP                  V4      pRP                  WVR7      # )z7
Construct a string from the HTML element description.
Ú c           	   3  ón   "  € T F+  w  rR P                  V\        \        V4      4      4      x € K-  	  R# 5i)z{}={}N)r   r    r   )Ú.0ÚkeyÚvalues   &  r   Ú	<genexpr>ÚelementMaker.<locals>.<genexpr>   s0   é € ð á/‰JˆCð 	�‰�sœH¤S¨£ZÓ0×1Ð1Û/ùs   ‚35Ú z#<{name} {attrs}>{children}</{name}>)r%   r'   r&   )ÚjoinÚsortedÚitemsr   )r%   r&   r'   ÚformattedAttrsÚformattedChildrens   &*,  r   ÚelementMakerr6      sY   € ð —X‘Xñ ä  §¡£Ô/óó €Nð Ÿ™ Ó)ÐØ0×7Ñ7ØÐ2Cð 8ó ð r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   Ú
inputLabelr   ÚoutputLabelsú	list[str]ÚportÚ_EzCallable[..., str]r   r   )r   s   "r   r   r   &   s:   € ÷  ñ  Øð àð ð ð ð 	ð	 ð
 	ñ r   c                ó2  € / pV'       d   \        \        V4      4      VR&   V! RV! RV RR7      3RRRV/VB pR	R
/pV Uu. uF  pV! RV! RV3/ VB RR7      NK  	  ppV! RV4      .p	V'       d   V	P                  V! R.VO5!  4       V! R.V	O5!  # u upi )z6
Construct an HTML table to label a state transition.
ÚcolspanÚtdÚfontzmenlo-italic)ÚfaceÚcolorÚpurpler;   z
point-sizeÚ9Úpink)rB   ÚtrÚtable)r   ÚlenÚappend)
r8   r9   r;   r<   r>   ÚinputLabelCellÚ	pointSizeÚoutputLabelÚoutputLabelCellsÚrowss
   &&&&      r   Ú
tableMakerrO   &   sÚ   € ð €GßÜ ¤ \Ó!2Ó3ˆ�	ÑáØÙ
ˆ6�: NÔ3ñð ðð ð	ð
 ñ€Nð ˜sÐ#€Iñ (óá'ˆKñ 	ˆ4‘�F˜KÑ5¨9Ñ5¸V×DÙ'ð ð ñ
 ˆt�^Ó$Ð%€DçØ�‰‘B�tÐ/Ð.Ó/Ô0áˆgÐ˜ÓÐùòs   ÁBc               ó    € V ^8„  d   QhRRRR/# )r   ÚxúCallable[[State], str]r   r   )r   s   "r   r   r   I   s   € ÷ ñ Ð&ð Ð+Añ r   c                ó6   a € \        S 4      R  V 3R ll4       pV# )c               ó    € V ^8„  d   QhRRRR/# )r   Útr   r   r   r   )r   s   "r   r   Úescapify.<locals>.__annotate__K   s   € ÷ >ñ >�ð >˜#ñ >r   c                óT   <€ S! V 4      P                  R R4      P                  RR4      # )Ú<z&lt;Ú>z&gt;)r   )rU   rQ   s   &€r   ÚimplÚescapify.<locals>.implJ   s%   ø€ á�‹t�|‰|˜C Ó(×0Ñ0°°fÓ=Ð=r   r   )rQ   rZ   s   f r   Úescapifyr\   I   s    ø€ Ü
ˆ1ƒX÷>ó ð>ð €Kr   c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   Ú	automatonzAutomaton[State, Input, Output]ÚinputAsStringzCallable[[Input], str]ÚoutputAsStringzCallable[[Output], str]ÚstateAsStringrR   r   zgraphviz.Digraphr   )r   s   "r   r   r   Q   s:   € ÷ 7ñ 7Ø.ð7à)ð7ð ,ð7ð *ð	7ð
 ñ7r   c           
     óÖ  € \        V4      p\        V4      p\        V4      p\        P                  ! RRRR/RR/RR/R7      pV P                  4        F7  pWPP                  J d   RpR	pMR
pRpVP                  V! V4      VRVRR7       K9  	  \        V P                  4       4       F¹  w  r‰V	w  r«rÍRP                  V4      pV! V4      pRp\        TV Uu. uF  pV! V4      NK  	  upVR7      pVP                  V\        V4      RRR7       VP                  V! V
4      RP                  VV4      RR7       VP                  RP                  VV4      V! V4      4       K»  	  V# u upi )z9
Produce a L{graphviz.Digraph} object from an automaton.
ÚpackÚtrueÚdpiÚ100ÚfontnameÚMenlo)Ú
graph_attrÚ	node_attrÚ	edge_attrÚboldz
Menlo-Boldr0   ÚellipseÚblue)ÚfontameÚshapeÚstylerB   zt{}Ú	tableport)r;   z0.2Únone)ÚlabelÚmarginrp   z{}:{}:w)Ú	arrowheadz{}:{}:e)r\   ÚgraphvizÚDigraphÚstatesÚinitialStateÚnodeÚ	enumerateÚallTransitionsr   rO   r#   Úedge)r^   r_   r`   ra   ÚdigraphÚstateÚ
stateShapeÚfontNameÚnÚeachTransitionÚinStateÚinputSymbolÚoutStateÚoutputSymbolsÚthisTransitionr8   r;   ÚoutputSymbolrG   s   &&&&               r   ÚmakeDigraphr‹   Q   sˆ  € ô ˜]Ó+€MÜ˜nÓ-€NÜ˜]Ó+€Mä×ÒØ˜F E¨5Ð1Ø˜wÐ'Ø˜wÐ'ô€Gð ×!Ñ!Ö#ˆØ×*Ñ*Ó*ØˆJØ#‰HàˆJØˆHØ�‰Ù˜%Ó ØØØØð 	ö 	
ñ $ô ' y×'?Ñ'?Ó'AÖBÑˆØ8FÑ5ˆ˜hØŸ™ a›ˆÙ" ;Ó/ˆ
àˆÜØÙ>KÓL¹m¨l‰^˜LÖ)¹mÑLØô
ˆð 	�‰�^¬7°5«>À%ÈvˆÔVà�‰Ù˜'Ó"Ø×Ñ˜^¨TÓ2Øð 	ô 	
ð
 	�‰�Y×%Ñ% n°dÓ;¹]È8Ó=TÖUñ' Cð* €Nùò Ms   ÃE&:é   NNc               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   Ú	_prognamer   Ú_argvr:   Ú_syspathÚ_findMachinesz[Callable[[str], Iterator[tuple[str, MethodicalMachine | TypeMachine[InputProtocol, Core]]]]Ú_printzCallable[..., None]r   ÚNoner   )r   s   "r   r   r   ‹   sL   € ÷ [4ñ [4Øð[4àð[4ð ð[4ðð	[4ð  ð[4ð 
ñ[4r   c                óœ  € RpRpV^ ,          '       d   VP                  ^ R4       \        P                  ! WVR7      pVP                  RRR7       VP                  RR	R
RRR7       VP                  RRRRR7       VP                  RRRRR7       VP                  RRR\        P
                  RR7       VP                  RRRRRR7       VP                  V4      pVP                  ;'       d3    VP                  '       * ;'       g    VP                  VP                  8g  p	VP                  '       d   R pV! VP                  4       Fÿ  w  r«V! V
R4       VP                  4       pV	'       dA   VP                  R P                  V
4      VP                  R!7       V! V
R"VP                  4       VP                  '       g   Kz  VP                  '       * ;'       g    T	pVP                  Vn        VP                  R P                  V
4      VP                  VP                   VR#7       V'       d   R$pMR%pV! W®VP                  4       EK  	  R&# )'z'
Entry point for command line utility.
zB
    Visualize automat.MethodicalMachines as graphviz graphs.
    zz
    You must have the graphviz tool suite installed.  Please visit
    http://www.graphviz.org for more information.
    r0   )ÚprogÚdescriptionÚepilogÚfqpnz@A Fully Qualified Path name representing where to find machines.)Úhelpz--quietz-qzsuppress outputFÚ
store_true)r™   ÚdefaultÚactionz--dot-directoryz-dzWhere to write out .dot files.z.automat_visualize)r™   r›   z--image-directoryz-izWhere to write out image files.z--image-typez-tzThe image format.Úpng)r™   Úchoicesr›   z--viewz-vz.View rendered graphs with default image viewerc                 ó   € R # )Nr   )Úargss   *r   r’   Útool.<locals>._printÍ   s   € Ùr   z...discoveredz{}.dot)ÚfilenameÚ	directoryz...wrote dot into)r¢   r£   ÚviewÚcleanupz...wrote image intoz...wrote image and dot intoN)ÚinsertÚargparseÚArgumentParserÚadd_argumentrw   ÚFORMATSÚ
parse_argsÚdot_directoryÚimage_directoryÚquietr˜   Ú	asDigraphÚsaver   Ú
image_typeÚrenderr¤   )rŽ   r�   r�   r‘   r’   ÚDESCRIPTIONÚEPILOGÚargumentParserr    ÚexplicitlySaveDotr˜   Úmachiner   Ú	deleteDotÚmsgs   &&&&&          r   Útoolrº   ‹   sJ  € ð€Kð€Fð �‡{„{Ø�‰˜˜2ÔÜ×,Ò,Ø¸ô€Nð ×ÑØØRð  ô ð ×ÑØ�4Ð/¸À|ð  ô ð ×ÑØØØ-Ø$ð	  ô ð ×ÑØØØ.Ø$ð	  ô ð ×ÑØØØ Ü× Ñ Øð  ô ð ×ÑØØØ@ØØð  ô ð ×$Ñ$ UÓ+€Dà×*Ñ*÷ ð Ø× Ñ Ô ×NÐN D×$8Ñ$8¸D×<NÑ<NÑ$Nð ð ‡z‡z€zò	ñ ' t§y¡yÖ1‰ˆÙˆt�_Ô%à×#Ñ#Ó%ˆçØ�L‰L (§/¡/°$Ó"7À4×CUÑCUˆLÔVÙ�4Ð,¨d×.@Ñ.@ÔAà××ÒØ ×.Ñ.Ô.×CÐCÐ2CˆIØ!Ÿ_™_ˆGŒNØ�N‰NØ!Ÿ™¨Ó.Ø×.Ñ.Ø—Y‘YØ!ð	 ô ÷ Ø+‘à3�Ù�4˜d×2Ñ2×3ó- 2r   )"Ú
__future__r   r§   ÚsysÚ	functoolsr   Útypingr   r   rw   Ú_corer   r	   r
   r   Ú	_discoverr   Ú_methodicalr   Ú_typedr   r   r   r    r#   r6   rO   r\   Úreprr‹   ÚargvÚpathÚprintrº   r   r   r   Ú<module>rÇ      sŒ   ðÝ "ã Û 
Ý ß %ã ç 2Ó 2Ý #Ý *ß 4Ñ 4õ0õõð$ *÷	 õFð -1Ø.2Ø,0÷	7ðv —X‘X˜a•[Ø—x‘x •|ØŸ(™(ð 	Ø"'÷[4ñ [4r   