Ë
    #´˜jÕ  ã                   ó˜   — d Z ddlmZ ddlmZ d„ Z G d„ d«      Zej                  «        edk(  rddl	Z	 e	j                  d	d
d¬«       yy)zœExample extension, also used for testing.

See extend.txt for more details on creating an extension.
See config-extension.def for configuring an extension.
é    )ÚidleConf©Úwrapsc                 ó0   ‡ — t        ‰ «      dˆ fd„	«       }|S )z9Apply a formatting function to all of the selected lines.c                 óÚ   •— | j                   j                  «       \  }}}}t        t        |«      dz
  «      D ]  }||   } ‰| |«      ||<   Œ | j                   j	                  ||||«       y)Né   Úbreak)Ú	formatterÚ
get_regionÚrangeÚlenÚ
set_region)	ÚselfÚeventÚheadÚtailÚcharsÚlinesÚposÚlineÚformat_lines	           €ú!lib/python3.12/idlelib/zzdummy.pyÚapplyzformat_selection.<locals>.apply   sk   ø€ à#'§>¡>×#<Ñ#<Ó#>Ñ ˆˆd�E˜5Üœ˜U› a™Ö(ˆCØ˜‘:ˆDÙ$ T¨4Ó0ˆE�#ŠJð )ð 	�‰×!Ñ! $¨¨e°UÔ;Øó    )Nr   )r   r   s   ` r   Úformat_selectionr      s#   ø€ ô ˆ;Óôó ðð €Lr   c                   óT   — e Zd ZdZdddgfgZd„ Zed„ «       Zed„ «       Z	ed„ «       Z
y	)
ÚZzDummyz3Prepend or remove initial text from selected lines.Úformat)zZ inz<<z-in>>)zZ outz	<<z-out>>c                 óV   — || _         |j                  | _        |j                  | _        y)z+Initialize the settings for this extension.N)ÚeditwinÚtextÚfregionr
   )r   r    s     r   Ú__init__zZzDummy.__init__%   s   € àˆŒØ—L‘LˆŒ	Ø Ÿ™ˆ�r   c                 ó<   — t        j                  ddd«      | _        y)z!Load class variables from config.Ú
extensionsr   zz-textN)r   Ú	GetOptionÚztext)Úclss    r   ÚreloadzZzDummy.reload+   s   € ô ×&Ñ& |°YÀÓIˆ�	r   c                 ó"   — | j                   › |› �S )z™Insert text at the beginning of each selected line.

        This is bound to the <<z-in>> virtual event when the extensions
        are loaded.
        )r'   )r   r   s     r   Ú
z_in_eventzZzDummy.z_in_event0   s   € ð —*‘*�˜d˜VÐ$Ð$r   c                 óp   — |j                  | j                  «      sdnt        | j                  «      }||d S )z¥Remove specific text from the beginning of each selected line.

        This is bound to the <<z-out>> virtual event when the extensions
        are loaded.
        r   N)Ú
startswithr'   r   )r   r   Úzlengths      r   Úz_out_eventzZzDummy.z_out_event9   s.   € ð  Ÿ?™?¨4¯:©:Ô6‘!¼CÀÇ
Á
»OˆØ�G�Hˆ~Ðr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úmenudefsr#   Úclassmethodr)   r   r+   r/   © r   r   r   r      sd   „ Ù=ð 
Ø Ø"ð
ð 	ð€Hò)ð ñJó ðJð ñ%ó ð%ð ñó ñr   r   Ú__main__Nzidlelib.idle_test.test_zzdummyé   F)Ú	verbosityÚexit)r3   Úidlelib.configr   Ú	functoolsr   r   r   r)   r0   ÚunittestÚmainr6   r   r   Ú<module>r?      sS   ðñõ $Ý ò÷'ñ 'ðT ‡�Ô ð ˆzÒÛØ€H‡M�MÐ2¸aÀeÖLð r   